diff --git a/Code/hull.cpp b/Code/hull.cpp index 5bd81969faf2877e5d48048a0cb06b1f5e45746a..9a467ff000259d7d598ba165ad341b891f8c762c 100644 --- a/Code/hull.cpp +++ b/Code/hull.cpp @@ -1,143758 +1,15 @@ -# 1 "/home/nivoliev/Sandbox/Cpp/convex.cpp" -# 1 "<built-in>" -# 1 "<command-line>" -# 1 "/usr/include/stdc-predef.h" 1 3 4 -# 1 "<command-line>" 2 -# 1 "/home/nivoliev/Sandbox/Cpp/convex.cpp" -# 1 "/home/nivoliev/Sandbox/Cpp/svg.hpp" 1 -# 15 "/home/nivoliev/Sandbox/Cpp/svg.hpp" -# 1 "/usr/include/c++/9.2.0/iostream" 1 3 -# 36 "/usr/include/c++/9.2.0/iostream" 3 - -# 37 "/usr/include/c++/9.2.0/iostream" 3 +#include "svg.hpp" -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 1 3 -# 252 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#include <boost/numeric/interval.hpp> +#include <boost/multiprecision/cpp_int.hpp> -# 252 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 3 -namespace std -{ - typedef long unsigned int size_t; - typedef long int ptrdiff_t; +#include <iostream> +#include <algorithm> +#include <random> +#include <vector> +#include <sstream> +#include <cmath> - - typedef decltype(nullptr) nullptr_t; - -} -# 274 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 3 -namespace std -{ - inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } -} -namespace __gnu_cxx -{ - inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } -} -# 524 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/os_defines.h" 1 3 -# 39 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/os_defines.h" 3 -# 1 "/usr/include/features.h" 1 3 4 -# 450 "/usr/include/features.h" 3 4 -# 1 "/usr/include/sys/cdefs.h" 1 3 4 -# 460 "/usr/include/sys/cdefs.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 461 "/usr/include/sys/cdefs.h" 2 3 4 -# 1 "/usr/include/bits/long-double.h" 1 3 4 -# 462 "/usr/include/sys/cdefs.h" 2 3 4 -# 451 "/usr/include/features.h" 2 3 4 -# 474 "/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 -# 475 "/usr/include/features.h" 2 3 4 -# 40 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/os_defines.h" 2 3 -# 525 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 - - -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/cpu_defines.h" 1 3 -# 528 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 -# 39 "/usr/include/c++/9.2.0/iostream" 2 3 -# 1 "/usr/include/c++/9.2.0/ostream" 1 3 -# 36 "/usr/include/c++/9.2.0/ostream" 3 - -# 37 "/usr/include/c++/9.2.0/ostream" 3 - -# 1 "/usr/include/c++/9.2.0/ios" 1 3 -# 36 "/usr/include/c++/9.2.0/ios" 3 - -# 37 "/usr/include/c++/9.2.0/ios" 3 - -# 1 "/usr/include/c++/9.2.0/iosfwd" 1 3 -# 36 "/usr/include/c++/9.2.0/iosfwd" 3 - -# 37 "/usr/include/c++/9.2.0/iosfwd" 3 - - -# 1 "/usr/include/c++/9.2.0/bits/stringfwd.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/stringfwd.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/stringfwd.h" 3 - - -# 1 "/usr/include/c++/9.2.0/bits/memoryfwd.h" 1 3 -# 46 "/usr/include/c++/9.2.0/bits/memoryfwd.h" 3 - -# 47 "/usr/include/c++/9.2.0/bits/memoryfwd.h" 3 - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 63 "/usr/include/c++/9.2.0/bits/memoryfwd.h" 3 - template<typename> - class allocator; - - template<> - class allocator<void>; - - - template<typename, typename> - struct uses_allocator; - - - - -} -# 41 "/usr/include/c++/9.2.0/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; -# 93 "/usr/include/c++/9.2.0/bits/stringfwd.h" 3 - typedef basic_string<char16_t> u16string; - - - typedef basic_string<char32_t> u32string; - - - - - -} -# 40 "/usr/include/c++/9.2.0/iosfwd" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/postypes.h" 1 3 -# 38 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - -# 39 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - -# 1 "/usr/include/c++/9.2.0/cwchar" 1 3 -# 39 "/usr/include/c++/9.2.0/cwchar" 3 - -# 40 "/usr/include/c++/9.2.0/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 -# 74 "/usr/include/bits/floatn.h" 3 4 -typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); -# 86 "/usr/include/bits/floatn.h" 3 4 -typedef __float128 _Float128; -# 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 -# 214 "/usr/include/bits/floatn-common.h" 3 4 -typedef float _Float32; -# 251 "/usr/include/bits/floatn-common.h" 3 4 -typedef double _Float64; -# 268 "/usr/include/bits/floatn-common.h" 3 4 -typedef double _Float32x; -# 285 "/usr/include/bits/floatn-common.h" 3 4 -typedef long double _Float64x; -# 120 "/usr/include/bits/floatn.h" 2 3 4 -# 31 "/usr/include/wchar.h" 2 3 4 - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 209 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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-pc-linux-gnu/9.2.0/include/stdarg.h" 1 3 4 -# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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 -# 28 "/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) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern wchar_t *wcsncpy (wchar_t *__restrict __dest, - const wchar_t *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern wchar_t *wcscat (wchar_t *__restrict __dest, - const wchar_t *__restrict __src) - throw () __attribute__ ((__nonnull__ (1, 2))); - -extern wchar_t *wcsncat (wchar_t *__restrict __dest, - const wchar_t *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - -extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - - -extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); - - -extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, - size_t __n) throw (); - - - -extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, - locale_t __loc) throw (); - -extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, - size_t __n, locale_t __loc) throw (); - - - - -extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); - - - -extern size_t wcsxfrm (wchar_t *__restrict __s1, - const wchar_t *__restrict __s2, size_t __n) throw (); - - - - - - - -extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, - locale_t __loc) throw (); - - - - -extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, - size_t __n, locale_t __loc) throw (); - - -extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); - - - - -extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) - throw () __asm ("wcschr") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) - throw () __asm ("wcschr") __attribute__ ((__pure__)); - - - - - - -extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) - throw () __asm ("wcsrchr") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) - throw () __asm ("wcsrchr") __attribute__ ((__pure__)); -# 181 "/usr/include/wchar.h" 3 4 -extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) - throw () __attribute__ ((__pure__)); - - - - -extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) - throw () __attribute__ ((__pure__)); - - -extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) - throw () __attribute__ ((__pure__)); - - -extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) - throw () __asm ("wcspbrk") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, - const wchar_t *__accept) - throw () __asm ("wcspbrk") __attribute__ ((__pure__)); - - - - - - -extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) - throw () __asm ("wcsstr") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, - const wchar_t *__needle) - throw () __asm ("wcsstr") __attribute__ ((__pure__)); - - - - - - -extern wchar_t *wcstok (wchar_t *__restrict __s, - const wchar_t *__restrict __delim, - wchar_t **__restrict __ptr) throw (); - - -extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); - - - - -extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) - throw () __asm ("wcswcs") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, - const wchar_t *__needle) - throw () __asm ("wcswcs") __attribute__ ((__pure__)); -# 240 "/usr/include/wchar.h" 3 4 -extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) - throw () __attribute__ ((__pure__)); - - - - - -extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) - throw () __asm ("wmemchr") __attribute__ ((__pure__)); -extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, - size_t __n) - throw () __asm ("wmemchr") __attribute__ ((__pure__)); - - - - - - -extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) - throw () __attribute__ ((__pure__)); - - -extern wchar_t *wmemcpy (wchar_t *__restrict __s1, - const wchar_t *__restrict __s2, size_t __n) throw (); - - - -extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) - throw (); - - -extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); - - - - -extern wchar_t *wmempcpy (wchar_t *__restrict __s1, - const wchar_t *__restrict __s2, size_t __n) - throw (); - - - - - -extern wint_t btowc (int __c) throw (); - - - -extern int wctob (wint_t __c) throw (); - - - -extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); - - - -extern size_t mbrtowc (wchar_t *__restrict __pwc, - const char *__restrict __s, size_t __n, - mbstate_t *__restrict __p) throw (); - - -extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, - mbstate_t *__restrict __ps) throw (); - - -extern size_t __mbrlen (const char *__restrict __s, size_t __n, - mbstate_t *__restrict __ps) throw (); -extern size_t mbrlen (const char *__restrict __s, size_t __n, - mbstate_t *__restrict __ps) throw (); -# 337 "/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) throw (); - - - -extern size_t wcsrtombs (char *__restrict __dst, - const wchar_t **__restrict __src, size_t __len, - mbstate_t *__restrict __ps) throw (); - - - - - -extern size_t mbsnrtowcs (wchar_t *__restrict __dst, - const char **__restrict __src, size_t __nmc, - size_t __len, mbstate_t *__restrict __ps) throw (); - - - -extern size_t wcsnrtombs (char *__restrict __dst, - const wchar_t **__restrict __src, - size_t __nwc, size_t __len, - mbstate_t *__restrict __ps) throw (); - - - - - - -extern int wcwidth (wchar_t __c) throw (); - - - -extern int wcswidth (const wchar_t *__s, size_t __n) throw (); - - - - - -extern double wcstod (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); - - - -extern float wcstof (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); -extern long double wcstold (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); -# 396 "/usr/include/wchar.h" 3 4 -extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); - - - -extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); - - - -extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); - - - -extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); - - - -extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) throw (); -# 428 "/usr/include/wchar.h" 3 4 -extern long int wcstol (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base) throw (); - - - -extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base) - throw (); - - - - -__extension__ -extern long long int wcstoll (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base) - throw (); - - - -__extension__ -extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base) throw (); - - - - - -__extension__ -extern long long int wcstoq (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base) - throw (); - - - -__extension__ -extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base) throw (); - - - - - - -extern long int wcstol_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base, - locale_t __loc) throw (); - -extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, locale_t __loc) throw (); - -__extension__ -extern long long int wcstoll_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, locale_t __loc) throw (); - -__extension__ -extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, locale_t __loc) - throw (); - -extern double wcstod_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, locale_t __loc) - throw (); - -extern float wcstof_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, locale_t __loc) - throw (); - -extern long double wcstold_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); -# 511 "/usr/include/wchar.h" 3 4 -extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); - - - -extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); - - - -extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); - - - -extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); - - - -extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - locale_t __loc) throw (); -# 551 "/usr/include/wchar.h" 3 4 -extern wchar_t *wcpcpy (wchar_t *__restrict __dest, - const wchar_t *__restrict __src) throw (); - - - -extern wchar_t *wcpncpy (wchar_t *__restrict __dest, - const wchar_t *__restrict __src, size_t __n) - throw (); -# 567 "/usr/include/wchar.h" 3 4 -extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); - - - - - -extern int fwide (__FILE *__fp, int __mode) throw (); - - - - - - -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, ...) - throw () ; - - - - - -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) - throw () ; - - - - - - -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, ...) - throw () ; - - - - - - -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, ...) throw () __asm__ ("" "__isoc99_swscanf") - - - ; -# 671 "/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) - throw () ; -# 725 "/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); -# 780 "/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); -# 806 "/usr/include/wchar.h" 3 4 -extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); -extern wint_t putwchar_unlocked (wchar_t __wc); -# 816 "/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) throw (); - - - - -extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, - const wchar_t *__restrict __format, - const struct tm *__restrict __tp, - locale_t __loc) throw (); -# 855 "/usr/include/wchar.h" 3 4 -} -# 45 "/usr/include/c++/9.2.0/cwchar" 2 3 -# 62 "/usr/include/c++/9.2.0/cwchar" 3 -namespace std -{ - using ::mbstate_t; -} -# 135 "/usr/include/c++/9.2.0/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++/9.2.0/cwchar" 3 - -} -} - - - - - - - -namespace __gnu_cxx -{ - - - - - - using ::wcstold; -# 260 "/usr/include/c++/9.2.0/cwchar" 3 - using ::wcstoll; - using ::wcstoull; - -} - -namespace std -{ - using ::__gnu_cxx::wcstold; - using ::__gnu_cxx::wcstoll; - using ::__gnu_cxx::wcstoull; -} -# 280 "/usr/include/c++/9.2.0/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++/9.2.0/bits/postypes.h" 2 3 -# 68 "/usr/include/c++/9.2.0/bits/postypes.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 88 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - typedef long streamoff; -# 98 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - typedef ptrdiff_t streamsize; -# 111 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - template<typename _StateT> - class fpos - { - private: - streamoff _M_off; - _StateT _M_state; - - public: - - - - - fpos() - : _M_off(0), _M_state() { } -# 133 "/usr/include/c++/9.2.0/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; -# 245 "/usr/include/c++/9.2.0/bits/postypes.h" 3 - typedef fpos<mbstate_t> u16streampos; - - typedef fpos<mbstate_t> u32streampos; - - - -} -# 41 "/usr/include/c++/9.2.0/iosfwd" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 74 "/usr/include/c++/9.2.0/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; - - - - -} -# 39 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/exception" 1 3 -# 33 "/usr/include/c++/9.2.0/exception" 3 - -# 34 "/usr/include/c++/9.2.0/exception" 3 - -#pragma GCC visibility push(default) - - -# 1 "/usr/include/c++/9.2.0/bits/exception.h" 1 3 -# 34 "/usr/include/c++/9.2.0/bits/exception.h" 3 - -# 35 "/usr/include/c++/9.2.0/bits/exception.h" 3 - -#pragma GCC visibility push(default) - - - -extern "C++" { - -namespace std -{ -# 60 "/usr/include/c++/9.2.0/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; - }; - -} - -} - -#pragma GCC visibility pop -# 39 "/usr/include/c++/9.2.0/exception" 2 3 - -extern "C++" { - -namespace std -{ - - - class bad_exception : public exception - { - public: - bad_exception() noexcept { } - - - - virtual ~bad_exception() noexcept; - - - virtual const char* - what() const noexcept; - }; - - - typedef void (*terminate_handler) (); - - - typedef void (*unexpected_handler) (); - - - terminate_handler set_terminate(terminate_handler) noexcept; - - - - terminate_handler get_terminate() noexcept; - - - - - void terminate() noexcept __attribute__ ((__noreturn__)); - - - unexpected_handler set_unexpected(unexpected_handler) noexcept; - - - - unexpected_handler get_unexpected() noexcept; - - - - - void unexpected() __attribute__ ((__noreturn__)); -# 101 "/usr/include/c++/9.2.0/exception" 3 - - bool uncaught_exception() noexcept __attribute__ ((__pure__)); - - - - - int uncaught_exceptions() noexcept __attribute__ ((__pure__)); - - - -} - -namespace __gnu_cxx -{ - -# 133 "/usr/include/c++/9.2.0/exception" 3 - void __verbose_terminate_handler(); - - -} - -} - -#pragma GCC visibility pop - - -# 1 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 1 3 -# 34 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 3 -#pragma GCC visibility push(default) - - -# 1 "/usr/include/c++/9.2.0/bits/exception_defines.h" 1 3 -# 38 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/cxxabi_init_exception.h" 1 3 -# 34 "/usr/include/c++/9.2.0/bits/cxxabi_init_exception.h" 3 - -# 35 "/usr/include/c++/9.2.0/bits/cxxabi_init_exception.h" 3 - -#pragma GCC visibility push(default) - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 3 4 -typedef long int ptrdiff_t; -# 415 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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)))); -# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 3 4 -} max_align_t; - - - - - - - typedef decltype(nullptr) nullptr_t; -# 39 "/usr/include/c++/9.2.0/bits/cxxabi_init_exception.h" 2 3 -# 50 "/usr/include/c++/9.2.0/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 -# 39 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 2 3 -# 1 "/usr/include/c++/9.2.0/typeinfo" 1 3 -# 32 "/usr/include/c++/9.2.0/typeinfo" 3 - -# 33 "/usr/include/c++/9.2.0/typeinfo" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/hash_bytes.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/hash_bytes.h" 3 - -# 34 "/usr/include/c++/9.2.0/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++/9.2.0/typeinfo" 2 3 - - -#pragma GCC visibility push(default) - -extern "C++" { - -namespace __cxxabiv1 -{ - class __class_type_info; -} -# 80 "/usr/include/c++/9.2.0/typeinfo" 3 -namespace std -{ - - - - - - - class type_info - { - public: - - - - - virtual ~type_info(); - - - - const char* name() const noexcept - { return __name[0] == '*' ? __name + 1 : __name; } -# 115 "/usr/include/c++/9.2.0/typeinfo" 3 - bool before(const type_info& __arg) const noexcept - { return (__name[0] == '*' && __arg.__name[0] == '*') - ? __name < __arg.__name - : __builtin_strcmp (__name, __arg.__name) < 0; } - - bool operator==(const type_info& __arg) const noexcept - { - return ((__name == __arg.__name) - || (__name[0] != '*' && - __builtin_strcmp (__name, __arg.__name) == 0)); - } -# 136 "/usr/include/c++/9.2.0/typeinfo" 3 - 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&); - type_info(const type_info&); - }; - - - - - - - - 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 -# 40 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 2 3 -# 1 "/usr/include/c++/9.2.0/new" 1 3 -# 37 "/usr/include/c++/9.2.0/new" 3 - -# 38 "/usr/include/c++/9.2.0/new" 3 - - -# 1 "/usr/include/c++/9.2.0/exception" 1 3 -# 41 "/usr/include/c++/9.2.0/new" 2 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(); - }; - - - - - - - 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; - -} -# 125 "/usr/include/c++/9.2.0/new" 3 - void* operator new(std::size_t) - __attribute__((__externally_visible__)); - 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__)); - - void* operator new(std::size_t, const std::nothrow_t&) noexcept - __attribute__((__externally_visible__, __malloc__)); - void* operator new[](std::size_t, const std::nothrow_t&) noexcept - __attribute__((__externally_visible__, __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__)); -# 173 "/usr/include/c++/9.2.0/new" 3 - inline void* operator new(std::size_t, void* __p) noexcept -{ return __p; } - 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 { } - -} -# 226 "/usr/include/c++/9.2.0/new" 3 -#pragma GCC visibility pop -# 41 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 2 3 - -extern "C++" { - -namespace std -{ - class type_info; - - - - - - namespace __exception_ptr - { - class exception_ptr; - } - - using __exception_ptr::exception_ptr; - - - - - - exception_ptr current_exception() noexcept; - - template<typename _Ex> - exception_ptr make_exception_ptr(_Ex) noexcept; - - - void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); - - namespace __exception_ptr - { - using std::rethrow_exception; - - - - - - class exception_ptr - { - void* _M_exception_object; - - explicit exception_ptr(void* __e) noexcept; - - void _M_addref() noexcept; - void _M_release() noexcept; - - void *_M_get() const noexcept __attribute__ ((__pure__)); - - friend exception_ptr std::current_exception() noexcept; - friend void std::rethrow_exception(exception_ptr); - template<typename _Ex> - friend exception_ptr std::make_exception_ptr(_Ex) noexcept; - - public: - exception_ptr() noexcept; - - exception_ptr(const exception_ptr&) noexcept; - - - exception_ptr(nullptr_t) noexcept - : _M_exception_object(0) - { } - - exception_ptr(exception_ptr&& __o) noexcept - : _M_exception_object(__o._M_exception_object) - { __o._M_exception_object = 0; } -# 117 "/usr/include/c++/9.2.0/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; -# 144 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 3 - explicit operator bool() const - { return _M_exception_object; } - - - friend bool - operator==(const exception_ptr&, const exception_ptr&) - noexcept __attribute__ ((__pure__)); - - const class std::type_info* - __cxa_exception_type() const noexcept - __attribute__ ((__pure__)); - }; - - bool - operator==(const exception_ptr&, const exception_ptr&) - noexcept __attribute__ ((__pure__)); - - bool - operator!=(const exception_ptr&, const exception_ptr&) - noexcept __attribute__ ((__pure__)); - - inline void - swap(exception_ptr& __lhs, exception_ptr& __rhs) - { __lhs.swap(__rhs); } - - template<typename _Ex> - inline void - __dest_thunk(void* __x) - { static_cast<_Ex*>(__x)->~_Ex(); } - - } - - - template<typename _Ex> - exception_ptr - make_exception_ptr(_Ex __ex) noexcept - { - - void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); - (void) __cxxabiv1::__cxa_init_primary_exception( - __e, const_cast<std::type_info*>(&typeid(__ex)), - __exception_ptr::__dest_thunk<_Ex>); - try - { - ::new (__e) _Ex(__ex); - return exception_ptr(__e); - } - catch(...) - { - __cxxabiv1::__cxa_free_exception(__e); - return current_exception(); - } -# 208 "/usr/include/c++/9.2.0/bits/exception_ptr.h" 3 - } - - -} - -} - -#pragma GCC visibility pop -# 144 "/usr/include/c++/9.2.0/exception" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/nested_exception.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/nested_exception.h" 3 -#pragma GCC visibility push(default) - - - - - - -# 1 "/usr/include/c++/9.2.0/bits/move.h" 1 3 -# 34 "/usr/include/c++/9.2.0/bits/move.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/concept_check.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/concept_check.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/concept_check.h" 3 -# 35 "/usr/include/c++/9.2.0/bits/move.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - template<typename _Tp> - inline constexpr _Tp* - __addressof(_Tp& __r) noexcept - { return __builtin_addressof(__r); } - - - - -} - -# 1 "/usr/include/c++/9.2.0/type_traits" 1 3 -# 32 "/usr/include/c++/9.2.0/type_traits" 3 - -# 33 "/usr/include/c++/9.2.0/type_traits" 3 - - - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 56 "/usr/include/c++/9.2.0/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; } - - }; - - template<typename _Tp, _Tp __v> - constexpr _Tp integral_constant<_Tp, __v>::value; - - - typedef integral_constant<bool, true> true_type; - - - typedef integral_constant<bool, false> false_type; - - template<bool __v> - using __bool_constant = integral_constant<bool, __v>; -# 91 "/usr/include/c++/9.2.0/type_traits" 3 - template<bool, typename, typename> - struct conditional; - - template<typename...> - struct __or_; - - template<> - struct __or_<> - : public false_type - { }; - - template<typename _B1> - struct __or_<_B1> - : public _B1 - { }; - - template<typename _B1, typename _B2> - struct __or_<_B1, _B2> - : public conditional<_B1::value, _B1, _B2>::type - { }; - - template<typename _B1, typename _B2, typename _B3, typename... _Bn> - struct __or_<_B1, _B2, _B3, _Bn...> - : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type - { }; - - template<typename...> - struct __and_; - - template<> - struct __and_<> - : public true_type - { }; - - template<typename _B1> - struct __and_<_B1> - : public _B1 - { }; - - template<typename _B1, typename _B2> - struct __and_<_B1, _B2> - : public conditional<_B1::value, _B2, _B1>::type - { }; - - template<typename _B1, typename _B2, typename _B3, typename... _Bn> - struct __and_<_B1, _B2, _B3, _Bn...> - : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type - { }; - - template<typename _Pp> - struct __not_ - : public __bool_constant<!bool(_Pp::value)> - { }; -# 185 "/usr/include/c++/9.2.0/type_traits" 3 - template<typename _Tp> - struct __success_type - { typedef _Tp type; }; - - struct __failure_type - { }; - - - - template<typename> - struct remove_cv; - - template<typename> - struct __is_void_helper - : public false_type { }; - - template<> - struct __is_void_helper<void> - : public true_type { }; - - - template<typename _Tp> - struct is_void - : public __is_void_helper<typename remove_cv<_Tp>::type>::type - { }; - - template<typename> - struct __is_integral_helper - : public false_type { }; - - template<> - struct __is_integral_helper<bool> - : public true_type { }; - - template<> - struct __is_integral_helper<char> - : public true_type { }; - - template<> - struct __is_integral_helper<signed char> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned char> - : public true_type { }; - - - template<> - struct __is_integral_helper<wchar_t> - : public true_type { }; -# 243 "/usr/include/c++/9.2.0/type_traits" 3 - template<> - struct __is_integral_helper<char16_t> - : public true_type { }; - - template<> - struct __is_integral_helper<char32_t> - : public true_type { }; - - template<> - struct __is_integral_helper<short> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned short> - : public true_type { }; - - template<> - struct __is_integral_helper<int> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned int> - : public true_type { }; - - template<> - struct __is_integral_helper<long> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned long> - : public true_type { }; - - template<> - struct __is_integral_helper<long long> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned long long> - : public true_type { }; - - - - - template<> - struct __is_integral_helper<__int128> - : public true_type { }; - - template<> - struct __is_integral_helper<unsigned __int128> - : public true_type { }; -# 323 "/usr/include/c++/9.2.0/type_traits" 3 - template<typename _Tp> - struct is_integral - : public __is_integral_helper<typename remove_cv<_Tp>::type>::type - { }; - - template<typename> - struct __is_floating_point_helper - : public false_type { }; - - template<> - struct __is_floating_point_helper<float> - : public true_type { }; - - template<> - struct __is_floating_point_helper<double> - : public true_type { }; - - template<> - struct __is_floating_point_helper<long double> - : public true_type { }; - - - template<> - struct __is_floating_point_helper<__float128> - : public true_type { }; - - - - template<typename _Tp> - struct is_floating_point - : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::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<typename remove_cv<_Tp>::type>::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_function; - - template<typename> - struct __is_member_object_pointer_helper - : public false_type { }; - - template<typename _Tp, typename _Cp> - struct __is_member_object_pointer_helper<_Tp _Cp::*> - : public __not_<is_function<_Tp>>::type { }; - - - template<typename _Tp> - struct is_member_object_pointer - : public __is_member_object_pointer_helper< - typename remove_cv<_Tp>::type>::type - { }; - - template<typename> - struct __is_member_function_pointer_helper - : public false_type { }; - - template<typename _Tp, typename _Cp> - struct __is_member_function_pointer_helper<_Tp _Cp::*> - : public is_function<_Tp>::type { }; - - - template<typename _Tp> - struct is_member_function_pointer - : public __is_member_function_pointer_helper< - typename remove_cv<_Tp>::type>::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> - struct is_function - : public false_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) volatile > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) volatile & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) volatile && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) volatile > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) volatile & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) volatile && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const volatile > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const volatile & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes...) const volatile && > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const volatile > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const volatile & > - : public true_type { }; - - template<typename _Res, typename... _ArgTypes > - struct is_function<_Res(_ArgTypes......) const volatile && > - : public true_type { }; - - - - template<typename> - struct __is_null_pointer_helper - : public false_type { }; - - template<> - struct __is_null_pointer_helper<std::nullptr_t> - : public true_type { }; - - - template<typename _Tp> - struct is_null_pointer - : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type - { }; - - - template<typename _Tp> - struct __is_nullptr_t - : public is_null_pointer<_Tp> - { }; - - - - - template<typename _Tp> - struct is_reference - : public __or_<is_lvalue_reference<_Tp>, - is_rvalue_reference<_Tp>>::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<typename remove_cv<_Tp>::type>::type - { }; - - - - template<typename _Tp> - struct __is_referenceable - : public __or_<is_object<_Tp>, is_reference<_Tp>>::type - { }; - - template<typename _Res, typename... _Args > - struct __is_referenceable<_Res(_Args...) > - : public true_type - { }; - - template<typename _Res, typename... _Args > - struct __is_referenceable<_Res(_Args......) > - : public true_type - { }; - - - - - 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)> - { }; - - - template<typename _Tp> - struct is_trivially_copyable - : public integral_constant<bool, __is_trivially_copyable(_Tp)> - { }; - - - template<typename _Tp> - struct is_standard_layout - : public integral_constant<bool, __is_standard_layout(_Tp)> - { }; - - - - template<typename _Tp> - struct is_pod - : public integral_constant<bool, __is_pod(_Tp)> - { }; - - - template<typename _Tp> - struct is_literal_type - : public integral_constant<bool, __is_literal_type(_Tp)> - { }; - - - 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>>> - { }; -# 758 "/usr/include/c++/9.2.0/type_traits" 3 - template<typename _Tp, typename _Up = _Tp&&> - _Up - __declval(int); - - template<typename _Tp> - _Tp - __declval(long); - - template<typename _Tp> - auto declval() noexcept -> decltype(__declval<_Tp>(0)); - - template<typename, unsigned = 0> - struct extent; - - template<typename> - struct remove_all_extents; - - template<typename _Tp> - struct __is_array_known_bounds - : public integral_constant<bool, (extent<_Tp>::value > 0)> - { }; - - template<typename _Tp> - struct __is_array_unknown_bounds - : public __and_<is_array<_Tp>, __not_<extent<_Tp>>> - { }; - - - - - - - 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 - { }; - - - - - - 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 - { }; - - - template<typename _Tp, typename... _Args> - struct is_constructible - : public __bool_constant<__is_constructible(_Tp, _Args...)> - { }; - - - template<typename _Tp> - struct is_default_constructible - : public is_constructible<_Tp>::type - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_copy_constructible_impl; - - template<typename _Tp> - struct __is_copy_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_copy_constructible_impl<_Tp, true> - : public is_constructible<_Tp, const _Tp&> - { }; - - - template<typename _Tp> - struct is_copy_constructible - : public __is_copy_constructible_impl<_Tp> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_move_constructible_impl; - - template<typename _Tp> - struct __is_move_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_move_constructible_impl<_Tp, true> - : public is_constructible<_Tp, _Tp&&> - { }; - - - template<typename _Tp> - struct is_move_constructible - : public __is_move_constructible_impl<_Tp> - { }; - - template<typename _Tp> - struct __is_nt_default_constructible_atom - : public integral_constant<bool, noexcept(_Tp())> - { }; - - template<typename _Tp, bool = is_array<_Tp>::value> - struct __is_nt_default_constructible_impl; - - template<typename _Tp> - struct __is_nt_default_constructible_impl<_Tp, true> - : public __and_<__is_array_known_bounds<_Tp>, - __is_nt_default_constructible_atom<typename - remove_all_extents<_Tp>::type>> - { }; - - template<typename _Tp> - struct __is_nt_default_constructible_impl<_Tp, false> - : public __is_nt_default_constructible_atom<_Tp> - { }; - - - template<typename _Tp> - struct is_nothrow_default_constructible - : public __and_<is_default_constructible<_Tp>, - __is_nt_default_constructible_impl<_Tp>> - { }; - - template<typename _Tp, typename... _Args> - struct __is_nt_constructible_impl - : public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))> - { }; - - template<typename _Tp, typename _Arg> - struct __is_nt_constructible_impl<_Tp, _Arg> - : public integral_constant<bool, - noexcept(static_cast<_Tp>(declval<_Arg>()))> - { }; - - template<typename _Tp> - struct __is_nt_constructible_impl<_Tp> - : public is_nothrow_default_constructible<_Tp> - { }; - - - template<typename _Tp, typename... _Args> - struct is_nothrow_constructible - : public __and_<is_constructible<_Tp, _Args...>, - __is_nt_constructible_impl<_Tp, _Args...>> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_nothrow_copy_constructible_impl; - - template<typename _Tp> - struct __is_nothrow_copy_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_nothrow_copy_constructible_impl<_Tp, true> - : public is_nothrow_constructible<_Tp, const _Tp&> - { }; - - - template<typename _Tp> - struct is_nothrow_copy_constructible - : public __is_nothrow_copy_constructible_impl<_Tp> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_nothrow_move_constructible_impl; - - template<typename _Tp> - struct __is_nothrow_move_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_nothrow_move_constructible_impl<_Tp, true> - : public is_nothrow_constructible<_Tp, _Tp&&> - { }; - - - template<typename _Tp> - struct is_nothrow_move_constructible - : public __is_nothrow_move_constructible_impl<_Tp> - { }; - - - template<typename _Tp, typename _Up> - struct is_assignable - : public __bool_constant<__is_assignable(_Tp, _Up)> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_copy_assignable_impl; - - template<typename _Tp> - struct __is_copy_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_copy_assignable_impl<_Tp, true> - : public is_assignable<_Tp&, const _Tp&> - { }; - - - template<typename _Tp> - struct is_copy_assignable - : public __is_copy_assignable_impl<_Tp> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_move_assignable_impl; - - template<typename _Tp> - struct __is_move_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_move_assignable_impl<_Tp, true> - : public is_assignable<_Tp&, _Tp&&> - { }; - - - template<typename _Tp> - struct is_move_assignable - : public __is_move_assignable_impl<_Tp> - { }; - - template<typename _Tp, typename _Up> - struct __is_nt_assignable_impl - : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())> - { }; - - - template<typename _Tp, typename _Up> - struct is_nothrow_assignable - : public __and_<is_assignable<_Tp, _Up>, - __is_nt_assignable_impl<_Tp, _Up>> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_nt_copy_assignable_impl; - - template<typename _Tp> - struct __is_nt_copy_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_nt_copy_assignable_impl<_Tp, true> - : public is_nothrow_assignable<_Tp&, const _Tp&> - { }; - - - template<typename _Tp> - struct is_nothrow_copy_assignable - : public __is_nt_copy_assignable_impl<_Tp> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_nt_move_assignable_impl; - - template<typename _Tp> - struct __is_nt_move_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_nt_move_assignable_impl<_Tp, true> - : public is_nothrow_assignable<_Tp&, _Tp&&> - { }; - - - template<typename _Tp> - struct is_nothrow_move_assignable - : public __is_nt_move_assignable_impl<_Tp> - { }; - - - template<typename _Tp, typename... _Args> - struct is_trivially_constructible - : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> - { }; - - - template<typename _Tp> - struct is_trivially_default_constructible - : public is_trivially_constructible<_Tp>::type - { }; - - struct __do_is_implicitly_default_constructible_impl - { - template <typename _Tp> - static void __helper(const _Tp&); - - template <typename _Tp> - static true_type __test(const _Tp&, - decltype(__helper<const _Tp&>({}))* = 0); - - static false_type __test(...); - }; - - template<typename _Tp> - struct __is_implicitly_default_constructible_impl - : public __do_is_implicitly_default_constructible_impl - { - typedef decltype(__test(declval<_Tp>())) type; - }; - - template<typename _Tp> - struct __is_implicitly_default_constructible_safe - : public __is_implicitly_default_constructible_impl<_Tp>::type - { }; - - template <typename _Tp> - struct __is_implicitly_default_constructible - : public __and_<is_default_constructible<_Tp>, - __is_implicitly_default_constructible_safe<_Tp>> - { }; - - - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_trivially_copy_constructible_impl; - - template<typename _Tp> - struct __is_trivially_copy_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_trivially_copy_constructible_impl<_Tp, true> - : public __and_<is_copy_constructible<_Tp>, - integral_constant<bool, - __is_trivially_constructible(_Tp, const _Tp&)>> - { }; - - template<typename _Tp> - struct is_trivially_copy_constructible - : public __is_trivially_copy_constructible_impl<_Tp> - { }; - - - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_trivially_move_constructible_impl; - - template<typename _Tp> - struct __is_trivially_move_constructible_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_trivially_move_constructible_impl<_Tp, true> - : public __and_<is_move_constructible<_Tp>, - integral_constant<bool, - __is_trivially_constructible(_Tp, _Tp&&)>> - { }; - - template<typename _Tp> - struct is_trivially_move_constructible - : public __is_trivially_move_constructible_impl<_Tp> - { }; - - - template<typename _Tp, typename _Up> - struct is_trivially_assignable - : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> - { }; - - - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_trivially_copy_assignable_impl; - - template<typename _Tp> - struct __is_trivially_copy_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_trivially_copy_assignable_impl<_Tp, true> - : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> - { }; - - template<typename _Tp> - struct is_trivially_copy_assignable - : public __is_trivially_copy_assignable_impl<_Tp> - { }; - - - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __is_trivially_move_assignable_impl; - - template<typename _Tp> - struct __is_trivially_move_assignable_impl<_Tp, false> - : public false_type { }; - - template<typename _Tp> - struct __is_trivially_move_assignable_impl<_Tp, true> - : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> - { }; - - template<typename _Tp> - struct is_trivially_move_assignable - : public __is_trivially_move_assignable_impl<_Tp> - { }; - - - template<typename _Tp> - struct is_trivially_destructible - : public __and_<is_destructible<_Tp>, - __bool_constant<__has_trivial_destructor(_Tp)>> - { }; - - - - template<typename _Tp> - struct has_virtual_destructor - : public integral_constant<bool, __has_virtual_destructor(_Tp)> - { }; - - - - - - template<typename _Tp> - struct alignment_of - : public integral_constant<std::size_t, alignof(_Tp)> { }; - - - 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> - struct extent - : public integral_constant<std::size_t, 0> { }; - - template<typename _Tp, unsigned _Uint, std::size_t _Size> - struct extent<_Tp[_Size], _Uint> - : public integral_constant<std::size_t, - _Uint == 0 ? _Size : extent<_Tp, - _Uint - 1>::value> - { }; - - template<typename _Tp, unsigned _Uint> - struct extent<_Tp[], _Uint> - : public integral_constant<std::size_t, - _Uint == 0 ? 0 : extent<_Tp, - _Uint - 1>::value> - { }; - - - - - - template<typename, typename> - struct is_same - : public false_type { }; - - template<typename _Tp> - struct is_same<_Tp, _Tp> - : public true_type { }; - - - template<typename _Base, typename _Derived> - struct is_base_of - : public integral_constant<bool, __is_base_of(_Base, _Derived)> - { }; - - template<typename _From, typename _To, - bool = __or_<is_void<_From>, is_function<_To>, - is_array<_To>>::value> - struct __is_convertible_helper - { - typedef typename is_void<_To>::type type; - }; - - template<typename _From, typename _To> - class __is_convertible_helper<_From, _To, false> - { - template<typename _To1> - static void __test_aux(_To1) noexcept; - - template<typename _From1, typename _To1, - typename = decltype(__test_aux<_To1>(std::declval<_From1>()))> - static true_type - __test(int); - - template<typename, typename> - static false_type - __test(...); - - public: - typedef decltype(__test<_From, _To>(0)) type; - }; - - - - template<typename _From, typename _To> - struct is_convertible - : public __is_convertible_helper<_From, _To>::type - { }; -# 1380 "/usr/include/c++/9.2.0/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 - { - typedef typename - remove_const<typename remove_volatile<_Tp>::type>::type type; - }; - - - template<typename _Tp> - struct add_const - { typedef _Tp const type; }; - - - template<typename _Tp> - struct add_volatile - { typedef _Tp volatile type; }; - - - template<typename _Tp> - struct add_cv - { - typedef typename - add_const<typename add_volatile<_Tp>::type>::type type; - }; - - - - - - - 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 - { typedef _Tp type; }; - - template<typename _Tp> - struct remove_reference<_Tp&> - { typedef _Tp type; }; - - template<typename _Tp> - struct remove_reference<_Tp&&> - { typedef _Tp type; }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __add_lvalue_reference_helper - { typedef _Tp type; }; - - template<typename _Tp> - struct __add_lvalue_reference_helper<_Tp, true> - { typedef _Tp& type; }; - - - template<typename _Tp> - struct add_lvalue_reference - : public __add_lvalue_reference_helper<_Tp> - { }; - - template<typename _Tp, bool = __is_referenceable<_Tp>::value> - struct __add_rvalue_reference_helper - { typedef _Tp type; }; - - template<typename _Tp> - struct __add_rvalue_reference_helper<_Tp, true> - { typedef _Tp&& type; }; - - - template<typename _Tp> - struct add_rvalue_reference - : public __add_rvalue_reference_helper<_Tp> - { }; - - - - template<typename _Tp> - using remove_reference_t = typename remove_reference<_Tp>::type; - - - template<typename _Tp> - using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; - - - template<typename _Tp> - using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; - - - - - - template<typename _Unqualified, bool _IsConst, bool _IsVol> - struct __cv_selector; - - template<typename _Unqualified> - struct __cv_selector<_Unqualified, false, false> - { typedef _Unqualified __type; }; - - template<typename _Unqualified> - struct __cv_selector<_Unqualified, false, true> - { typedef volatile _Unqualified __type; }; - - template<typename _Unqualified> - struct __cv_selector<_Unqualified, true, false> - { typedef const _Unqualified __type; }; - - template<typename _Unqualified> - struct __cv_selector<_Unqualified, true, true> - { typedef const volatile _Unqualified __type; }; - - template<typename _Qualified, typename _Unqualified, - bool _IsConst = is_const<_Qualified>::value, - bool _IsVol = is_volatile<_Qualified>::value> - class __match_cv_qualifiers - { - typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; - - public: - typedef typename __match::__type __type; - }; - - - template<typename _Tp> - struct __make_unsigned - { typedef _Tp __type; }; - - template<> - struct __make_unsigned<char> - { typedef unsigned char __type; }; - - template<> - struct __make_unsigned<signed char> - { typedef unsigned char __type; }; - - template<> - struct __make_unsigned<short> - { typedef unsigned short __type; }; - - template<> - struct __make_unsigned<int> - { typedef unsigned int __type; }; - - template<> - struct __make_unsigned<long> - { typedef unsigned long __type; }; - - template<> - struct __make_unsigned<long long> - { typedef unsigned long long __type; }; - - - template<> - struct __make_unsigned<__int128> - { typedef unsigned __int128 __type; }; -# 1593 "/usr/include/c++/9.2.0/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<typename remove_cv<_Tp>::type>::__type; - - public: - using __type - = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; - }; - - class __make_unsigned_selector_base - { - protected: - template<typename...> struct _List { }; - - template<typename _Tp, typename... _Up> - struct _List<_Tp, _Up...> : _List<_Up...> - { static constexpr size_t __size = sizeof(_Tp); }; - - template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> - struct __select; - - template<size_t _Sz, typename _Uint, typename... _UInts> - struct __select<_Sz, _List<_Uint, _UInts...>, true> - { using __type = _Uint; }; - - template<size_t _Sz, typename _Uint, typename... _UInts> - struct __select<_Sz, _List<_Uint, _UInts...>, false> - : __select<_Sz, _List<_UInts...>> - { }; - }; - - - 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; - }; -# 1669 "/usr/include/c++/9.2.0/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<typename _Tp> - struct __make_signed - { typedef _Tp __type; }; - - template<> - struct __make_signed<char> - { typedef signed char __type; }; - - template<> - struct __make_signed<unsigned char> - { typedef signed char __type; }; - - template<> - struct __make_signed<unsigned short> - { typedef signed short __type; }; - - template<> - struct __make_signed<unsigned int> - { typedef signed int __type; }; - - template<> - struct __make_signed<unsigned long> - { typedef signed long __type; }; - - template<> - struct __make_signed<unsigned long long> - { typedef signed long long __type; }; - - - template<> - struct __make_signed<unsigned __int128> - { typedef __int128 __type; }; -# 1747 "/usr/include/c++/9.2.0/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<typename remove_cv<_Tp>::type>::__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; - }; -# 1795 "/usr/include/c++/9.2.0/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<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, typename remove_cv<_Tp>::type> - { }; - - - template<typename _Tp, bool = __or_<__is_referenceable<_Tp>, - is_void<_Tp>>::value> - struct __add_pointer_helper - { typedef _Tp type; }; - - template<typename _Tp> - struct __add_pointer_helper<_Tp, true> - { typedef typename remove_reference<_Tp>::type* type; }; - - template<typename _Tp> - struct add_pointer - : public __add_pointer_helper<_Tp> - { }; - - - - 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; - }; - }; -# 1930 "/usr/include/c++/9.2.0/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; - }; -# 1969 "/usr/include/c++/9.2.0/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; - - - - template<typename _Up, - bool _IsArray = is_array<_Up>::value, - bool _IsFunction = is_function<_Up>::value> - struct __decay_selector; - - - template<typename _Up> - struct __decay_selector<_Up, false, false> - { typedef typename remove_cv<_Up>::type __type; }; - - template<typename _Up> - struct __decay_selector<_Up, true, false> - { typedef typename remove_extent<_Up>::type* __type; }; - - template<typename _Up> - struct __decay_selector<_Up, false, true> - { typedef typename add_pointer<_Up>::type __type; }; - - - template<typename _Tp> - class decay - { - typedef typename remove_reference<_Tp>::type __remove_type; - - public: - typedef typename __decay_selector<__remove_type>::__type type; - }; - - template<typename _Tp> - class reference_wrapper; - - - template<typename _Tp> - struct __strip_reference_wrapper - { - typedef _Tp __type; - }; - - template<typename _Tp> - struct __strip_reference_wrapper<reference_wrapper<_Tp> > - { - typedef _Tp& __type; - }; - - template<typename _Tp> - struct __decay_and_strip - { - typedef typename __strip_reference_wrapper< - typename decay<_Tp>::type>::__type __type; - }; - - - - - template<bool, typename _Tp = void> - struct enable_if - { }; - - - template<typename _Tp> - struct enable_if<true, _Tp> - { typedef _Tp type; }; - - template<typename... _Cond> - using _Require = typename enable_if<__and_<_Cond...>::value>::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; - - - - struct __do_common_type_impl - { - template<typename _Tp, typename _Up> - static __success_type<typename decay<decltype - (true ? std::declval<_Tp>() - : std::declval<_Up>())>::type> _S_test(int); - - template<typename, typename> - static __failure_type _S_test(...); - }; - - template<typename _Tp, typename _Up> - struct __common_type_impl - : private __do_common_type_impl - { - typedef decltype(_S_test<_Tp, _Up>(0)) type; - }; - - struct __do_member_type_wrapper - { - template<typename _Tp> - static __success_type<typename _Tp::type> _S_test(int); - - template<typename> - static __failure_type _S_test(...); - }; - - template<typename _Tp> - struct __member_type_wrapper - : private __do_member_type_wrapper - { - typedef decltype(_S_test<_Tp>(0)) type; - }; - - template<typename _CTp, typename... _Args> - struct __expanded_common_type_wrapper - { - typedef common_type<typename _CTp::type, _Args...> type; - }; - - template<typename... _Args> - struct __expanded_common_type_wrapper<__failure_type, _Args...> - { typedef __failure_type type; }; - - template<> - struct common_type<> - { }; - - template<typename _Tp> - struct common_type<_Tp> - : common_type<_Tp, _Tp> - { }; - - template<typename _Tp, typename _Up> - struct common_type<_Tp, _Up> - : public __common_type_impl<_Tp, _Up>::type - { }; - - template<typename _Tp, typename _Up, typename... _Vp> - struct common_type<_Tp, _Up, _Vp...> - : public __expanded_common_type_wrapper<typename __member_type_wrapper< - common_type<_Tp, _Up>>::type, _Vp...>::type - { }; - - template<typename _Tp, bool = is_enum<_Tp>::value> - struct __underlying_type_impl - { - using type = __underlying_type(_Tp); - }; - - template<typename _Tp> - struct __underlying_type_impl<_Tp, false> - { }; - - - 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 _Tp> - using __remove_cvref_t - = typename remove_cv<typename remove_reference<_Tp>::type>::type; - - - template<typename _Signature> - class 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<__or_<is_same<_Argval, _Class>, - is_base_of<_Class, _Argval>>::value, - __result_of_memobj_ref<_MemPtr, _Arg>, - __result_of_memobj_deref<_MemPtr, _Arg> - >::type::type type; - }; - - template<typename _MemPtr, typename _Arg, typename... _Args> - struct __result_of_memfun; - - template<typename _Res, typename _Class, typename _Arg, typename... _Args> - struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> - { - typedef typename remove_reference<_Arg>::type _Argval; - typedef _Res _Class::* _MemPtr; - typedef typename conditional<is_base_of<_Class, _Argval>::value, - __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, - __result_of_memfun_deref<_MemPtr, _Arg, _Args...> - >::type::type type; - }; - - - - - - - template<typename _Tp, typename _Up = __remove_cvref_t<_Tp>> - struct __inv_unwrap - { - using type = _Tp; - }; - - template<typename _Tp, typename _Up> - struct __inv_unwrap<_Tp, reference_wrapper<_Up>> - { - using type = _Up&; - }; - - template<bool, bool, typename _Functor, typename... _ArgTypes> - struct __result_of_impl - { - typedef __failure_type type; - }; - - template<typename _MemPtr, typename _Arg> - struct __result_of_impl<true, false, _MemPtr, _Arg> - : public __result_of_memobj<typename decay<_MemPtr>::type, - typename __inv_unwrap<_Arg>::type> - { }; - - template<typename _MemPtr, typename _Arg, typename... _Args> - struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...> - : public __result_of_memfun<typename decay<_MemPtr>::type, - typename __inv_unwrap<_Arg>::type, _Args...> - { }; - - - 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...> - { }; - - - - 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; - - - 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<bool _Cond, typename _Tp = void> - using __enable_if_t = typename enable_if<_Cond, _Tp>::type; - - - template<typename...> using __void_t = void; - - - - - template<typename...> using void_t = void; - - - - template<typename _Default, typename _AlwaysVoid, - template<typename...> class _Op, typename... _Args> - struct __detector - { - using value_t = false_type; - using type = _Default; - }; - - - template<typename _Default, template<typename...> class _Op, - typename... _Args> - struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> - { - using value_t = true_type; - using type = _Op<_Args...>; - }; - - - 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; -# 2461 "/usr/include/c++/9.2.0/type_traits" 3 - template <typename _Tp> - struct __is_swappable; - - template <typename _Tp> - struct __is_nothrow_swappable; - - template<typename... _Elements> - class tuple; - - template<typename> - struct __is_tuple_like_impl : false_type - { }; - - template<typename... _Tps> - struct __is_tuple_like_impl<tuple<_Tps...>> : true_type - { }; - - - template<typename _Tp> - struct __is_tuple_like - : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type - { }; - - template<typename _Tp> - inline - typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, - is_move_constructible<_Tp>, - is_move_assignable<_Tp>>::value>::type - swap(_Tp&, _Tp&) - noexcept(__and_<is_nothrow_move_constructible<_Tp>, - is_nothrow_move_assignable<_Tp>>::value); - - template<typename _Tp, size_t _Nm> - inline - typename enable_if<__is_swappable<_Tp>::value>::type - swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) - noexcept(__is_nothrow_swappable<_Tp>::value); - - namespace __swappable_details { - using std::swap; - - struct __do_is_swappable_impl - { - template<typename _Tp, typename - = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))> - static true_type __test(int); - - template<typename> - static false_type __test(...); - }; - - struct __do_is_nothrow_swappable_impl - { - template<typename _Tp> - static __bool_constant< - noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) - > __test(int); - - template<typename> - static false_type __test(...); - }; - - } - - 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 - { }; - - - template<typename _Tp> - struct is_nothrow_swappable - : public __is_nothrow_swappable_impl<_Tp>::type - { }; - - - - template<typename _Tp> - constexpr bool is_swappable_v = - is_swappable<_Tp>::value; - - - template<typename _Tp> - 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 - { }; - - - template<typename _Tp, typename _Up> - struct is_nothrow_swappable_with - : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type - { }; - - - - template<typename _Tp, typename _Up> - constexpr bool is_swappable_with_v = - is_swappable_with<_Tp, _Up>::value; - - - template<typename _Tp, typename _Up> - constexpr bool is_nothrow_swappable_with_v = - is_nothrow_swappable_with<_Tp, _Up>::value; - - - - - - - template<typename _Result, typename _Ret, typename = void> - struct __is_invocable_impl : false_type { }; - - template<typename _Result, typename _Ret> - struct __is_invocable_impl<_Result, _Ret, __void_t<typename _Result::type>> - : __or_<is_void<_Ret>, is_convertible<typename _Result::type, _Ret>>::type - { }; - - 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 - { }; - - struct __nonesuch { - __nonesuch() = delete; - ~__nonesuch() = delete; - __nonesuch(__nonesuch const&) = delete; - void operator=(__nonesuch const&) = delete; - }; -# 3062 "/usr/include/c++/9.2.0/type_traits" 3 - -} -# 56 "/usr/include/c++/9.2.0/bits/move.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 72 "/usr/include/c++/9.2.0/bits/move.h" 3 - template<typename _Tp> - constexpr _Tp&& - forward(typename std::remove_reference<_Tp>::type& __t) noexcept - { return static_cast<_Tp&&>(__t); } - - - - - - - - template<typename _Tp> - constexpr _Tp&& - forward(typename std::remove_reference<_Tp>::type&& __t) noexcept - { - static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" - " substituting _Tp is an lvalue reference type"); - return static_cast<_Tp&&>(__t); - } - - - - - - - template<typename _Tp> - constexpr typename std::remove_reference<_Tp>::type&& - move(_Tp&& __t) noexcept - { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); } - - - template<typename _Tp> - struct __move_if_noexcept_cond - : public __and_<__not_<is_nothrow_move_constructible<_Tp>>, - is_copy_constructible<_Tp>>::type { }; -# 116 "/usr/include/c++/9.2.0/bits/move.h" 3 - template<typename _Tp> - constexpr typename - conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type - move_if_noexcept(_Tp& __x) noexcept - { return std::move(__x); } -# 136 "/usr/include/c++/9.2.0/bits/move.h" 3 - template<typename _Tp> - inline _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; - } -# 176 "/usr/include/c++/9.2.0/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]); - } - - - -} -# 41 "/usr/include/c++/9.2.0/bits/nested_exception.h" 2 3 - -extern "C++" { - -namespace std -{ - - - - - - - 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)) - { } - }; - - - - - template<typename _Tp> - [[noreturn]] - inline void - __throw_with_nested_impl(_Tp&& __t, true_type) - { - using _Up = typename remove_reference<_Tp>::type; - throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; - } - - template<typename _Tp> - [[noreturn]] - inline void - __throw_with_nested_impl(_Tp&& __t, false_type) - { throw std::forward<_Tp>(__t); } - - - - template<typename _Tp> - [[noreturn]] - inline void - throw_with_nested(_Tp&& __t) - { - using _Up = typename decay<_Tp>::type; - using _CopyConstructible - = __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>; - static_assert(_CopyConstructible::value, - "throw_with_nested argument must be CopyConstructible"); - using __nest = __and_<is_class<_Up>, __bool_constant<!__is_final(_Up)>, - __not_<is_base_of<nested_exception, _Up>>>; - std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); - } - - - template<typename _Tp> - using __rethrow_if_nested_cond = typename enable_if< - __and_<is_polymorphic<_Tp>, - __or_<__not_<is_base_of<nested_exception, _Tp>>, - is_convertible<_Tp*, nested_exception*>>>::value - >::type; - - - template<typename _Ex> - inline __rethrow_if_nested_cond<_Ex> - __rethrow_if_nested_impl(const _Ex* __ptr) - { - if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr)) - __ne_ptr->rethrow_nested(); - } - - - inline void - __rethrow_if_nested_impl(const void*) - { } - - - template<typename _Ex> - inline void - rethrow_if_nested(const _Ex& __ex) - { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } - - -} - -} - - - -#pragma GCC visibility pop -# 145 "/usr/include/c++/9.2.0/exception" 2 3 -# 40 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/char_traits.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/char_traits.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/char_traits.h" 3 - -# 1 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 1 3 -# 60 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/functexcept.h" 1 3 -# 42 "/usr/include/c++/9.2.0/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_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__)); - - -} -# 61 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/cpp_type_traits.h" 1 3 -# 35 "/usr/include/c++/9.2.0/bits/cpp_type_traits.h" 3 - -# 36 "/usr/include/c++/9.2.0/bits/cpp_type_traits.h" 3 -# 67 "/usr/include/c++/9.2.0/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++/9.2.0/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; - }; -# 270 "/usr/include/c++/9.2.0/bits/cpp_type_traits.h" 3 -template<> struct __is_integer<__int128> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned __int128> { enum { __value = 1 }; typedef __true_type __type; }; -# 287 "/usr/include/c++/9.2.0/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; - }; - - - - - 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; - }; -# 417 "/usr/include/c++/9.2.0/bits/cpp_type_traits.h" 3 - 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; } - - -} -} -# 62 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/ext/type_traits.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/type_traits.h" 3 - -# 33 "/usr/include/c++/9.2.0/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> - inline bool - __is_null_pointer(_Type* __ptr) - { return __ptr == 0; } - - template<typename _Type> - inline bool - __is_null_pointer(_Type) - { return false; } - - - inline 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; }; - - template<typename _Tp, typename _Up, - typename _Tp2 = typename __promote<_Tp>::__type, - typename _Up2 = typename __promote<_Up>::__type> - struct __promote_2 - { - typedef __typeof__(_Tp2() + _Up2()) __type; - }; - - template<typename _Tp, typename _Up, typename _Vp, - typename _Tp2 = typename __promote<_Tp>::__type, - typename _Up2 = typename __promote<_Up>::__type, - typename _Vp2 = typename __promote<_Vp>::__type> - struct __promote_3 - { - typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; - }; - - template<typename _Tp, typename _Up, typename _Vp, typename _Wp, - typename _Tp2 = typename __promote<_Tp>::__type, - typename _Up2 = typename __promote<_Up>::__type, - typename _Vp2 = typename __promote<_Vp>::__type, - typename _Wp2 = typename __promote<_Wp>::__type> - struct __promote_4 - { - typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; - }; - - -} -} -# 63 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/ext/numeric_traits.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/numeric_traits.h" 3 - -# 33 "/usr/include/c++/9.2.0/ext/numeric_traits.h" 3 - - - - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - -# 54 "/usr/include/c++/9.2.0/ext/numeric_traits.h" 3 - template<typename _Value> - struct __numeric_traits_integer - { - - static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); - static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); - - - - static const bool __is_signed = ((_Value)(-1) < 0); - static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 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; -# 99 "/usr/include/c++/9.2.0/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 __conditional_type<std::__is_integer<_Value>::__value, - __numeric_traits_integer<_Value>, - __numeric_traits_floating<_Value> >::__type - { }; - - -} -# 64 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_pair.h" 1 3 -# 65 "/usr/include/c++/9.2.0/bits/stl_pair.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 76 "/usr/include/c++/9.2.0/bits/stl_pair.h" 3 - struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; - - - constexpr piecewise_construct_t piecewise_construct = - piecewise_construct_t(); - - - template<typename...> - class tuple; - - template<std::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 <bool __implicit, typename _U1, typename _U2> - static constexpr bool _CopyMovePair() - { - using __do_converts = __and_<is_convertible<const _U1&, _T1>, - is_convertible<_U2&&, _T2>>; - using __converts = typename conditional<__implicit, - __do_converts, - __not_<__do_converts>>::type; - return __and_<is_constructible<_T1, const _U1&>, - is_constructible<_T2, _U2&&>, - __converts - >::value; - } - - template <bool __implicit, typename _U1, typename _U2> - static constexpr bool _MoveCopyPair() - { - using __do_converts = __and_<is_convertible<_U1&&, _T1>, - is_convertible<const _U2&, _T2>>; - using __converts = typename conditional<__implicit, - __do_converts, - __not_<__do_converts>>::type; - return __and_<is_constructible<_T1, _U1&&>, - is_constructible<_T2, const _U2&&>, - __converts - >::value; - } - }; - - template <typename _T1, typename _T2> - struct _PCC<false, _T1, _T2> - { - template <typename _U1, typename _U2> - static constexpr bool _ConstructiblePair() - { - return false; - } - - template <typename _U1, typename _U2> - static constexpr bool _ImplicitlyConvertiblePair() - { - return false; - } - - template <typename _U1, typename _U2> - static constexpr bool _MoveConstructiblePair() - { - return false; - } - - template <typename _U1, typename _U2> - static constexpr bool _ImplicitlyMoveConvertiblePair() - { - return false; - } - }; - - - - - struct __nonesuch_no_braces : std::__nonesuch { - explicit __nonesuch_no_braces(const __nonesuch&) = delete; - }; - - - 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; - - }; - - - - - - - - template<typename _T1, typename _T2> - struct pair - : private __pair_base<_T1, _T2> - { - typedef _T1 first_type; - typedef _T2 second_type; - - _T1 first; - _T2 second; - - - - - - - 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() { } -# 252 "/usr/include/c++/9.2.0/bits/stl_pair.h" 3 - 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) { } -# 280 "/usr/include/c++/9.2.0/bits/stl_pair.h" 3 - template <typename _U1, typename _U2> - using _PCCFP = _PCC<!is_same<_T1, _U1>::value - || !is_same<_T2, _U2>::value, - _T1, _T2>; - - template<typename _U1, typename _U2, typename - enable_if<_PCCFP<_U1, _U2>::template - _ConstructiblePair<_U1, _U2>() - && _PCCFP<_U1, _U2>::template - _ImplicitlyConvertiblePair<_U1, _U2>(), - bool>::type=true> - constexpr pair(const pair<_U1, _U2>& __p) - : first(__p.first), second(__p.second) { } - - template<typename _U1, typename _U2, typename - enable_if<_PCCFP<_U1, _U2>::template - _ConstructiblePair<_U1, _U2>() - && !_PCCFP<_U1, _U2>::template - _ImplicitlyConvertiblePair<_U1, _U2>(), - bool>::type=false> - explicit constexpr pair(const pair<_U1, _U2>& __p) - : first(__p.first), second(__p.second) { } - - constexpr pair(const pair&) = default; - constexpr pair(pair&&) = default; - - - template<typename _U1, typename - enable_if<_PCCP::template - _MoveCopyPair<true, _U1, _T2>(), - bool>::type=true> - constexpr pair(_U1&& __x, const _T2& __y) - : first(std::forward<_U1>(__x)), second(__y) { } - - template<typename _U1, typename - enable_if<_PCCP::template - _MoveCopyPair<false, _U1, _T2>(), - bool>::type=false> - explicit constexpr pair(_U1&& __x, const _T2& __y) - : first(std::forward<_U1>(__x)), second(__y) { } - - template<typename _U2, typename - enable_if<_PCCP::template - _CopyMovePair<true, _T1, _U2>(), - bool>::type=true> - constexpr pair(const _T1& __x, _U2&& __y) - : first(__x), second(std::forward<_U2>(__y)) { } - - template<typename _U2, typename - enable_if<_PCCP::template - _CopyMovePair<false, _T1, _U2>(), - bool>::type=false> - explicit pair(const _T1& __x, _U2&& __y) - : first(__x), second(std::forward<_U2>(__y)) { } - - template<typename _U1, typename _U2, typename - enable_if<_PCCP::template - _MoveConstructiblePair<_U1, _U2>() - && _PCCP::template - _ImplicitlyMoveConvertiblePair<_U1, _U2>(), - bool>::type=true> - constexpr pair(_U1&& __x, _U2&& __y) - : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } - - template<typename _U1, typename _U2, typename - enable_if<_PCCP::template - _MoveConstructiblePair<_U1, _U2>() - && !_PCCP::template - _ImplicitlyMoveConvertiblePair<_U1, _U2>(), - bool>::type=false> - explicit constexpr pair(_U1&& __x, _U2&& __y) - : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } - - - template<typename _U1, typename _U2, typename - enable_if<_PCCFP<_U1, _U2>::template - _MoveConstructiblePair<_U1, _U2>() - && _PCCFP<_U1, _U2>::template - _ImplicitlyMoveConvertiblePair<_U1, _U2>(), - bool>::type=true> - constexpr pair(pair<_U1, _U2>&& __p) - : first(std::forward<_U1>(__p.first)), - second(std::forward<_U2>(__p.second)) { } - - template<typename _U1, typename _U2, typename - enable_if<_PCCFP<_U1, _U2>::template - _MoveConstructiblePair<_U1, _U2>() - && !_PCCFP<_U1, _U2>::template - _ImplicitlyMoveConvertiblePair<_U1, _U2>(), - bool>::type=false> - explicit constexpr pair(pair<_U1, _U2>&& __p) - : first(std::forward<_U1>(__p.first)), - second(std::forward<_U2>(__p.second)) { } - - template<typename... _Args1, typename... _Args2> - pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); - - pair& - operator=(typename conditional< - __and_<is_copy_assignable<_T1>, - is_copy_assignable<_T2>>::value, - const pair&, const __nonesuch_no_braces&>::type __p) - { - first = __p.first; - second = __p.second; - return *this; - } - - pair& - operator=(typename conditional< - __and_<is_move_assignable<_T1>, - is_move_assignable<_T2>>::value, - pair&&, __nonesuch_no_braces&&>::type __p) - noexcept(__and_<is_nothrow_move_assignable<_T1>, - is_nothrow_move_assignable<_T2>>::value) - { - first = std::forward<first_type>(__p.first); - second = std::forward<second_type>(__p.second); - return *this; - } - - template<typename _U1, typename _U2> - typename enable_if<__and_<is_assignable<_T1&, const _U1&>, - is_assignable<_T2&, const _U2&>>::value, - pair&>::type - operator=(const pair<_U1, _U2>& __p) - { - first = __p.first; - second = __p.second; - return *this; - } - - template<typename _U1, typename _U2> - typename enable_if<__and_<is_assignable<_T1&, _U1&&>, - is_assignable<_T2&, _U2&&>>::value, - pair&>::type - operator=(pair<_U1, _U2>&& __p) - { - first = std::forward<_U1>(__p.first); - second = std::forward<_U2>(__p.second); - return *this; - } - - void - swap(pair& __p) - noexcept(__and_<__is_nothrow_swappable<_T1>, - __is_nothrow_swappable<_T2>>::value) - { - using std::swap; - swap(first, __p.first); - swap(second, __p.second); - } - - private: - template<typename... _Args1, std::size_t... _Indexes1, - typename... _Args2, std::size_t... _Indexes2> - pair(tuple<_Args1...>&, tuple<_Args2...>&, - _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); - - }; - - - - - - - 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; } - - - 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); } - - - - - - 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); } - - - 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; -# 521 "/usr/include/c++/9.2.0/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)); - } -# 540 "/usr/include/c++/9.2.0/bits/stl_pair.h" 3 - -} -# 65 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 1 3 -# 62 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 3 - -# 63 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 3 - - - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 89 "/usr/include/c++/9.2.0/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 { }; -# 116 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 3 - template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, - typename _Pointer = _Tp*, typename _Reference = _Tp&> - struct iterator - { - - typedef _Category iterator_category; - - typedef _Tp value_type; - - typedef _Distance difference_type; - - typedef _Pointer pointer; - - typedef _Reference reference; - }; -# 143 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 3 - 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> { }; -# 177 "/usr/include/c++/9.2.0/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> - inline constexpr - typename iterator_traits<_Iter>::iterator_category - __iterator_category(const _Iter&) - { return typename iterator_traits<_Iter>::iterator_category(); } -# 231 "/usr/include/c++/9.2.0/bits/stl_iterator_base_types.h" 3 - template<typename _InIter> - using _RequireInputIter = typename - enable_if<is_convertible<typename - iterator_traits<_InIter>::iterator_category, - input_iterator_tag>::value>::type; - - - -} -# 66 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_iterator_base_funcs.h" 1 3 -# 62 "/usr/include/c++/9.2.0/bits/stl_iterator_base_funcs.h" 3 - -# 63 "/usr/include/c++/9.2.0/bits/stl_iterator_base_funcs.h" 3 - - -# 1 "/usr/include/c++/9.2.0/debug/assertions.h" 1 3 -# 66 "/usr/include/c++/9.2.0/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> - 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); -# 135 "/usr/include/c++/9.2.0/bits/stl_iterator_base_funcs.h" 3 - template<typename _InputIterator> - inline - 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) - { - - - ; - 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; - } -# 200 "/usr/include/c++/9.2.0/bits/stl_iterator_base_funcs.h" 3 - template<typename _InputIterator, typename _Distance> - inline 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> - inline _InputIterator - next(_InputIterator __x, typename - iterator_traits<_InputIterator>::difference_type __n = 1) - { - - - std::advance(__x, __n); - return __x; - } - - template<typename _BidirectionalIterator> - inline _BidirectionalIterator - prev(_BidirectionalIterator __x, typename - iterator_traits<_BidirectionalIterator>::difference_type __n = 1) - { - - - - std::advance(__x, -__n); - return __x; - } - - - - -} -# 67 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 1 3 -# 66 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/ptr_traits.h" 1 3 -# 37 "/usr/include/c++/9.2.0/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 _Template, typename _Tp, - typename... _Types> - struct __get_first_arg<_Template<_Tp, _Types...>> - { using type = _Tp; }; - - template<typename _Tp> - using __get_first_arg_t = typename __get_first_arg<_Tp>::type; - - - template<typename _Tp, typename _Up> - struct __replace_first_arg - { }; - - template<template<typename, typename...> class _Template, typename _Up, - typename _Tp, typename... _Types> - struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> - { using type = _Template<_Up, _Types...>; }; - - template<typename _Tp, typename _Up> - using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; - - template<typename _Tp> - using __make_not_void - = typename conditional<is_void<_Tp>::value, __undefined, _Tp>::type; - - - - - - template<typename _Ptr> - struct pointer_traits - { - private: - template<typename _Tp> - using __element_type = typename _Tp::element_type; - - template<typename _Tp> - using __difference_type = typename _Tp::difference_type; - - template<typename _Tp, typename _Up, typename = void> - struct __rebind : __replace_first_arg<_Tp, _Up> { }; - - template<typename _Tp, typename _Up> - struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>>> - { using type = typename _Tp::template rebind<_Up>; }; - - public: - - using pointer = _Ptr; - - - using element_type - = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; - - - using difference_type - = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>; - - - template<typename _Up> - using rebind = typename __rebind<_Ptr, _Up>::type; - - static _Ptr - pointer_to(__make_not_void<element_type>& __e) - { return _Ptr::pointer_to(__e); } - - static_assert(!is_same<element_type, __undefined>::value, - "pointer type defines element_type or is like SomePointer<T, Args>"); - }; - - - - - - template<typename _Tp> - struct pointer_traits<_Tp*> - { - - typedef _Tp* pointer; - - typedef _Tp element_type; - - typedef ptrdiff_t difference_type; - - template<typename _Up> - using rebind = _Up*; - - - - - - - static pointer - pointer_to(__make_not_void<element_type>& __r) noexcept - { return std::addressof(__r); } - }; - - - 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->()); } -# 198 "/usr/include/c++/9.2.0/bits/ptr_traits.h" 3 - -} -# 67 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 2 3 -# 76 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 104 "/usr/include/c++/9.2.0/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> - { - protected: - _Iterator current; - - typedef iterator_traits<_Iterator> __traits_type; - - public: - typedef _Iterator iterator_type; - typedef typename __traits_type::difference_type difference_type; - typedef typename __traits_type::pointer pointer; - typedef typename __traits_type::reference reference; -# 130 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - - reverse_iterator() : current() { } - - - - - explicit - reverse_iterator(iterator_type __x) : current(__x) { } - - - - - - reverse_iterator(const reverse_iterator& __x) - : current(__x.current) { } - - - reverse_iterator& operator=(const reverse_iterator&) = default; - - - - - - - template<typename _Iter> - - reverse_iterator(const reverse_iterator<_Iter>& __x) - : current(__x.base()) { } - - - - - iterator_type - base() const - { return current; } -# 176 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - reference - operator*() const - { - _Iterator __tmp = current; - return *--__tmp; - } - - - - - - - pointer - operator->() const - { - - - _Iterator __tmp = current; - --__tmp; - return _S_to_pointer(__tmp); - } - - - - - - - reverse_iterator& - operator++() - { - --current; - return *this; - } - - - - - - - reverse_iterator - operator++(int) - { - reverse_iterator __tmp = *this; - --current; - return __tmp; - } - - - - - - - reverse_iterator& - operator--() - { - ++current; - return *this; - } - - - - - - - reverse_iterator - operator--(int) - { - reverse_iterator __tmp = *this; - ++current; - return __tmp; - } - - - - - - - reverse_iterator - operator+(difference_type __n) const - { return reverse_iterator(current - __n); } - - - - - - - - reverse_iterator& - operator+=(difference_type __n) - { - current -= __n; - return *this; - } - - - - - - - reverse_iterator - operator-(difference_type __n) const - { return reverse_iterator(current + __n); } - - - - - - - - reverse_iterator& - operator-=(difference_type __n) - { - current += __n; - return *this; - } - - - - - - - reference - operator[](difference_type __n) const - { return *(*this + __n); } - - private: - template<typename _Tp> - static _Tp* - _S_to_pointer(_Tp* __p) - { return __p; } - - template<typename _Tp> - static pointer - _S_to_pointer(_Tp __t) - { return __t.operator->(); } - }; -# 323 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Iterator> - inline bool - operator==(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return __x.base() == __y.base(); } - - template<typename _Iterator> - inline bool - operator<(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return __y.base() < __x.base(); } - - template<typename _Iterator> - inline bool - operator!=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return !(__x == __y); } - - template<typename _Iterator> - inline bool - operator>(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return __y < __x; } - - template<typename _Iterator> - inline bool - operator<=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return !(__y < __x); } - - template<typename _Iterator> - inline bool - operator>=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) - { return !(__x < __y); } - - - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator==(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __x.base() == __y.base(); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator<(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __y.base() < __x.base(); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator!=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__x == __y); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator>(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return __y < __x; } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator<=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__y < __x); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator>=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) - { return !(__x < __y); } -# 413 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _IteratorL, typename _IteratorR> - inline 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> - inline 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 reverse_iterator<_Iterator> - __make_reverse_iterator(_Iterator __i) - { return reverse_iterator<_Iterator>(__i); } - - - - - - - - template<typename _Iterator> - inline reverse_iterator<_Iterator> - make_reverse_iterator(_Iterator __i) - { return reverse_iterator<_Iterator>(__i); } - - - - - 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())); } -# 477 "/usr/include/c++/9.2.0/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)) { } -# 512 "/usr/include/c++/9.2.0/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; - } - - - - back_insert_iterator& - operator*() - { return *this; } - - - back_insert_iterator& - operator++() - { return *this; } - - - back_insert_iterator - operator++(int) - { return *this; } - }; -# 554 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Container> - inline back_insert_iterator<_Container> - back_inserter(_Container& __x) - { return back_insert_iterator<_Container>(__x); } -# 569 "/usr/include/c++/9.2.0/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)) { } -# 603 "/usr/include/c++/9.2.0/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; - } - - - - front_insert_iterator& - operator*() - { return *this; } - - - front_insert_iterator& - operator++() - { return *this; } - - - front_insert_iterator - operator++(int) - { return *this; } - }; -# 645 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Container> - inline front_insert_iterator<_Container> - front_inserter(_Container& __x) - { return front_insert_iterator<_Container>(__x); } -# 664 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Container> - class insert_iterator - : public iterator<output_iterator_tag, void, void, void, void> - { - protected: - _Container* container; - typename _Container::iterator iter; - - public: - - typedef _Container container_type; - - - - - - insert_iterator(_Container& __x, typename _Container::iterator __i) - : container(std::__addressof(__x)), iter(__i) {} -# 715 "/usr/include/c++/9.2.0/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; - } - - - - insert_iterator& - operator*() - { return *this; } - - - insert_iterator& - operator++() - { return *this; } - - - insert_iterator& - operator++(int) - { return *this; } - }; -# 760 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Container, typename _Iterator> - inline insert_iterator<_Container> - inserter(_Container& __x, _Iterator __i) - { - return insert_iterator<_Container>(__x, - typename _Container::iterator(__i)); - } - - - - -} - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - -# 784 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - using std::iterator_traits; - using std::iterator; - template<typename _Iterator, typename _Container> - class __normal_iterator - { - protected: - _Iterator _M_current; - - typedef iterator_traits<_Iterator> __traits_type; - - public: - typedef _Iterator iterator_type; - typedef typename __traits_type::iterator_category iterator_category; - typedef typename __traits_type::value_type value_type; - typedef typename __traits_type::difference_type difference_type; - typedef typename __traits_type::reference reference; - typedef typename __traits_type::pointer pointer; - - constexpr __normal_iterator() noexcept - : _M_current(_Iterator()) { } - - explicit - __normal_iterator(const _Iterator& __i) noexcept - : _M_current(__i) { } - - - template<typename _Iter> - __normal_iterator(const __normal_iterator<_Iter, - typename __enable_if< - (std::__are_same<_Iter, typename _Container::pointer>::__value), - _Container>::__type>& __i) noexcept - : _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; } - }; -# 884 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _IteratorL, typename _IteratorR, typename _Container> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - 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> - - - 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> - 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> - 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(); } -# 1030 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - template<typename _Iterator> - class move_iterator - { - protected: - _Iterator _M_current; - - typedef iterator_traits<_Iterator> __traits_type; - typedef typename __traits_type::reference __base_ref; - - public: - typedef _Iterator iterator_type; - typedef typename __traits_type::iterator_category iterator_category; - typedef typename __traits_type::value_type value_type; - typedef typename __traits_type::difference_type difference_type; - - typedef _Iterator pointer; - - - typedef typename conditional<is_reference<__base_ref>::value, - typename remove_reference<__base_ref>::type&&, - __base_ref>::type reference; - - - move_iterator() - : _M_current() { } - - explicit - move_iterator(iterator_type __i) - : _M_current(__i) { } - - template<typename _Iter> - - move_iterator(const move_iterator<_Iter>& __i) - : _M_current(__i.base()) { } - - iterator_type - base() const - { return _M_current; } - - reference - operator*() const - { return static_cast<reference>(*_M_current); } - - pointer - operator->() const - { return _M_current; } - - move_iterator& - operator++() - { - ++_M_current; - return *this; - } - - move_iterator - operator++(int) - { - move_iterator __tmp = *this; - ++_M_current; - return __tmp; - } - - move_iterator& - operator--() - { - --_M_current; - return *this; - } - - move_iterator - operator--(int) - { - move_iterator __tmp = *this; - --_M_current; - return __tmp; - } - - move_iterator - operator+(difference_type __n) const - { return move_iterator(_M_current + __n); } - - move_iterator& - operator+=(difference_type __n) - { - _M_current += __n; - return *this; - } - - move_iterator - operator-(difference_type __n) const - { return move_iterator(_M_current - __n); } - - move_iterator& - operator-=(difference_type __n) - { - _M_current -= __n; - return *this; - } - - reference - operator[](difference_type __n) const - { return std::move(_M_current[__n]); } - }; - - - - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator==(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return __x.base() == __y.base(); } - - template<typename _Iterator> - inline bool - operator==(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return __x.base() == __y.base(); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator!=(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return !(__x == __y); } - - template<typename _Iterator> - inline bool - operator!=(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return !(__x == __y); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator<(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return __x.base() < __y.base(); } - - template<typename _Iterator> - inline bool - operator<(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return __x.base() < __y.base(); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator<=(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return !(__y < __x); } - - template<typename _Iterator> - inline bool - operator<=(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return !(__y < __x); } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator>(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return __y < __x; } - - template<typename _Iterator> - inline bool - operator>(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return __y < __x; } - - template<typename _IteratorL, typename _IteratorR> - inline bool - operator>=(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - { return !(__x < __y); } - - template<typename _Iterator> - inline bool - operator>=(const move_iterator<_Iterator>& __x, - const move_iterator<_Iterator>& __y) - { return !(__x < __y); } - - - template<typename _IteratorL, typename _IteratorR> - inline auto - operator-(const move_iterator<_IteratorL>& __x, - const move_iterator<_IteratorR>& __y) - -> decltype(__x.base() - __y.base()) - { return __x.base() - __y.base(); } - - template<typename _Iterator> - inline move_iterator<_Iterator> - operator+(typename move_iterator<_Iterator>::difference_type __n, - const move_iterator<_Iterator>& __x) - { return __x + __n; } - - template<typename _Iterator> - inline move_iterator<_Iterator> - make_move_iterator(_Iterator __i) - { return move_iterator<_Iterator>(__i); } - - template<typename _Iterator, typename _ReturnType - = typename conditional<__move_if_noexcept_cond - <typename iterator_traits<_Iterator>::value_type>::value, - _Iterator, move_iterator<_Iterator>>::type> - inline _ReturnType - __make_move_if_noexcept_iterator(_Iterator __i) - { return _ReturnType(__i); } - - - - template<typename _Tp, typename _ReturnType - = typename conditional<__move_if_noexcept_cond<_Tp>::value, - const _Tp*, move_iterator<_Tp*>>::type> - inline _ReturnType - __make_move_if_noexcept_iterator(_Tp* __i) - { return _ReturnType(__i); } - - - - 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()); } -# 1295 "/usr/include/c++/9.2.0/bits/stl_iterator.h" 3 - -} -# 68 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 - -# 1 "/usr/include/c++/9.2.0/debug/debug.h" 1 3 -# 48 "/usr/include/c++/9.2.0/debug/debug.h" 3 -namespace std -{ - namespace __debug { } -} - - - - -namespace __gnu_debug -{ - using namespace std::__debug; -} -# 70 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/predefined_ops.h" 1 3 -# 33 "/usr/include/c++/9.2.0/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++/9.2.0/bits/stl_algobase.h" 2 3 - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 121 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - template<typename _ForwardIterator1, typename _ForwardIterator2> - inline void - iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) - { - - - - -# 151 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - swap(*__a, *__b); - - } -# 167 "/usr/include/c++/9.2.0/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; - } -# 195 "/usr/include/c++/9.2.0/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; - } -# 219 "/usr/include/c++/9.2.0/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; - } -# 243 "/usr/include/c++/9.2.0/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; - } -# 265 "/usr/include/c++/9.2.0/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 _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, bool, typename> - 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<> - 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<bool _IsMove> - struct __copy_move<_IsMove, true, random_access_iterator_tag> - { - template<typename _Tp> - static _Tp* - __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) - { - - using __assignable = conditional<_IsMove, - is_move_assignable<_Tp>, - is_copy_assignable<_Tp>>; - - static_assert( __assignable::type::value, "type is not assignable" ); - - const ptrdiff_t _Num = __last - __first; - if (_Num) - __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); - return __result + _Num; - } - }; - - template<bool _IsMove, typename _II, typename _OI> - inline _OI - __copy_move_a(_II __first, _II __last, _OI __result) - { - typedef typename iterator_traits<_II>::value_type _ValueTypeI; - typedef typename iterator_traits<_OI>::value_type _ValueTypeO; - typedef typename iterator_traits<_II>::iterator_category _Category; - const bool __simple = (__is_trivially_copyable(_ValueTypeI) - && __is_pointer<_II>::__value - && __is_pointer<_OI>::__value - && __are_same<_ValueTypeI, _ValueTypeO>::__value); - - return std::__copy_move<_IsMove, __simple, - _Category>::__copy_m(__first, __last, __result); - } - - - - template<typename _CharT> - struct char_traits; - - template<typename _CharT, typename _Traits> - class istreambuf_iterator; - - template<typename _CharT, typename _Traits> - class ostreambuf_iterator; - - template<bool _IsMove, typename _CharT> - typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type - __copy_move_a2(_CharT*, _CharT*, - ostreambuf_iterator<_CharT, char_traits<_CharT> >); - - template<bool _IsMove, typename _CharT> - typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type - __copy_move_a2(const _CharT*, const _CharT*, - ostreambuf_iterator<_CharT, char_traits<_CharT> >); - - template<bool _IsMove, typename _CharT> - typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - _CharT*>::__type - __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, - istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); - - template<bool _IsMove, typename _II, typename _OI> - inline _OI - __copy_move_a2(_II __first, _II __last, _OI __result) - { - return std::__niter_wrap(__result, - std::__copy_move_a<_IsMove>(std::__niter_base(__first), - std::__niter_base(__last), - std::__niter_base(__result))); - } -# 463 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - template<typename _II, typename _OI> - inline _OI - copy(_II __first, _II __last, _OI __result) - { - - - - - ; - - return std::__copy_move_a2<__is_move_iterator<_II>::__value> - (std::__miter_base(__first), std::__miter_base(__last), __result); - } -# 495 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - template<typename _II, typename _OI> - inline _OI - move(_II __first, _II __last, _OI __result) - { - - - - - ; - - return std::__copy_move_a2<true>(std::__miter_base(__first), - std::__miter_base(__last), __result); - } - - - - - - - template<bool, bool, typename> - struct __copy_move_backward - { - template<typename _BI1, typename _BI2> - static _BI2 - __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) - { - while (__first != __last) - *--__result = *--__last; - return __result; - } - }; - - - 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; - for (__n = __last - __first; __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; - for (__n = __last - __first; __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> - static _Tp* - __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) - { - - using __assignable = conditional<_IsMove, - is_move_assignable<_Tp>, - is_copy_assignable<_Tp>>; - - static_assert( __assignable::type::value, "type is not assignable" ); - - const ptrdiff_t _Num = __last - __first; - if (_Num) - __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); - return __result - _Num; - } - }; - - template<bool _IsMove, typename _BI1, typename _BI2> - inline _BI2 - __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) - { - typedef typename iterator_traits<_BI1>::value_type _ValueType1; - typedef typename iterator_traits<_BI2>::value_type _ValueType2; - typedef typename iterator_traits<_BI1>::iterator_category _Category; - const bool __simple = (__is_trivially_copyable(_ValueType1) - && __is_pointer<_BI1>::__value - && __is_pointer<_BI2>::__value - && __are_same<_ValueType1, _ValueType2>::__value); - - return std::__copy_move_backward<_IsMove, __simple, - _Category>::__copy_move_b(__first, - __last, - __result); - } - - template<bool _IsMove, typename _BI1, typename _BI2> - inline _BI2 - __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) - { - return std::__niter_wrap(__result, - std::__copy_move_backward_a<_IsMove> - (std::__niter_base(__first), std::__niter_base(__last), - std::__niter_base(__result))); - } -# 639 "/usr/include/c++/9.2.0/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_a2<__is_move_iterator<_BI1>::__value> - (std::__miter_base(__first), std::__miter_base(__last), __result); - } -# 674 "/usr/include/c++/9.2.0/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_a2<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_a(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __value) - { - for (; __first != __last; ++__first) - *__first = __value; - } - - template<typename _ForwardIterator, typename _Tp> - inline typename - __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type - __fill_a(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __value) - { - const _Tp __tmp = __value; - for (; __first != __last; ++__first) - *__first = __tmp; - } - - - template<typename _Tp> - inline typename - __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type - __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) - { - const _Tp __tmp = __c; - if (const size_t __len = __last - __first) - __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len); - } -# 740 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - template<typename _ForwardIterator, typename _Tp> - inline void - fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) - { - - - - ; - - std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), - __value); - } - - template<typename _OutputIterator, typename _Size, typename _Tp> - inline typename - __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type - __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) - { - for (__decltype(__n + 0) __niter = __n; - __niter > 0; --__niter, (void) ++__first) - *__first = __value; - return __first; - } - - template<typename _OutputIterator, typename _Size, typename _Tp> - inline typename - __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type - __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) - { - const _Tp __tmp = __value; - for (__decltype(__n + 0) __niter = __n; - __niter > 0; --__niter, (void) ++__first) - *__first = __tmp; - return __first; - } - - template<typename _Size, typename _Tp> - inline typename - __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type - __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) - { - std::__fill_a(__first, __first + __n, __c); - return __first + __n; - } -# 800 "/usr/include/c++/9.2.0/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::__niter_wrap(__first, - std::__fill_n_a(std::__niter_base(__first), __n, __value)); - } - - template<bool _BoolType> - struct __equal - { - template<typename _II1, typename _II2> - static bool - equal(_II1 __first1, _II1 __last1, _II2 __first2) - { - for (; __first1 != __last1; ++__first1, (void) ++__first2) - if (!(*__first1 == *__first2)) - return false; - return true; - } - }; - - template<> - struct __equal<true> - { - template<typename _Tp> - static bool - equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) - { - if (const size_t __len = (__last1 - __first1)) - return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len); - return true; - } - }; - - template<typename _II1, typename _II2> - inline bool - __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) - { - typedef typename iterator_traits<_II1>::value_type _ValueType1; - typedef typename iterator_traits<_II2>::value_type _ValueType2; - const bool __simple = ((__is_integer<_ValueType1>::__value - || __is_pointer<_ValueType1>::__value) - && __is_pointer<_II1>::__value - && __is_pointer<_II2>::__value - && __are_same<_ValueType1, _ValueType2>::__value); - - return std::__equal<__simple>::equal(__first1, __last1, __first2); - } - - template<typename, typename> - struct __lc_rai - { - template<typename _II1, typename _II2> - static _II1 - __newlast1(_II1, _II1 __last1, _II2, _II2) - { return __last1; } - - template<typename _II> - static bool - __cnd2(_II __first, _II __last) - { return __first != __last; } - }; - - template<> - struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> - { - template<typename _RAI1, typename _RAI2> - static _RAI1 - __newlast1(_RAI1 __first1, _RAI1 __last1, - _RAI2 __first2, _RAI2 __last2) - { - const typename iterator_traits<_RAI1>::difference_type - __diff1 = __last1 - __first1; - const typename iterator_traits<_RAI2>::difference_type - __diff2 = __last2 - __first2; - return __diff2 < __diff1 ? __first1 + __diff2 : __last1; - } - - template<typename _RAI> - static bool - __cnd2(_RAI, _RAI) - { return true; } - }; - - template<typename _II1, typename _II2, typename _Compare> - bool - __lexicographical_compare_impl(_II1 __first1, _II1 __last1, - _II2 __first2, _II2 __last2, - _Compare __comp) - { - typedef typename iterator_traits<_II1>::iterator_category _Category1; - typedef typename iterator_traits<_II2>::iterator_category _Category2; - typedef std::__lc_rai<_Category1, _Category2> __rai_type; - - __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); - for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); - ++__first1, (void)++__first2) - { - if (__comp(__first1, __first2)) - return true; - if (__comp(__first2, __first1)) - return false; - } - return __first1 == __last1 && __first2 != __last2; - } - - template<bool _BoolType> - struct __lexicographical_compare - { - template<typename _II1, typename _II2> - static bool __lc(_II1, _II1, _II2, _II2); - }; - - template<bool _BoolType> - template<typename _II1, typename _II2> - bool - __lexicographical_compare<_BoolType>:: - __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) - { - return std::__lexicographical_compare_impl(__first1, __last1, - __first2, __last2, - __gnu_cxx::__ops::__iter_less_iter()); - } - - template<> - struct __lexicographical_compare<true> - { - template<typename _Tp, typename _Up> - static bool - __lc(const _Tp* __first1, const _Tp* __last1, - const _Up* __first2, const _Up* __last2) - { - const size_t __len1 = __last1 - __first1; - const size_t __len2 = __last2 - __first2; - if (const size_t __len = std::min(__len1, __len2)) - if (int __result = __builtin_memcmp(__first1, __first2, __len)) - return __result < 0; - return __len1 < __len2; - } - }; - - template<typename _II1, typename _II2> - inline bool - __lexicographical_compare_aux(_II1 __first1, _II1 __last1, - _II2 __first2, _II2 __last2) - { - typedef typename iterator_traits<_II1>::value_type _ValueType1; - typedef typename iterator_traits<_II2>::value_type _ValueType2; - const bool __simple = - (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value - && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed - && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed - && __is_pointer<_II1>::__value - && __is_pointer<_II2>::__value); - - return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, - __first2, __last2); - } - - template<typename _ForwardIterator, typename _Tp, typename _Compare> - _ForwardIterator - __lower_bound(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __val, _Compare __comp) - { - typedef typename iterator_traits<_ForwardIterator>::difference_type - _DistanceType; - - _DistanceType __len = std::distance(__first, __last); - - while (__len > 0) - { - _DistanceType __half = __len >> 1; - _ForwardIterator __middle = __first; - std::advance(__middle, __half); - if (__comp(__middle, __val)) - { - __first = __middle; - ++__first; - __len = __len - __half - 1; - } - else - __len = __half; - } - return __first; - } -# 1002 "/usr/include/c++/9.2.0/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()); - } - - - - inline constexpr int - __lg(int __n) - { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } - - inline constexpr unsigned - __lg(unsigned __n) - { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } - - inline constexpr long - __lg(long __n) - { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } - - inline constexpr unsigned long - __lg(unsigned long __n) - { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } - - inline constexpr long long - __lg(long long __n) - { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } - - inline constexpr unsigned long long - __lg(unsigned long long __n) - { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } - - -# 1057 "/usr/include/c++/9.2.0/bits/stl_algobase.h" 3 - template<typename _II1, typename _II2> - inline bool - equal(_II1 __first1, _II1 __last1, _II2 __first2) - { - - - - - - - ; - - return std::__equal_aux(std::__niter_base(__first1), - std::__niter_base(__last1), - std::__niter_base(__first2)); - } -# 1089 "/usr/include/c++/9.2.0/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; - } -# 1176 "/usr/include/c++/9.2.0/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); - } -# 1208 "/usr/include/c++/9.2.0/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); - } -# 1239 "/usr/include/c++/9.2.0/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(std::__niter_base(__first1), - std::__niter_base(__last1), - std::__niter_base(__first2), - std::__niter_base(__last2)); - } -# 1275 "/usr/include/c++/9.2.0/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)); - } - - 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); - } -# 1318 "/usr/include/c++/9.2.0/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()); - } -# 1351 "/usr/include/c++/9.2.0/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); - } -# 1398 "/usr/include/c++/9.2.0/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()); - } -# 1433 "/usr/include/c++/9.2.0/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)); - } - - - - -} -# 40 "/usr/include/c++/9.2.0/bits/char_traits.h" 2 3 - -# 1 "/usr/include/c++/9.2.0/cwchar" 1 3 -# 39 "/usr/include/c++/9.2.0/cwchar" 3 - -# 40 "/usr/include/c++/9.2.0/cwchar" 3 -# 42 "/usr/include/c++/9.2.0/bits/char_traits.h" 2 3 - - - - - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - -# 61 "/usr/include/c++/9.2.0/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; - }; -# 86 "/usr/include/c++/9.2.0/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; - return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, - __n * sizeof(char_type))); - } - - template<typename _CharT> - typename char_traits<_CharT>::char_type* - char_traits<_CharT>:: - copy(char_type* __s1, const char_type* __s2, std::size_t __n) - { - - std::copy(__s2, __s2 + __n, __s1); - return __s1; - } - - template<typename _CharT> - typename char_traits<_CharT>::char_type* - char_traits<_CharT>:: - assign(char_type* __s, std::size_t __n, char_type __a) - { - - std::fill_n(__s, __n, __a); - return __s; - } - - -} - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 283 "/usr/include/c++/9.2.0/bits/char_traits.h" 3 - template<class _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 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 int - compare(const char_type* __s1, const char_type* __s2, size_t __n) - { - if (__n == 0) - return 0; - - - - - - - return __builtin_memcmp(__s1, __s2, __n); - } - - static size_t - length(const char_type* __s) - { - - - - - return __builtin_strlen(__s); - } - - static const char_type* - find(const char_type* __s, size_t __n, const char_type& __a) - { - if (__n == 0) - return 0; - - - - - - - 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 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 int - compare(const char_type* __s1, const char_type* __s2, size_t __n) - { - if (__n == 0) - return 0; - - - - - - - return wmemcmp(__s1, __s2, __n); - } - - static size_t - length(const char_type* __s) - { - - - - - return wcslen(__s); - } - - static const char_type* - find(const char_type* __s, size_t __n, const char_type& __a) - { - if (__n == 0) - return 0; - - - - - - - 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; } - }; -# 616 "/usr/include/c++/9.2.0/bits/char_traits.h" 3 - -} - - - -# 1 "/usr/include/c++/9.2.0/cstdint" 1 3 -# 32 "/usr/include/c++/9.2.0/cstdint" 3 - -# 33 "/usr/include/c++/9.2.0/cstdint" 3 -# 41 "/usr/include/c++/9.2.0/cstdint" 3 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stdint.h" 1 3 4 -# 9 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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/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 -# 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 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; -# 28 "/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-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; -# 35 "/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; -# 87 "/usr/include/stdint.h" 3 4 -typedef long int intptr_t; - - -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-pc-linux-gnu/9.2.0/include/stdint.h" 2 3 4 -# 42 "/usr/include/c++/9.2.0/cstdint" 2 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; - - - - - -} -# 622 "/usr/include/c++/9.2.0/bits/char_traits.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - template<> - struct char_traits<char16_t> - { - typedef char16_t char_type; - - typedef uint_least16_t int_type; - - - - - - typedef streamoff off_type; - typedef u16streampos pos_type; - typedef mbstate_t state_type; - - static 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 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 size_t - length(const char_type* __s) - { - size_t __i = 0; - while (!eq(__s[__i], char_type())) - ++__i; - return __i; - } - - static const char_type* - find(const char_type* __s, size_t __n, const char_type& __a) - { - for (size_t __i = 0; __i < __n; ++__i) - if (eq(__s[__i], __a)) - return __s + __i; - return 0; - } - - static char_type* - move(char_type* __s1, const char_type* __s2, size_t __n) - { - if (__n == 0) - return __s1; - return (static_cast<char_type*> - (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); - } - - static char_type* - copy(char_type* __s1, const char_type* __s2, size_t __n) - { - if (__n == 0) - return __s1; - return (static_cast<char_type*> - (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); - } - - static char_type* - assign(char_type* __s, size_t __n, char_type __a) - { - for (size_t __i = 0; __i < __n; ++__i) - assign(__s[__i], __a); - return __s; - } - - static constexpr char_type - to_char_type(const int_type& __c) noexcept - { return char_type(__c); } - - static constexpr int_type - to_int_type(const char_type& __c) noexcept - { return __c == eof() ? int_type(0xfffd) : int_type(__c); } - - static constexpr bool - eq_int_type(const int_type& __c1, const int_type& __c2) noexcept - { return __c1 == __c2; } - - static constexpr int_type - eof() noexcept - { return static_cast<int_type>(-1); } - - static constexpr int_type - not_eof(const int_type& __c) noexcept - { return eq_int_type(__c, eof()) ? 0 : __c; } - }; - - template<> - struct char_traits<char32_t> - { - typedef char32_t char_type; - - typedef uint_least32_t int_type; - - - - - - typedef streamoff off_type; - typedef u32streampos pos_type; - typedef mbstate_t state_type; - - static 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 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 size_t - length(const char_type* __s) - { - size_t __i = 0; - while (!eq(__s[__i], char_type())) - ++__i; - return __i; - } - - static 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; } - }; - - -} -# 41 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/localefwd.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/localefwd.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/localefwd.h" 3 - - -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++locale.h" 1 3 -# 39 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++locale.h" 3 - -# 40 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++locale.h" 3 - -# 1 "/usr/include/c++/9.2.0/clocale" 1 3 -# 39 "/usr/include/c++/9.2.0/clocale" 3 - -# 40 "/usr/include/c++/9.2.0/clocale" 3 - - -# 1 "/usr/include/locale.h" 1 3 4 -# 28 "/usr/include/locale.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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) throw (); - - -extern struct lconv *localeconv (void) throw (); -# 141 "/usr/include/locale.h" 3 4 -extern locale_t newlocale (int __category_mask, const char *__locale, - locale_t __base) throw (); -# 176 "/usr/include/locale.h" 3 4 -extern locale_t duplocale (locale_t __dataset) throw (); - - - -extern void freelocale (locale_t __dataset) throw (); - - - - - - -extern locale_t uselocale (locale_t __dataset) throw (); - - - - - - - -} -# 43 "/usr/include/c++/9.2.0/clocale" 2 3 -# 51 "/usr/include/c++/9.2.0/clocale" 3 -namespace std -{ - using ::lconv; - using ::setlocale; - using ::localeconv; -} -# 42 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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; - - - - - - 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); -# 88 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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++/9.2.0/bits/localefwd.h" 2 3 - -# 1 "/usr/include/c++/9.2.0/cctype" 1 3 -# 39 "/usr/include/c++/9.2.0/cctype" 3 - -# 40 "/usr/include/c++/9.2.0/cctype" 3 - - -# 1 "/usr/include/ctype.h" 1 3 4 -# 28 "/usr/include/ctype.h" 3 4 -extern "C" { -# 39 "/usr/include/ctype.h" 3 4 -# 1 "/usr/include/endian.h" 1 3 4 -# 36 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/bits/endian.h" 1 3 4 -# 37 "/usr/include/endian.h" 2 3 4 -# 60 "/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); - - - -} -# 61 "/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; -} -# 62 "/usr/include/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) - throw () __attribute__ ((__const__)); -extern const __int32_t **__ctype_tolower_loc (void) - throw () __attribute__ ((__const__)); -extern const __int32_t **__ctype_toupper_loc (void) - throw () __attribute__ ((__const__)); -# 108 "/usr/include/ctype.h" 3 4 -extern int isalnum (int) throw (); -extern int isalpha (int) throw (); -extern int iscntrl (int) throw (); -extern int isdigit (int) throw (); -extern int islower (int) throw (); -extern int isgraph (int) throw (); -extern int isprint (int) throw (); -extern int ispunct (int) throw (); -extern int isspace (int) throw (); -extern int isupper (int) throw (); -extern int isxdigit (int) throw (); - - - -extern int tolower (int __c) throw (); - - -extern int toupper (int __c) throw (); - - - - -extern int isblank (int) throw (); - - - - -extern int isctype (int __c, int __mask) throw (); - - - - - - -extern int isascii (int __c) throw (); - - - -extern int toascii (int __c) throw (); - - - -extern int _toupper (int) throw (); -extern int _tolower (int) throw (); -# 251 "/usr/include/ctype.h" 3 4 -extern int isalnum_l (int, locale_t) throw (); -extern int isalpha_l (int, locale_t) throw (); -extern int iscntrl_l (int, locale_t) throw (); -extern int isdigit_l (int, locale_t) throw (); -extern int islower_l (int, locale_t) throw (); -extern int isgraph_l (int, locale_t) throw (); -extern int isprint_l (int, locale_t) throw (); -extern int ispunct_l (int, locale_t) throw (); -extern int isspace_l (int, locale_t) throw (); -extern int isupper_l (int, locale_t) throw (); -extern int isxdigit_l (int, locale_t) throw (); - -extern int isblank_l (int, locale_t) throw (); - - - -extern int __tolower_l (int __c, locale_t __l) throw (); -extern int tolower_l (int __c, locale_t __l) throw (); - - -extern int __toupper_l (int __c, locale_t __l) throw (); -extern int toupper_l (int __c, locale_t __l) throw (); -# 327 "/usr/include/ctype.h" 3 4 -} -# 43 "/usr/include/c++/9.2.0/cctype" 2 3 -# 62 "/usr/include/c++/9.2.0/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++/9.2.0/bits/localefwd.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 55 "/usr/include/c++/9.2.0/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&); - - - class 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; -} - - - class messages_base; -namespace __cxx11 { - template<typename _CharT> - class messages; - template<typename _CharT> - class messages_byname; -} - - -} -# 42 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/ios_base.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - -# 1 "/usr/include/c++/9.2.0/ext/atomicity.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/atomicity.h" 3 - -# 33 "/usr/include/c++/9.2.0/ext/atomicity.h" 3 - - -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr.h" 1 3 -# 30 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr.h" 3 -#pragma GCC visibility push(default) -# 148 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr.h" 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 1 3 -# 35 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -# 1 "/usr/include/pthread.h" 1 3 4 -# 23 "/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-pc-linux-gnu/9.2.0/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 - - - - - - -typedef __time_t time_t; -# 32 "/usr/include/sched.h" 2 3 4 -# 1 "/usr/include/bits/types/struct_timespec.h" 1 3 4 -# 9 "/usr/include/bits/types/struct_timespec.h" 3 4 -struct timespec -{ - __time_t tv_sec; - __syscall_slong_t tv_nsec; -}; -# 33 "/usr/include/sched.h" 2 3 4 - - - - - -typedef __pid_t pid_t; - - - - -# 1 "/usr/include/bits/sched.h" 1 3 4 -# 74 "/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; -}; -# 75 "/usr/include/bits/sched.h" 2 3 4 - -extern "C" { - - - -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg, ...) throw (); - - -extern int unshare (int __flags) throw (); - - -extern int sched_getcpu (void) throw (); - - -extern int getcpu (unsigned int *, unsigned int *) throw (); - - -extern int setns (int __fd, int __nstype) throw (); - - -} -# 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) - throw (); -extern cpu_set_t *__sched_cpualloc (size_t __count) throw () ; -extern void __sched_cpufree (cpu_set_t *__set) throw (); - -} -# 45 "/usr/include/sched.h" 2 3 4 - - - - - - -extern "C" { - - -extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) - throw (); - - -extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); - - -extern int sched_setscheduler (__pid_t __pid, int __policy, - const struct sched_param *__param) throw (); - - -extern int sched_getscheduler (__pid_t __pid) throw (); - - -extern int sched_yield (void) throw (); - - -extern int sched_get_priority_max (int __algorithm) throw (); - - -extern int sched_get_priority_min (int __algorithm) throw (); - - -extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); -# 121 "/usr/include/sched.h" 3 4 -extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, - const cpu_set_t *__cpuset) throw (); - - -extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, - cpu_set_t *__cpuset) throw (); - - -} -# 24 "/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-pc-linux-gnu/9.2.0/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 -{ - 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) throw (); - -} -# 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) throw (); - - -extern time_t time (time_t *__timer) throw (); - - -extern double difftime (time_t __time1, time_t __time0) - throw () __attribute__ ((__const__)); - - -extern time_t mktime (struct tm *__tp) throw (); - - - - - -extern size_t strftime (char *__restrict __s, size_t __maxsize, - const char *__restrict __format, - const struct tm *__restrict __tp) throw (); - - - - -extern char *strptime (const char *__restrict __s, - const char *__restrict __fmt, struct tm *__tp) - throw (); - - - - - - -extern size_t strftime_l (char *__restrict __s, size_t __maxsize, - const char *__restrict __format, - const struct tm *__restrict __tp, - locale_t __loc) throw (); - - - -extern char *strptime_l (const char *__restrict __s, - const char *__restrict __fmt, struct tm *__tp, - locale_t __loc) throw (); - - - - - -extern struct tm *gmtime (const time_t *__timer) throw (); - - - -extern struct tm *localtime (const time_t *__timer) throw (); - - - - -extern struct tm *gmtime_r (const time_t *__restrict __timer, - struct tm *__restrict __tp) throw (); - - - -extern struct tm *localtime_r (const time_t *__restrict __timer, - struct tm *__restrict __tp) throw (); - - - - -extern char *asctime (const struct tm *__tp) throw (); - - -extern char *ctime (const time_t *__timer) throw (); - - - - - - -extern char *asctime_r (const struct tm *__restrict __tp, - char *__restrict __buf) throw (); - - -extern char *ctime_r (const time_t *__restrict __timer, - char *__restrict __buf) throw (); - - - - -extern char *__tzname[2]; -extern int __daylight; -extern long int __timezone; - - - - -extern char *tzname[2]; - - - -extern void tzset (void) throw (); - - - -extern int daylight; -extern long int timezone; - - - - - -extern int stime (const time_t *__when) throw (); -# 196 "/usr/include/time.h" 3 4 -extern time_t timegm (struct tm *__tp) throw (); - - -extern time_t timelocal (struct tm *__tp) throw (); - - -extern int dysize (int __year) throw () __attribute__ ((__const__)); -# 211 "/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) throw (); - - -extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); - - -extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) - throw (); - - - - - - -extern int clock_nanosleep (clockid_t __clock_id, int __flags, - const struct timespec *__req, - struct timespec *__rem); - - -extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); - - - - -extern int timer_create (clockid_t __clock_id, - struct sigevent *__restrict __evp, - timer_t *__restrict __timerid) throw (); - - -extern int timer_delete (timer_t __timerid) throw (); - - -extern int timer_settime (timer_t __timerid, int __flags, - const struct itimerspec *__restrict __value, - struct itimerspec *__restrict __ovalue) throw (); - - -extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) - throw (); - - -extern int timer_getoverrun (timer_t __timerid) throw (); - - - - - -extern int timespec_get (struct timespec *__ts, int __base) - throw () __attribute__ ((__nonnull__ (1))); -# 280 "/usr/include/time.h" 3 4 -extern int getdate_err; -# 289 "/usr/include/time.h" 3 4 -extern struct tm *getdate (const char *__string); -# 303 "/usr/include/time.h" 3 4 -extern int getdate_r (const char *__restrict __string, - struct tm *__restrict __resbufp); - - -} -# 25 "/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 -# 77 "/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 -# 65 "/usr/include/bits/pthreadtypes-arch.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; -# 99 "/usr/include/bits/pthreadtypes-arch.h" 3 4 -}; -# 78 "/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; -# 118 "/usr/include/bits/thread-shared-types.h" 3 4 -struct __pthread_mutex_s -{ - int __lock ; - unsigned int __count; - int __owner; - - unsigned int __nusers; -# 148 "/usr/include/bits/thread-shared-types.h" 3 4 - int __kind; - - - - - - short __spins; short __elision; - __pthread_list_t __list; -# 165 "/usr/include/bits/thread-shared-types.h" 3 4 - -}; - - - - -struct __pthread_cond_s -{ - __extension__ union - { - __extension__ unsigned long long int __wseq; - struct - { - unsigned int __low; - unsigned int __high; - } __wseq32; - }; - __extension__ union - { - __extension__ unsigned long long int __g1_start; - struct - { - unsigned int __low; - unsigned int __high; - } __g1_start32; - }; - unsigned int __g_refs[2] ; - unsigned int __g_size[2]; - unsigned int __g1_orig_size; - unsigned int __wrefs; - unsigned int __g_signals[2]; -}; -# 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 - - - - -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 -}; -# 115 "/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 -}; -# 156 "/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 - -}; -# 191 "/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 - -}; -# 229 "/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) throw () __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) throw (); - - - - - - - -extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, - const struct timespec *__abstime); - - - - - - -extern int pthread_detach (pthread_t __th) throw (); - - - -extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); - - -extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) - throw () __attribute__ ((__const__)); - - - - - - - -extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_attr_destroy (pthread_attr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, - int *__detachstate) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, - int __detachstate) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, - size_t *__guardsize) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setguardsize (pthread_attr_t *__attr, - size_t __guardsize) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, - struct sched_param *__restrict __param) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - const struct sched_param *__restrict - __param) throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict - __attr, int *__restrict __policy) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict - __attr, int *__restrict __inherit) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, - int __inherit) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, - int *__restrict __scope) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict - __attr, void **__restrict __stackaddr) - throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); - - - - - -extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, - void *__stackaddr) - throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); - - -extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict - __attr, size_t *__restrict __stacksize) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int pthread_attr_setstacksize (pthread_attr_t *__attr, - size_t __stacksize) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, - void **__restrict __stackaddr, - size_t *__restrict __stacksize) - throw () __attribute__ ((__nonnull__ (1, 2, 3))); - - - - -extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, - size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); - - - - - -extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, - size_t __cpusetsize, - const cpu_set_t *__cpuset) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, - size_t __cpusetsize, - cpu_set_t *__cpuset) - throw () __attribute__ ((__nonnull__ (1, 3))); - - -extern int pthread_getattr_default_np (pthread_attr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_setattr_default_np (const pthread_attr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - - - -extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) - throw () __attribute__ ((__nonnull__ (2))); - - - - - - - -extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - const struct sched_param *__param) - throw () __attribute__ ((__nonnull__ (3))); - - -extern int pthread_getschedparam (pthread_t __target_thread, - int *__restrict __policy, - struct sched_param *__restrict __param) - throw () __attribute__ ((__nonnull__ (2, 3))); - - -extern int pthread_setschedprio (pthread_t __target_thread, int __prio) - throw (); - - - - -extern int pthread_getname_np (pthread_t __target_thread, char *__buf, - size_t __buflen) - throw () __attribute__ ((__nonnull__ (2))); - - -extern int pthread_setname_np (pthread_t __target_thread, const char *__name) - throw () __attribute__ ((__nonnull__ (2))); - - - - - -extern int pthread_getconcurrency (void) throw (); - - -extern int pthread_setconcurrency (int __level) throw (); - - - - - - - -extern int pthread_yield (void) throw (); - - - - -extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, - const cpu_set_t *__cpuset) - throw () __attribute__ ((__nonnull__ (3))); - - -extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, - cpu_set_t *__cpuset) - throw () __attribute__ ((__nonnull__ (3))); -# 495 "/usr/include/pthread.h" 3 4 -extern int pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); -# 507 "/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); - - - - -typedef struct -{ - struct - { - __jmp_buf __cancel_jmp_buf; - int __mask_was_saved; - } __cancel_jmp_buf[1]; - void *__pad[4]; -} __pthread_unwind_buf_t __attribute__ ((__aligned__)); -# 541 "/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); } -}; -# 743 "/usr/include/pthread.h" 3 4 -struct __jmp_buf_tag; -extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); - - - - - -extern int pthread_mutex_init (pthread_mutex_t *__mutex, - const pthread_mutexattr_t *__mutexattr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutex_lock (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, - clockid_t __clockid, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_mutex_getprioceiling (const pthread_mutex_t * - __restrict __mutex, - int *__restrict __prioceiling) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, - int __prioceiling, - int *__restrict __old_ceiling) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - - -extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); - -extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) - throw () __attribute__ ((__nonnull__ (1))); -# 814 "/usr/include/pthread.h" 3 4 -extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * - __restrict __attr, - int *__restrict __pshared) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, - int __pshared) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict - __attr, int *__restrict __kind) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * - __restrict __attr, - int *__restrict __protocol) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, - int __protocol) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * - __restrict __attr, - int *__restrict __prioceiling) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, - int __prioceiling) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, - int *__robustness) - throw () __attribute__ ((__nonnull__ (1, 2))); - -extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, - int *__robustness) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, - int __robustness) - throw () __attribute__ ((__nonnull__ (1))); - -extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, - int __robustness) - throw () __attribute__ ((__nonnull__ (1))); -# 896 "/usr/include/pthread.h" 3 4 -extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - const pthread_rwlockattr_t *__restrict - __attr) throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, - clockid_t __clockid, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, - clockid_t __clockid, - const struct timespec *__restrict - __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) - throw () __attribute__ ((__nonnull__ (1))); - - - - - -extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * - __restrict __attr, - int *__restrict __pshared) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, - int __pshared) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * - __restrict __attr, - int *__restrict __pref) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, - int __pref) throw () __attribute__ ((__nonnull__ (1))); - - - - - - - -extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - const pthread_condattr_t *__restrict __cond_attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_cond_destroy (pthread_cond_t *__cond) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_cond_signal (pthread_cond_t *__cond) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_cond_broadcast (pthread_cond_t *__cond) - throw () __attribute__ ((__nonnull__ (1))); - - - - - - -extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, - pthread_mutex_t *__restrict __mutex) - __attribute__ ((__nonnull__ (1, 2))); -# 1022 "/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))); -# 1035 "/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))); - - - - - -extern int pthread_condattr_init (pthread_condattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_condattr_destroy (pthread_condattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_condattr_getpshared (const pthread_condattr_t * - __restrict __attr, - int *__restrict __pshared) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, - int __pshared) throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_condattr_getclock (const pthread_condattr_t * - __restrict __attr, - __clockid_t *__restrict __clock_id) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_condattr_setclock (pthread_condattr_t *__attr, - __clockid_t __clock_id) - throw () __attribute__ ((__nonnull__ (1))); -# 1081 "/usr/include/pthread.h" 3 4 -extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_spin_destroy (pthread_spinlock_t *__lock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_spin_lock (pthread_spinlock_t *__lock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_spin_trylock (pthread_spinlock_t *__lock) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_spin_unlock (pthread_spinlock_t *__lock) - throw () __attribute__ ((__nonnull__ (1))); - - - - - - -extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - const pthread_barrierattr_t *__restrict - __attr, unsigned int __count) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_barrier_wait (pthread_barrier_t *__barrier) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * - __restrict __attr, - int *__restrict __pshared) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, - int __pshared) - throw () __attribute__ ((__nonnull__ (1))); -# 1148 "/usr/include/pthread.h" 3 4 -extern int pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int pthread_key_delete (pthread_key_t __key) throw (); - - -extern void *pthread_getspecific (pthread_key_t __key) throw (); - - -extern int pthread_setspecific (pthread_key_t __key, - const void *__pointer) throw () ; - - - - -extern int pthread_getcpuclockid (pthread_t __thread_id, - __clockid_t *__clock_id) - throw () __attribute__ ((__nonnull__ (2))); -# 1182 "/usr/include/pthread.h" 3 4 -extern int pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)) throw (); -# 1196 "/usr/include/pthread.h" 3 4 -} -# 36 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 -# 47 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"), __copy__ (pthread_once))); -static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"), __copy__ (pthread_getspecific))); -static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"), __copy__ (pthread_setspecific))); - -static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"), __copy__ (pthread_create))); -static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"), __copy__ (pthread_join))); -static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"), __copy__ (pthread_equal))); -static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"), __copy__ (pthread_self))); -static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"), __copy__ (pthread_detach))); - -static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"), __copy__ (pthread_cancel))); - -static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"), __copy__ (sched_yield))); - -static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"), __copy__ (pthread_mutex_lock))); -static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"), __copy__ (pthread_mutex_trylock))); - -static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"), __copy__ (pthread_mutex_timedlock))); - -static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"), __copy__ (pthread_mutex_unlock))); -static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"), __copy__ (pthread_mutex_init))); -static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"), __copy__ (pthread_mutex_destroy))); - -static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"), __copy__ (pthread_cond_init))); -static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"), __copy__ (pthread_cond_broadcast))); -static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"), __copy__ (pthread_cond_signal))); -static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"), __copy__ (pthread_cond_wait))); -static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"), __copy__ (pthread_cond_timedwait))); -static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"), __copy__ (pthread_cond_destroy))); - -static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"), __copy__ (pthread_key_create))); -static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"), __copy__ (pthread_key_delete))); -static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"), __copy__ (pthread_mutexattr_init))); -static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"), __copy__ (pthread_mutexattr_settype))); -static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"), __copy__ (pthread_mutexattr_destroy))); -# 237 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"), __copy__ (pthread_key_create))); -# 247 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -static inline int -__gthread_active_p (void) -{ - static void *const __gthread_active_ptr - = __extension__ (void *) &__gthrw___pthread_key_create; - return __gthread_active_ptr != 0; -} -# 659 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -static inline int -__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), - void *__args) -{ - return __gthrw_pthread_create (__threadid, __null, __func, __args); -} - -static inline int -__gthread_join (__gthread_t __threadid, void **__value_ptr) -{ - return __gthrw_pthread_join (__threadid, __value_ptr); -} - -static inline int -__gthread_detach (__gthread_t __threadid) -{ - return __gthrw_pthread_detach (__threadid); -} - -static inline int -__gthread_equal (__gthread_t __t1, __gthread_t __t2) -{ - return __gthrw_pthread_equal (__t1, __t2); -} - -static inline __gthread_t -__gthread_self (void) -{ - return __gthrw_pthread_self (); -} - -static inline int -__gthread_yield (void) -{ - return __gthrw_sched_yield (); -} - -static inline int -__gthread_once (__gthread_once_t *__once, void (*__func) (void)) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_once (__once, __func); - else - return -1; -} - -static inline int -__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) -{ - return __gthrw_pthread_key_create (__key, __dtor); -} - -static inline int -__gthread_key_delete (__gthread_key_t __key) -{ - return __gthrw_pthread_key_delete (__key); -} - -static inline void * -__gthread_getspecific (__gthread_key_t __key) -{ - return __gthrw_pthread_getspecific (__key); -} - -static inline int -__gthread_setspecific (__gthread_key_t __key, const void *__ptr) -{ - return __gthrw_pthread_setspecific (__key, __ptr); -} - -static inline void -__gthread_mutex_init_function (__gthread_mutex_t *__mutex) -{ - if (__gthread_active_p ()) - __gthrw_pthread_mutex_init (__mutex, __null); -} - -static inline int -__gthread_mutex_destroy (__gthread_mutex_t *__mutex) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_mutex_destroy (__mutex); - else - return 0; -} - -static inline int -__gthread_mutex_lock (__gthread_mutex_t *__mutex) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_mutex_lock (__mutex); - else - return 0; -} - -static inline int -__gthread_mutex_trylock (__gthread_mutex_t *__mutex) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_mutex_trylock (__mutex); - else - return 0; -} - - -static inline int -__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, - const __gthread_time_t *__abs_timeout) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); - else - return 0; -} - - -static inline int -__gthread_mutex_unlock (__gthread_mutex_t *__mutex) -{ - if (__gthread_active_p ()) - return __gthrw_pthread_mutex_unlock (__mutex); - else - return 0; -} -# 808 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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++/9.2.0/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 -static inline int -__gthread_cond_broadcast (__gthread_cond_t *__cond) -{ - return __gthrw_pthread_cond_broadcast (__cond); -} - -static inline int -__gthread_cond_signal (__gthread_cond_t *__cond) -{ - return __gthrw_pthread_cond_signal (__cond); -} - -static inline int -__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) -{ - return __gthrw_pthread_cond_wait (__cond, __mutex); -} - -static inline int -__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, - const __gthread_time_t *__abs_timeout) -{ - return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); -} - -static inline int -__gthread_cond_wait_recursive (__gthread_cond_t *__cond, - __gthread_recursive_mutex_t *__mutex) -{ - return __gthread_cond_wait (__cond, __mutex); -} - -static inline int -__gthread_cond_destroy (__gthread_cond_t* __cond) -{ - return __gthrw_pthread_cond_destroy (__cond); -} -# 149 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/gthr.h" 2 3 - - -#pragma GCC visibility pop -# 36 "/usr/include/c++/9.2.0/ext/atomicity.h" 2 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/atomic_word.h" 1 3 -# 32 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/atomic_word.h" 3 -typedef int _Atomic_word; -# 37 "/usr/include/c++/9.2.0/ext/atomicity.h" 2 3 - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - static inline _Atomic_word - __exchange_and_add(volatile _Atomic_word* __mem, int __val) - { return __atomic_fetch_add(__mem, __val, 4); } - - static inline void - __atomic_add(volatile _Atomic_word* __mem, int __val) - { __atomic_fetch_add(__mem, __val, 4); } -# 64 "/usr/include/c++/9.2.0/ext/atomicity.h" 3 - static inline _Atomic_word - __exchange_and_add_single(_Atomic_word* __mem, int __val) - { - _Atomic_word __result = *__mem; - *__mem += __val; - return __result; - } - - static inline void - __atomic_add_single(_Atomic_word* __mem, int __val) - { *__mem += __val; } - - static inline _Atomic_word - __attribute__ ((__unused__)) - __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) - { - - if (__gthread_active_p()) - return __exchange_and_add(__mem, __val); - else - return __exchange_and_add_single(__mem, __val); - - - - } - - static inline void - __attribute__ ((__unused__)) - __atomic_add_dispatch(_Atomic_word* __mem, int __val) - { - - if (__gthread_active_p()) - __atomic_add(__mem, __val); - else - __atomic_add_single(__mem, __val); - - - - } - - -} -# 40 "/usr/include/c++/9.2.0/bits/ios_base.h" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/locale_classes.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - - -# 1 "/usr/include/c++/9.2.0/string" 1 3 -# 36 "/usr/include/c++/9.2.0/string" 3 - -# 37 "/usr/include/c++/9.2.0/string" 3 - - - - -# 1 "/usr/include/c++/9.2.0/bits/allocator.h" 1 3 -# 46 "/usr/include/c++/9.2.0/bits/allocator.h" 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h" 1 3 -# 33 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 -# 1 "/usr/include/c++/9.2.0/ext/new_allocator.h" 1 3 -# 40 "/usr/include/c++/9.2.0/ext/new_allocator.h" 3 -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - - - using std::size_t; - using std::ptrdiff_t; -# 57 "/usr/include/c++/9.2.0/ext/new_allocator.h" 3 - template<typename _Tp> - class new_allocator - { - public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Tp* pointer; - typedef const _Tp* const_pointer; - typedef _Tp& reference; - typedef const _Tp& const_reference; - typedef _Tp value_type; - - template<typename _Tp1> - struct rebind - { typedef new_allocator<_Tp1> other; }; - - - - - typedef std::true_type propagate_on_container_move_assignment; - - - - new_allocator() noexcept { } - - - new_allocator(const new_allocator&) noexcept { } - - template<typename _Tp1> - - 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); } - - - - pointer - allocate(size_type __n, const void* = static_cast<const void*>(0)) - { - if (__n > this->max_size()) - std::__throw_bad_alloc(); -# 114 "/usr/include/c++/9.2.0/ext/new_allocator.h" 3 - return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); - } - - - void - deallocate(pointer __p, size_type) - { - - - - - - - - ::operator delete(__p); - } - - size_type - max_size() const noexcept - { - - return size_t(0x7fffffffffffffffL) / sizeof(_Tp); - - - - } - - - template<typename _Up, typename... _Args> - void - construct(_Up* __p, _Args&&... __args) - noexcept(noexcept(::new((void *)__p) - _Up(std::forward<_Args>(__args)...))) - { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } - - template<typename _Up> - void - destroy(_Up* __p) - noexcept(noexcept( __p->~_Up())) - { __p->~_Up(); } -# 165 "/usr/include/c++/9.2.0/ext/new_allocator.h" 3 - template<typename _Up> - friend bool - operator==(const new_allocator&, const new_allocator<_Up>&) - noexcept - { return true; } - - template<typename _Up> - friend bool - operator!=(const new_allocator&, const new_allocator<_Up>&) - noexcept - { return false; } - }; - - -} -# 34 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h" 2 3 - - -namespace std -{ -# 47 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 - template<typename _Tp> - using __allocator_base = __gnu_cxx::new_allocator<_Tp>; -} -# 47 "/usr/include/c++/9.2.0/bits/allocator.h" 2 3 -# 57 "/usr/include/c++/9.2.0/bits/allocator.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - - template<> - class allocator<void> - { - public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef void* pointer; - typedef const void* const_pointer; - typedef void value_type; - - template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; - - - - - typedef true_type propagate_on_container_move_assignment; - - typedef true_type is_always_equal; - - template<typename _Up, typename... _Args> - void - construct(_Up* __p, _Args&&... __args) - noexcept(noexcept(::new((void *)__p) - _Up(std::forward<_Args>(__args)...))) - { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } - - template<typename _Up> - void - destroy(_Up* __p) - noexcept(noexcept(__p->~_Up())) - { __p->~_Up(); } - - }; -# 111 "/usr/include/c++/9.2.0/bits/allocator.h" 3 - template<typename _Tp> - class allocator : public __allocator_base<_Tp> - { - public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Tp* pointer; - typedef const _Tp* const_pointer; - typedef _Tp& reference; - typedef const _Tp& const_reference; - typedef _Tp value_type; - - template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; - - - - - typedef true_type propagate_on_container_move_assignment; - - typedef true_type is_always_equal; - - - - - - allocator() noexcept { } - - - allocator(const allocator& __a) noexcept - : __allocator_base<_Tp>(__a) { } - - - - allocator& operator=(const allocator&) = default; - - - template<typename _Tp1> - - allocator(const allocator<_Tp1>&) noexcept { } - - ~allocator() noexcept { } - - friend bool - operator==(const allocator&, const allocator&) noexcept - { return true; } - - friend bool - operator!=(const allocator&, const allocator&) noexcept - { return false; } - - - }; - - template<typename _T1, typename _T2> - inline bool - operator==(const allocator<_T1>&, const allocator<_T2>&) - noexcept - { return true; } - - template<typename _T1, typename _T2> - 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>; - - - - - - - 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 _Alloc, bool = __is_empty(_Alloc)> - struct __alloc_neq - { - static bool - _S_do_it(const _Alloc&, const _Alloc&) - { return false; } - }; - - template<typename _Alloc> - struct __alloc_neq<_Alloc, false> - { - static bool - _S_do_it(const _Alloc& __one, const _Alloc& __two) - { return __one != __two; } - }; - - - 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; } - - - - } - }; - - - -} -# 42 "/usr/include/c++/9.2.0/string" 2 3 - - -# 1 "/usr/include/c++/9.2.0/bits/ostream_insert.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/ostream_insert.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/ostream_insert.h" 3 - - -# 1 "/usr/include/c++/9.2.0/bits/cxxabi_forced.h" 1 3 -# 34 "/usr/include/c++/9.2.0/bits/cxxabi_forced.h" 3 - -# 35 "/usr/include/c++/9.2.0/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++/9.2.0/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); - - - - -} -# 45 "/usr/include/c++/9.2.0/string" 2 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/stl_function.h" 1 3 -# 63 "/usr/include/c++/9.2.0/bits/stl_function.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 104 "/usr/include/c++/9.2.0/bits/stl_function.h" 3 - template<typename _Arg, typename _Result> - struct unary_function - { - - typedef _Arg argument_type; - - - typedef _Result result_type; - }; - - - - - template<typename _Arg1, typename _Arg2, typename _Result> - struct binary_function - { - - typedef _Arg1 first_argument_type; - - - typedef _Arg2 second_argument_type; - - - typedef _Result result_type; - }; -# 144 "/usr/include/c++/9.2.0/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; - - - - 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; } - }; - - - - - - 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; - }; -# 330 "/usr/include/c++/9.2.0/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; - - - - 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 (__builtin_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 (__builtin_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 (__builtin_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 (__builtin_is_constant_evaluated()) - - - - return __x <= __y; - - return (long unsigned int)__x <= (long unsigned int)__y; - } - }; - - - - 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*>>; - }; -# 774 "/usr/include/c++/9.2.0/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; - - - - 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; } - }; - - - - 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; - - - - - 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; } - }; - - - 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; - }; -# 1002 "/usr/include/c++/9.2.0/bits/stl_function.h" 3 - template<typename _Predicate> - class 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> - constexpr - inline unary_negate<_Predicate> - not1(const _Predicate& __pred) - { return unary_negate<_Predicate>(__pred); } - - - template<typename _Predicate> - class binary_negate - : public binary_function<typename _Predicate::first_argument_type, - typename _Predicate::second_argument_type, bool> - { - protected: - _Predicate _M_pred; - - public: - 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> - constexpr - inline binary_negate<_Predicate> - not2(const _Predicate& __pred) - { return binary_negate<_Predicate>(__pred); } -# 1079 "/usr/include/c++/9.2.0/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); } - }; - - - template<typename _Arg, typename _Result> - inline pointer_to_unary_function<_Arg, _Result> - ptr_fun(_Result (*__x)(_Arg)) - { return pointer_to_unary_function<_Arg, _Result>(__x); } - - - 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); } - }; - - - template<typename _Arg1, typename _Arg2, typename _Result> - inline pointer_to_binary_function<_Arg1, _Arg2, _Result> - ptr_fun(_Result (*__x)(_Arg1, _Arg2)) - { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } - - - template<typename _Tp> - struct _Identity - : public unary_function<_Tp, _Tp> - { - _Tp& - operator()(_Tp& __x) const - { return __x; } - - const _Tp& - operator()(const _Tp& __x) const - { return __x; } - }; - - - 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; } - }; -# 1202 "/usr/include/c++/9.2.0/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)(); - }; - - - - 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; - }; - - - - 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)(); - }; - - - - 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; - }; - - - - 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); - }; - - - - 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; - }; - - - - 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); - }; - - - - 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; - }; - - - - template<typename _Ret, typename _Tp> - inline mem_fun_t<_Ret, _Tp> - mem_fun(_Ret (_Tp::*__f)()) - { return mem_fun_t<_Ret, _Tp>(__f); } - - template<typename _Ret, typename _Tp> - inline const_mem_fun_t<_Ret, _Tp> - mem_fun(_Ret (_Tp::*__f)() const) - { return const_mem_fun_t<_Ret, _Tp>(__f); } - - template<typename _Ret, typename _Tp> - inline mem_fun_ref_t<_Ret, _Tp> - mem_fun_ref(_Ret (_Tp::*__f)()) - { return mem_fun_ref_t<_Ret, _Tp>(__f); } - - template<typename _Ret, typename _Tp> - inline const_mem_fun_ref_t<_Ret, _Tp> - mem_fun_ref(_Ret (_Tp::*__f)() const) - { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } - - template<typename _Ret, typename _Tp, typename _Arg> - inline mem_fun1_t<_Ret, _Tp, _Arg> - mem_fun(_Ret (_Tp::*__f)(_Arg)) - { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } - - template<typename _Ret, typename _Tp, typename _Arg> - inline const_mem_fun1_t<_Ret, _Tp, _Arg> - mem_fun(_Ret (_Tp::*__f)(_Arg) const) - { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } - - template<typename _Ret, typename _Tp, typename _Arg> - inline mem_fun1_ref_t<_Ret, _Tp, _Arg> - mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) - { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } - - template<typename _Ret, typename _Tp, typename _Arg> - inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> - mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) - { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } - - - - -} - - -# 1 "/usr/include/c++/9.2.0/backward/binders.h" 1 3 -# 60 "/usr/include/c++/9.2.0/backward/binders.h" 3 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 107 "/usr/include/c++/9.2.0/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__)); - - - template<typename _Operation, typename _Tp> - inline binder1st<_Operation> - bind1st(const _Operation& __fn, const _Tp& __x) - { - typedef typename _Operation::first_argument_type _Arg1_type; - return binder1st<_Operation>(__fn, _Arg1_type(__x)); - } - - - 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__)); - - - template<typename _Operation, typename _Tp> - inline binder2nd<_Operation> - bind2nd(const _Operation& __fn, const _Tp& __x) - { - typedef typename _Operation::second_argument_type _Arg2_type; - return binder2nd<_Operation>(__fn, _Arg2_type(__x)); - } - - - -} - -#pragma GCC diagnostic pop -# 1393 "/usr/include/c++/9.2.0/bits/stl_function.h" 2 3 -# 49 "/usr/include/c++/9.2.0/string" 2 3 - - - - - -# 1 "/usr/include/c++/9.2.0/bits/range_access.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/range_access.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/range_access.h" 3 - - -# 1 "/usr/include/c++/9.2.0/initializer_list" 1 3 -# 33 "/usr/include/c++/9.2.0/initializer_list" 3 - -# 34 "/usr/include/c++/9.2.0/initializer_list" 3 - - - - - -#pragma GCC visibility push(default) - - - -namespace std -{ - - 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(); } -} - -#pragma GCC visibility pop -# 37 "/usr/include/c++/9.2.0/bits/range_access.h" 2 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - template<typename _Container> - inline auto - begin(_Container& __cont) -> decltype(__cont.begin()) - { return __cont.begin(); } - - - - - - - template<typename _Container> - inline auto - begin(const _Container& __cont) -> decltype(__cont.begin()) - { return __cont.begin(); } - - - - - - - template<typename _Container> - inline auto - end(_Container& __cont) -> decltype(__cont.end()) - { return __cont.end(); } - - - - - - - template<typename _Container> - inline auto - end(const _Container& __cont) -> decltype(__cont.end()) - { return __cont.end(); } - - - - - - template<typename _Tp, size_t _Nm> - inline constexpr _Tp* - begin(_Tp (&__arr)[_Nm]) - { return __arr; } - - - - - - - template<typename _Tp, size_t _Nm> - inline constexpr _Tp* - end(_Tp (&__arr)[_Nm]) - { return __arr + _Nm; } - - - - template<typename _Tp> class valarray; - - template<typename _Tp> _Tp* begin(valarray<_Tp>&); - template<typename _Tp> const _Tp* begin(const valarray<_Tp>&); - template<typename _Tp> _Tp* end(valarray<_Tp>&); - template<typename _Tp> const _Tp* end(const valarray<_Tp>&); - - - - - - - template<typename _Container> - inline constexpr auto - cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) - -> decltype(std::begin(__cont)) - { return std::begin(__cont); } - - - - - - - template<typename _Container> - inline constexpr auto - cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) - -> decltype(std::end(__cont)) - { return std::end(__cont); } - - - - - - - template<typename _Container> - inline auto - rbegin(_Container& __cont) -> decltype(__cont.rbegin()) - { return __cont.rbegin(); } - - - - - - - template<typename _Container> - inline auto - rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) - { return __cont.rbegin(); } - - - - - - - template<typename _Container> - inline auto - rend(_Container& __cont) -> decltype(__cont.rend()) - { return __cont.rend(); } - - - - - - - template<typename _Container> - inline auto - rend(const _Container& __cont) -> decltype(__cont.rend()) - { return __cont.rend(); } - - - - - - - template<typename _Tp, size_t _Nm> - inline reverse_iterator<_Tp*> - rbegin(_Tp (&__arr)[_Nm]) - { return reverse_iterator<_Tp*>(__arr + _Nm); } - - - - - - - template<typename _Tp, size_t _Nm> - inline reverse_iterator<_Tp*> - rend(_Tp (&__arr)[_Nm]) - { return reverse_iterator<_Tp*>(__arr); } - - - - - - - template<typename _Tp> - inline reverse_iterator<const _Tp*> - rbegin(initializer_list<_Tp> __il) - { return reverse_iterator<const _Tp*>(__il.end()); } - - - - - - - template<typename _Tp> - inline reverse_iterator<const _Tp*> - rend(initializer_list<_Tp> __il) - { return reverse_iterator<const _Tp*>(__il.begin()); } - - - - - - - template<typename _Container> - inline auto - crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) - { return std::rbegin(__cont); } - - - - - - - template<typename _Container> - inline auto - crend(const _Container& __cont) -> decltype(std::rend(__cont)) - { return std::rend(__cont); } -# 323 "/usr/include/c++/9.2.0/bits/range_access.h" 3 - -} -# 55 "/usr/include/c++/9.2.0/string" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/basic_string.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - - -# 1 "/usr/include/c++/9.2.0/ext/alloc_traits.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/alloc_traits.h" 3 - -# 33 "/usr/include/c++/9.2.0/ext/alloc_traits.h" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 1 3 -# 41 "/usr/include/c++/9.2.0/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> { }; - - template<typename _Tp, typename _Up> - struct __rebind<_Tp, _Up, - __void_t<typename _Tp::template rebind<_Up>::other>> - { using type = typename _Tp::template rebind<_Up>::other; }; - - protected: - template<typename _Tp> - using __pointer = typename _Tp::pointer; - template<typename _Tp> - using __c_pointer = typename _Tp::const_pointer; - template<typename _Tp> - using __v_pointer = typename _Tp::void_pointer; - template<typename _Tp> - using __cv_pointer = typename _Tp::const_void_pointer; - template<typename _Tp> - using __pocca = typename _Tp::propagate_on_container_copy_assignment; - template<typename _Tp> - using __pocma = typename _Tp::propagate_on_container_move_assignment; - template<typename _Tp> - using __pocs = typename _Tp::propagate_on_container_swap; - template<typename _Tp> - using __equal = typename _Tp::is_always_equal; - }; - - template<typename _Alloc, typename _Up> - using __alloc_rebind - = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; - - - - - - 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 - = __detected_or_t<typename is_empty<_Alloc>::type, __equal, _Alloc>; - - template<typename _Tp> - using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; - template<typename _Tp> - using rebind_traits = allocator_traits<rebind_alloc<_Tp>>; - - private: - template<typename _Alloc2> - static auto - _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) - -> decltype(__a.allocate(__n, __hint)) - { return __a.allocate(__n, __hint); } - - template<typename _Alloc2> - static pointer - _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) - { return __a.allocate(__n); } - - template<typename _Tp, typename... _Args> - struct __construct_helper - { - template<typename _Alloc2, - typename = decltype(std::declval<_Alloc2*>()->construct( - std::declval<_Tp*>(), std::declval<_Args>()...))> - static true_type __test(int); - - template<typename> - static false_type __test(...); - - using type = decltype(__test<_Alloc>(0)); - }; - - template<typename _Tp, typename... _Args> - using __has_construct - = typename __construct_helper<_Tp, _Args...>::type; - - template<typename _Tp, typename... _Args> - static _Require<__has_construct<_Tp, _Args...>> - _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) - noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) - { __a.construct(__p, std::forward<_Args>(__args)...); } - - template<typename _Tp, typename... _Args> - static - _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, - is_constructible<_Tp, _Args...>>> - _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) - noexcept(noexcept(::new((void*)__p) - _Tp(std::forward<_Args>(__args)...))) - { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } - - template<typename _Alloc2, typename _Tp> - static auto - _S_destroy(_Alloc2& __a, _Tp* __p, int) - noexcept(noexcept(__a.destroy(__p))) - -> decltype(__a.destroy(__p)) - { __a.destroy(__p); } - - template<typename _Alloc2, typename _Tp> - static void - _S_destroy(_Alloc2&, _Tp* __p, ...) - noexcept(noexcept(__p->~_Tp())) - { __p->~_Tp(); } - - template<typename _Alloc2> - static auto - _S_max_size(_Alloc2& __a, int) - -> decltype(__a.max_size()) - { return __a.max_size(); } - - template<typename _Alloc2> - static size_type - _S_max_size(_Alloc2&, ...) - { - - - return __gnu_cxx::__numeric_traits<size_type>::__max - / sizeof(value_type); - } - - template<typename _Alloc2> - static auto - _S_select(_Alloc2& __a, int) - -> decltype(__a.select_on_container_copy_construction()) - { return __a.select_on_container_copy_construction(); } - - template<typename _Alloc2> - static _Alloc2 - _S_select(_Alloc2& __a, ...) - { return __a; } - - public: -# 304 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static pointer - allocate(_Alloc& __a, size_type __n) - { return __a.allocate(__n); } -# 319 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static pointer - allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) - { return _S_allocate(__a, __n, __hint, 0); } -# 331 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static void - deallocate(_Alloc& __a, pointer __p, size_type __n) - { __a.deallocate(__p, __n); } -# 346 "/usr/include/c++/9.2.0/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)...); } -# 361 "/usr/include/c++/9.2.0/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); } -# 374 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static size_type max_size(const _Alloc& __a) noexcept - { return _S_max_size(__a, 0); } -# 385 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static _Alloc - select_on_container_copy_construction(const _Alloc& __rhs) - { return _S_select(__rhs, 0); } - }; - - - 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>>; -# 442 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static pointer - allocate(allocator_type& __a, size_type __n) - { return __a.allocate(__n); } -# 456 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static pointer - allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) - { return __a.allocate(__n, __hint); } -# 468 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - static void - deallocate(allocator_type& __a, pointer __p, size_type __n) - { __a.deallocate(__p, __n); } -# 480 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - template<typename _Up, typename... _Args> - static void - construct(allocator_type& __a, _Up* __p, _Args&&... __args) - noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) - { __a.construct(__p, std::forward<_Args>(__args)...); } -# 493 "/usr/include/c++/9.2.0/bits/alloc_traits.h" 3 - template<typename _Up> - static void - destroy(allocator_type& __a, _Up* __p) - noexcept(noexcept(__a.destroy(__p))) - { __a.destroy(__p); } - - - - - - - static size_type - max_size(const allocator_type& __a) noexcept - { return __a.max_size(); } - - - - - - - static allocator_type - select_on_container_copy_construction(const allocator_type& __rhs) - { return __rhs; } - }; - - - template<typename _Alloc> - inline void - __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) - { __one = __two; } - - template<typename _Alloc> - inline void - __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) - { } - - template<typename _Alloc> - inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) - { - typedef allocator_traits<_Alloc> __traits; - typedef typename __traits::propagate_on_container_copy_assignment __pocca; - __do_alloc_on_copy(__one, __two, __pocca()); - } - - template<typename _Alloc> - inline _Alloc __alloc_on_copy(const _Alloc& __a) - { - typedef allocator_traits<_Alloc> __traits; - return __traits::select_on_container_copy_construction(__a); - } - - template<typename _Alloc> - inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) - { __one = std::move(__two); } - - template<typename _Alloc> - inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) - { } - - template<typename _Alloc> - inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) - { - typedef allocator_traits<_Alloc> __traits; - typedef typename __traits::propagate_on_container_move_assignment __pocma; - __do_alloc_on_move(__one, __two, __pocma()); - } - - template<typename _Alloc> - inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) - { - using std::swap; - swap(__one, __two); - } - - template<typename _Alloc> - inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) - { } - - template<typename _Alloc> - inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) - { - typedef allocator_traits<_Alloc> __traits; - typedef typename __traits::propagate_on_container_swap __pocs; - __do_alloc_on_swap(__one, __two, __pocs()); - } - - template<typename _Alloc, typename _Tp, - typename _ValueT = __remove_cvref_t<typename _Alloc::value_type>, - typename = void> - struct __is_alloc_insertable_impl - : false_type - { }; - - template<typename _Alloc, typename _Tp, typename _ValueT> - struct __is_alloc_insertable_impl<_Alloc, _Tp, _ValueT, - __void_t<decltype(allocator_traits<_Alloc>::construct( - std::declval<_Alloc&>(), std::declval<_ValueT*>(), - std::declval<_Tp>()))>> - : true_type - { }; - - - - - 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; - - -} -# 37 "/usr/include/c++/9.2.0/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> - static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type - construct(_Alloc& __a, _Ptr __p, _Args&&... __args) - noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), - std::forward<_Args>(__args)...))) - { - _Base_type::construct(__a, std::__to_address(__p), - std::forward<_Args>(__args)...); - } - - - template<typename _Ptr> - static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type - destroy(_Alloc& __a, _Ptr __p) - noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) - { _Base_type::destroy(__a, std::__to_address(__p)); } - - static _Alloc _S_select_on_copy(const _Alloc& __a) - { return _Base_type::select_on_container_copy_construction(__a); } - - static void _S_on_swap(_Alloc& __a, _Alloc& __b) - { std::__alloc_on_swap(__a, __b); } - - static constexpr bool _S_propagate_on_copy_assign() - { return _Base_type::propagate_on_container_copy_assignment::value; } - - static constexpr bool _S_propagate_on_move_assign() - { return _Base_type::propagate_on_container_move_assignment::value; } - - static constexpr bool _S_propagate_on_swap() - { return _Base_type::propagate_on_container_swap::value; } - - static constexpr bool _S_always_equal() - { return _Base_type::is_always_equal::value; } - - static constexpr bool _S_nothrow_move() - { return _S_propagate_on_move_assign() || _S_always_equal(); } - - template<typename _Tp> - struct rebind - { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; -# 161 "/usr/include/c++/9.2.0/ext/alloc_traits.h" 3 - }; - - -} -# 41 "/usr/include/c++/9.2.0/bits/basic_string.h" 2 3 -# 52 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - -namespace __cxx11 { -# 76 "/usr/include/c++/9.2.0/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; - - - 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: -# 150 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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 - { return _M_data() == _M_local_data(); } - - - 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); } - - - - template<typename _InIterator> - void - _M_construct_aux(_InIterator __beg, _InIterator __end, - std::__false_type) - { - typedef typename iterator_traits<_InIterator>::iterator_category _Tag; - _M_construct(__beg, __end, _Tag()); - } - - - - template<typename _Integer> - void - _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) - { _M_construct_aux_2(static_cast<size_type>(__beg), __end); } - - void - _M_construct_aux_2(size_type __req, _CharT __c) - { _M_construct(__req, __c); } - - template<typename _InIterator> - void - _M_construct(_InIterator __beg, _InIterator __end) - { - typedef typename std::__is_integer<_InIterator>::__type _Integral; - _M_construct_aux(__beg, __end, _Integral()); - } - - - 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; } - - private: -# 309 "/usr/include/c++/9.2.0/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_set_length(0); } - - - - - explicit - basic_string(const _Alloc& __a) noexcept - : _M_dataplus(_M_local_data(), __a) - { _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()); } -# 461 "/usr/include/c++/9.2.0/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)); - } - - - - - - - - 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)); - } -# 492 "/usr/include/c++/9.2.0/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)); - } -# 510 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string(const _CharT* __s, size_type __n, - const _Alloc& __a = _Alloc()) - : _M_dataplus(_M_local_data(), __a) - { _M_construct(__s, __s + __n); } -# 525 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) - : _M_dataplus(_M_local_data(), __a) - { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } -# 540 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) - : _M_dataplus(_M_local_data(), __a) - { _M_construct(__n, __c); } -# 552 "/usr/include/c++/9.2.0/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, - _S_local_capacity + 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()); } - - basic_string(const basic_string& __str, const _Alloc& __a) - : _M_dataplus(_M_local_data(), __a) - { _M_construct(__str.begin(), __str.end()); } - - basic_string(basic_string&& __str, const _Alloc& __a) - noexcept(_Alloc_traits::_S_always_equal()) - : _M_dataplus(_M_local_data(), __a) - { - if (__str._M_is_local()) - { - traits_type::copy(_M_local_buf, __str._M_local_buf, - _S_local_capacity + 1); - _M_length(__str.length()); - __str._M_set_length(0); - } - else if (_Alloc_traits::_S_always_equal() - || __str.get_allocator() == __a) - { - _M_data(__str._M_data()); - _M_length(__str.length()); - _M_capacity(__str._M_allocated_capacity); - __str._M_data(__str._M_local_buf); - __str._M_set_length(0); - } - else - _M_construct(__str.begin(), __str.end()); - } -# 620 "/usr/include/c++/9.2.0/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); } -# 657 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - ~basic_string() - { _M_dispose(); } - - - - - - basic_string& - operator=(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_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()); - } - - return this->assign(__str); - } - - - - - - basic_string& - operator=(const _CharT* __s) - { return this->assign(__s); } -# 714 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - operator=(_CharT __c) - { - this->assign(1, __c); - return *this; - } -# 731 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - operator=(basic_string&& __str) - noexcept(_Alloc_traits::_S_nothrow_move()) - { - if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() - && !_Alloc_traits::_S_always_equal() - && _M_get_allocator() != __str._M_get_allocator()) - { - - _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 (__str.size()) - this->_S_copy(_M_data(), __str._M_data(), __str.size()); - _M_set_length(__str.size()); - } - else if (_Alloc_traits::_S_propagate_on_move_assign() - || _Alloc_traits::_S_always_equal() - || _M_get_allocator() == __str._M_get_allocator()) - { - - pointer __data = nullptr; - size_type __capacity; - if (!_M_is_local()) - { - if (_Alloc_traits::_S_always_equal()) - { - - __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; - } -# 825 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - iterator - begin() noexcept - { return iterator(_M_data()); } - - - - - - const_iterator - begin() const noexcept - { return const_iterator(_M_data()); } - - - - - - iterator - end() noexcept - { return iterator(_M_data() + this->size()); } - - - - - - const_iterator - end() const noexcept - { return const_iterator(_M_data() + this->size()); } - - - - - - - reverse_iterator - rbegin() noexcept - { return reverse_iterator(this->end()); } - - - - - - - const_reverse_iterator - rbegin() const noexcept - { return const_reverse_iterator(this->end()); } - - - - - - - reverse_iterator - rend() noexcept - { return reverse_iterator(this->begin()); } - - - - - - - const_reverse_iterator - rend() const noexcept - { return const_reverse_iterator(this->begin()); } - - - - - - - const_iterator - cbegin() const noexcept - { return const_iterator(this->_M_data()); } - - - - - - const_iterator - cend() const noexcept - { return const_iterator(this->_M_data() + this->size()); } - - - - - - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(this->end()); } - - - - - - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(this->begin()); } - - - public: - - - - size_type - size() const noexcept - { return _M_string_length; } - - - - size_type - length() const noexcept - { return _M_string_length; } - - - size_type - max_size() const noexcept - { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } -# 954 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - void - resize(size_type __n, _CharT __c); -# 967 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - void - resize(size_type __n) - { this->resize(__n, _CharT()); } - - - - void - shrink_to_fit() noexcept - { - - if (capacity() > size()) - { - try - { reserve(0); } - catch(...) - { } - } - - } - - - - - - - size_type - capacity() const noexcept - { - return _M_is_local() ? size_type(_S_local_capacity) - : _M_allocated_capacity; - } -# 1016 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - void - reserve(size_type __res_arg = 0); - - - - - void - clear() noexcept - { _M_set_length(0); } - - - - - - bool - empty() const noexcept - { return this->size() == 0; } -# 1045 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - const_reference - operator[] (size_type __pos) const noexcept - { - ; - return _M_data()[__pos]; - } -# 1062 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - reference - operator[](size_type __pos) - { - - - ; - - ; - return _M_data()[__pos]; - } -# 1083 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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]; - } -# 1104 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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]; - } - - - - - - - reference - front() noexcept - { - ; - return operator[](0); - } - - - - - - const_reference - front() const noexcept - { - ; - return operator[](0); - } - - - - - - reference - back() noexcept - { - ; - return operator[](this->size() - 1); - } - - - - - - const_reference - back() const noexcept - { - ; - return operator[](this->size() - 1); - } -# 1167 "/usr/include/c++/9.2.0/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()); } -# 1220 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - append(const basic_string& __str) - { return _M_append(__str._M_data(), __str.size()); } -# 1237 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - append(const basic_string& __str, size_type __pos, size_type __n = npos) - { return _M_append(__str._M_data() - + __str._M_check(__pos, "basic_string::append"), - __str._M_limit(__pos, __n)); } - - - - - - - - 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); - } -# 1279 "/usr/include/c++/9.2.0/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()); } -# 1303 "/usr/include/c++/9.2.0/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); } -# 1348 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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) - { - this->_M_assign(__str); - return *this; - } -# 1379 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - assign(basic_string&& __str) - noexcept(_Alloc_traits::_S_nothrow_move()) - { - - - return *this = std::move(__str); - } -# 1402 "/usr/include/c++/9.2.0/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)); } -# 1418 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - assign(const _CharT* __s, size_type __n) - { - ; - return _M_replace(size_type(0), this->size(), __s, __n); - } -# 1434 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - assign(const _CharT* __s) - { - ; - return _M_replace(size_type(0), this->size(), __s, - traits_type::length(__s)); - } -# 1451 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string& - assign(size_type __n, _CharT __c) - { return _M_replace_aux(size_type(0), this->size(), __n, __c); } -# 1464 "/usr/include/c++/9.2.0/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()); } -# 1533 "/usr/include/c++/9.2.0/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); - } -# 1575 "/usr/include/c++/9.2.0/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); - } -# 1611 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - iterator - insert(const_iterator __p, initializer_list<_CharT> __l) - { return this->insert(__p, __l.begin(), __l.end()); } -# 1638 "/usr/include/c++/9.2.0/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()); } -# 1661 "/usr/include/c++/9.2.0/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)); } -# 1684 "/usr/include/c++/9.2.0/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); } -# 1703 "/usr/include/c++/9.2.0/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)); - } -# 1727 "/usr/include/c++/9.2.0/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); } -# 1745 "/usr/include/c++/9.2.0/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); - } -# 1806 "/usr/include/c++/9.2.0/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; - } -# 1825 "/usr/include/c++/9.2.0/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); - } -# 1844 "/usr/include/c++/9.2.0/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 - { - ; - _M_erase(size() - 1, 1); - } -# 1888 "/usr/include/c++/9.2.0/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()); } -# 1910 "/usr/include/c++/9.2.0/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)); } -# 1935 "/usr/include/c++/9.2.0/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); - } -# 1960 "/usr/include/c++/9.2.0/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)); - } -# 1984 "/usr/include/c++/9.2.0/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); } -# 2002 "/usr/include/c++/9.2.0/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()); } -# 2022 "/usr/include/c++/9.2.0/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); - } -# 2044 "/usr/include/c++/9.2.0/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)); - } -# 2065 "/usr/include/c++/9.2.0/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); - } -# 2090 "/usr/include/c++/9.2.0/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()); - } -# 2122 "/usr/include/c++/9.2.0/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); - } -# 2181 "/usr/include/c++/9.2.0/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()); } -# 2241 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - private: - template<class _Integer> - basic_string& - _M_replace_dispatch(const_iterator __i1, const_iterator __i2, - _Integer __n, _Integer __val, __true_type) - { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } - - template<class _InputIterator> - basic_string& - _M_replace_dispatch(const_iterator __i1, const_iterator __i2, - _InputIterator __k1, _InputIterator __k2, - __false_type); - - basic_string& - _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, - _CharT __c); - - basic_string& - _M_replace(size_type __pos, size_type __len1, const _CharT* __s, - const size_type __len2); - - basic_string& - _M_append(const _CharT* __s, size_type __n); - - public: -# 2279 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - copy(_CharT* __s, size_type __n, size_type __pos = 0) const; -# 2289 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - void - swap(basic_string& __s) noexcept; -# 2299 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - const _CharT* - c_str() const noexcept - { return _M_data(); } -# 2311 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - const _CharT* - data() const noexcept - { return _M_data(); } -# 2330 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - allocator_type - get_allocator() const noexcept - { return _M_get_allocator(); } -# 2346 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find(const _CharT* __s, size_type __pos, size_type __n) const - noexcept; -# 2360 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find(const basic_string& __str, size_type __pos = 0) const - noexcept - { return this->find(__str.data(), __pos, __str.size()); } -# 2392 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find(const _CharT* __s, size_type __pos = 0) const noexcept - { - ; - return this->find(__s, __pos, traits_type::length(__s)); - } -# 2409 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find(_CharT __c, size_type __pos = 0) const noexcept; -# 2422 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - rfind(const basic_string& __str, size_type __pos = npos) const - noexcept - { return this->rfind(__str.data(), __pos, __str.size()); } -# 2456 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - rfind(const _CharT* __s, size_type __pos, size_type __n) const - noexcept; -# 2470 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - rfind(const _CharT* __s, size_type __pos = npos) const - { - ; - return this->rfind(__s, __pos, traits_type::length(__s)); - } -# 2487 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - rfind(_CharT __c, size_type __pos = npos) const noexcept; -# 2501 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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()); } -# 2536 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_first_of(const _CharT* __s, size_type __pos, size_type __n) const - noexcept; -# 2550 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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)); - } -# 2570 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_first_of(_CharT __c, size_type __pos = 0) const noexcept - { return this->find(__c, __pos); } -# 2585 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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()); } -# 2620 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_last_of(const _CharT* __s, size_type __pos, size_type __n) const - noexcept; -# 2634 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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)); - } -# 2654 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_last_of(_CharT __c, size_type __pos = npos) const noexcept - { return this->rfind(__c, __pos); } -# 2668 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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()); } -# 2703 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_first_not_of(const _CharT* __s, size_type __pos, - size_type __n) const noexcept; -# 2717 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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)); - } -# 2735 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_first_not_of(_CharT __c, size_type __pos = 0) const - noexcept; -# 2750 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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()); } -# 2785 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_last_not_of(const _CharT* __s, size_type __pos, - size_type __n) const noexcept; -# 2799 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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)); - } -# 2817 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - size_type - find_last_not_of(_CharT __c, size_type __pos = npos) const - noexcept; -# 2833 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - basic_string - substr(size_type __pos = 0, size_type __n = npos) const - { return basic_string(*this, - _M_check(__pos, "basic_string::substr"), __n); } -# 2852 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - 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; - } -# 2945 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - int - compare(size_type __pos, size_type __n, const basic_string& __str) const; -# 2971 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - int - compare(size_type __pos1, size_type __n1, const basic_string& __str, - size_type __pos2, size_type __n2 = npos) const; -# 2989 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - int - compare(const _CharT* __s) const noexcept; -# 3013 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - int - compare(size_type __pos, size_type __n1, const _CharT* __s) const; -# 3040 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - int - compare(size_type __pos, size_type __n1, const _CharT* __s, - size_type __n2) const; -# 3071 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename, typename, typename> friend class basic_stringbuf; - }; -} -# 6018 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc> - operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { - basic_string<_CharT, _Traits, _Alloc> __str(__lhs); - __str.append(__rhs); - return __str; - } - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT,_Traits,_Alloc> - operator+(const _CharT* __lhs, - const basic_string<_CharT,_Traits,_Alloc>& __rhs); - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT,_Traits,_Alloc> - operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, - const _CharT* __rhs) - { - basic_string<_CharT, _Traits, _Alloc> __str(__lhs); - __str.append(__rhs); - return __str; - } - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) - { - typedef basic_string<_CharT, _Traits, _Alloc> __string_type; - typedef typename __string_type::size_type __size_type; - __string_type __str(__lhs); - __str.append(__size_type(1), __rhs); - return __str; - } - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return std::move(__lhs.append(__rhs)); } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, - basic_string<_CharT, _Traits, _Alloc>&& __rhs) - { return std::move(__rhs.insert(0, __lhs)); } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, - basic_string<_CharT, _Traits, _Alloc>&& __rhs) - { - const auto __size = __lhs.size() + __rhs.size(); - const bool __cond = (__size > __lhs.capacity() - && __size <= __rhs.capacity()); - return __cond ? std::move(__rhs.insert(0, __lhs)) - : std::move(__lhs.append(__rhs)); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(const _CharT* __lhs, - basic_string<_CharT, _Traits, _Alloc>&& __rhs) - { return std::move(__rhs.insert(0, __lhs)); } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(_CharT __lhs, - basic_string<_CharT, _Traits, _Alloc>&& __rhs) - { return std::move(__rhs.insert(0, 1, __lhs)); } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, - const _CharT* __rhs) - { return std::move(__lhs.append(__rhs)); } - - template<typename _CharT, typename _Traits, typename _Alloc> - inline basic_string<_CharT, _Traits, _Alloc> - operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, - _CharT __rhs) - { return std::move(__lhs.append(1, __rhs)); } -# 6139 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - inline - typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type - operator==(const basic_string<_CharT>& __lhs, - const basic_string<_CharT>& __rhs) noexcept - { return (__lhs.size() == __rhs.size() - && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), - __lhs.size())); } - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline bool - operator==(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return __rhs.compare(__lhs) == 0; } - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline bool - operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, - const _CharT* __rhs) - { return __lhs.compare(__rhs) == 0; } -# 6186 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - inline bool - operator!=(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return !(__lhs == __rhs); } - - - - - - - - template<typename _CharT, typename _Traits, typename _Alloc> - inline bool - operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, - const _CharT* __rhs) - { return !(__lhs == __rhs); } -# 6224 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - 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> - inline bool - operator<(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return __rhs.compare(__lhs) > 0; } -# 6262 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - 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> - inline bool - operator>(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return __rhs.compare(__lhs) < 0; } -# 6300 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - 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> - inline bool - operator<=(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return __rhs.compare(__lhs) >= 0; } -# 6338 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - 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> - 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> - inline bool - operator>=(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { return __rhs.compare(__lhs) <= 0; } -# 6376 "/usr/include/c++/9.2.0/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); } -# 6396 "/usr/include/c++/9.2.0/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); -# 6414 "/usr/include/c++/9.2.0/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()); - } -# 6437 "/usr/include/c++/9.2.0/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); -# 6454 "/usr/include/c++/9.2.0/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++/9.2.0/ext/string_conversions.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/string_conversions.h" 3 - -# 33 "/usr/include/c++/9.2.0/ext/string_conversions.h" 3 -# 41 "/usr/include/c++/9.2.0/ext/string_conversions.h" 3 -# 1 "/usr/include/c++/9.2.0/cstdlib" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 - -# 40 "/usr/include/c++/9.2.0/cstdlib" 3 -# 75 "/usr/include/c++/9.2.0/cstdlib" 3 -# 1 "/usr/include/stdlib.h" 1 3 4 -# 25 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 26 "/usr/include/stdlib.h" 2 3 4 - - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 32 "/usr/include/stdlib.h" 2 3 4 - -extern "C" { - - - - - -# 1 "/usr/include/bits/waitflags.h" 1 3 4 -# 40 "/usr/include/stdlib.h" 2 3 4 -# 1 "/usr/include/bits/waitstatus.h" 1 3 4 -# 41 "/usr/include/stdlib.h" 2 3 4 -# 58 "/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; -# 97 "/usr/include/stdlib.h" 3 4 -extern size_t __ctype_get_mb_cur_max (void) throw () ; - - - -extern double atof (const char *__nptr) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - -extern int atoi (const char *__nptr) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - -extern long int atol (const char *__nptr) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - - - -__extension__ extern long long int atoll (const char *__nptr) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - - - -extern double strtod (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern float strtof (const char *__restrict __nptr, - char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); - -extern long double strtold (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); -# 140 "/usr/include/stdlib.h" 3 4 -extern _Float32 strtof32 (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern _Float64 strtof64 (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern _Float128 strtof128 (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern _Float32x strtof32x (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); - - - -extern _Float64x strtof64x (const char *__restrict __nptr, - char **__restrict __endptr) - throw () __attribute__ ((__nonnull__ (1))); -# 176 "/usr/include/stdlib.h" 3 4 -extern long int strtol (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - -extern unsigned long int strtoul (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - - - -__extension__ -extern long long int strtoq (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - -__extension__ -extern unsigned long long int strtouq (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - - - - -__extension__ -extern long long int strtoll (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - -__extension__ -extern unsigned long long int strtoull (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - throw () __attribute__ ((__nonnull__ (1))); - - - - -extern int strfromd (char *__dest, size_t __size, const char *__format, - double __f) - throw () __attribute__ ((__nonnull__ (3))); - -extern int strfromf (char *__dest, size_t __size, const char *__format, - float __f) - throw () __attribute__ ((__nonnull__ (3))); - -extern int strfroml (char *__dest, size_t __size, const char *__format, - long double __f) - throw () __attribute__ ((__nonnull__ (3))); -# 232 "/usr/include/stdlib.h" 3 4 -extern int strfromf32 (char *__dest, size_t __size, const char * __format, - _Float32 __f) - throw () __attribute__ ((__nonnull__ (3))); - - - -extern int strfromf64 (char *__dest, size_t __size, const char * __format, - _Float64 __f) - throw () __attribute__ ((__nonnull__ (3))); - - - -extern int strfromf128 (char *__dest, size_t __size, const char * __format, - _Float128 __f) - throw () __attribute__ ((__nonnull__ (3))); - - - -extern int strfromf32x (char *__dest, size_t __size, const char * __format, - _Float32x __f) - throw () __attribute__ ((__nonnull__ (3))); - - - -extern int strfromf64x (char *__dest, size_t __size, const char * __format, - _Float64x __f) - throw () __attribute__ ((__nonnull__ (3))); -# 274 "/usr/include/stdlib.h" 3 4 -extern long int strtol_l (const char *__restrict __nptr, - char **__restrict __endptr, int __base, - locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); - -extern unsigned long int strtoul_l (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 4))); - -__extension__ -extern long long int strtoll_l (const char *__restrict __nptr, - char **__restrict __endptr, int __base, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 4))); - -__extension__ -extern unsigned long long int strtoull_l (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 4))); - -extern double strtod_l (const char *__restrict __nptr, - char **__restrict __endptr, locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - -extern float strtof_l (const char *__restrict __nptr, - char **__restrict __endptr, locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - -extern long double strtold_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); -# 316 "/usr/include/stdlib.h" 3 4 -extern _Float32 strtof32_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern _Float64 strtof64_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern _Float128 strtof128_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern _Float32x strtof32x_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); - - - -extern _Float64x strtof64x_l (const char *__restrict __nptr, - char **__restrict __endptr, - locale_t __loc) - throw () __attribute__ ((__nonnull__ (1, 3))); -# 385 "/usr/include/stdlib.h" 3 4 -extern char *l64a (long int __n) throw () ; - - -extern long int a64l (const char *__s) - throw () __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 __ino_t ino_t; - - - - - - -typedef __ino64_t ino64_t; - - - - -typedef __dev_t dev_t; - - - - -typedef __gid_t gid_t; - - - - -typedef __mode_t mode_t; - - - - -typedef __nlink_t nlink_t; - - - - -typedef __uid_t uid_t; - - - - - -typedef __off_t off_t; - - - - - - -typedef __off64_t off64_t; -# 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-pc-linux-gnu/9.2.0/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; - - - - - - - -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__))); -# 179 "/usr/include/sys/types.h" 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 -# 22 "/usr/include/bits/select.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 23 "/usr/include/bits/select.h" 2 3 4 -# 31 "/usr/include/sys/select.h" 2 3 4 - - -# 1 "/usr/include/bits/types/sigset_t.h" 1 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; -# 5 "/usr/include/bits/types/sigset_t.h" 2 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" { -# 101 "/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); -# 113 "/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); -# 126 "/usr/include/sys/select.h" 3 4 -} -# 180 "/usr/include/sys/types.h" 2 3 4 - - - - - -typedef __blksize_t blksize_t; - - - - - - -typedef __blkcnt_t blkcnt_t; - - - -typedef __fsblkcnt_t fsblkcnt_t; - - - -typedef __fsfilcnt_t fsfilcnt_t; -# 219 "/usr/include/sys/types.h" 3 4 -typedef __blkcnt64_t blkcnt64_t; -typedef __fsblkcnt64_t fsblkcnt64_t; -typedef __fsfilcnt64_t fsfilcnt64_t; -# 230 "/usr/include/sys/types.h" 3 4 -} -# 395 "/usr/include/stdlib.h" 2 3 4 - - - - - - -extern long int random (void) throw (); - - -extern void srandom (unsigned int __seed) throw (); - - - - - -extern char *initstate (unsigned int __seed, char *__statebuf, - size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); - - - -extern char *setstate (char *__statebuf) throw () __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) throw () __attribute__ ((__nonnull__ (1, 2))); - -extern int srandom_r (unsigned int __seed, struct random_data *__buf) - throw () __attribute__ ((__nonnull__ (2))); - -extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, - size_t __statelen, - struct random_data *__restrict __buf) - throw () __attribute__ ((__nonnull__ (2, 4))); - -extern int setstate_r (char *__restrict __statebuf, - struct random_data *__restrict __buf) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - - -extern int rand (void) throw (); - -extern void srand (unsigned int __seed) throw (); - - - -extern int rand_r (unsigned int *__seed) throw (); - - - - - - - -extern double drand48 (void) throw (); -extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); - - -extern long int lrand48 (void) throw (); -extern long int nrand48 (unsigned short int __xsubi[3]) - throw () __attribute__ ((__nonnull__ (1))); - - -extern long int mrand48 (void) throw (); -extern long int jrand48 (unsigned short int __xsubi[3]) - throw () __attribute__ ((__nonnull__ (1))); - - -extern void srand48 (long int __seedval) throw (); -extern unsigned short int *seed48 (unsigned short int __seed16v[3]) - throw () __attribute__ ((__nonnull__ (1))); -extern void lcong48 (unsigned short int __param[7]) throw () __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) throw () __attribute__ ((__nonnull__ (1, 2))); -extern int erand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int lrand48_r (struct drand48_data *__restrict __buffer, - long int *__restrict __result) - throw () __attribute__ ((__nonnull__ (1, 2))); -extern int nrand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int mrand48_r (struct drand48_data *__restrict __buffer, - long int *__restrict __result) - throw () __attribute__ ((__nonnull__ (1, 2))); -extern int jrand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int srand48_r (long int __seedval, struct drand48_data *__buffer) - throw () __attribute__ ((__nonnull__ (2))); - -extern int seed48_r (unsigned short int __seed16v[3], - struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); - -extern int lcong48_r (unsigned short int __param[7], - struct drand48_data *__buffer) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) - __attribute__ ((__alloc_size__ (1))) ; - -extern void *calloc (size_t __nmemb, size_t __size) - throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) ; - - - - - - -extern void *realloc (void *__ptr, size_t __size) - throw () __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); - - - - - - - -extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) - throw () __attribute__ ((__warn_unused_result__)) - __attribute__ ((__alloc_size__ (2, 3))); - - - -extern void free (void *__ptr) throw (); - - -# 1 "/usr/include/alloca.h" 1 3 4 -# 24 "/usr/include/alloca.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 25 "/usr/include/alloca.h" 2 3 4 - -extern "C" { - - - - - -extern void *alloca (size_t __size) throw (); - - - - - -} -# 569 "/usr/include/stdlib.h" 2 3 4 - - - - - -extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) - __attribute__ ((__alloc_size__ (1))) ; - - - - -extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) - throw () __attribute__ ((__nonnull__ (1))) ; - - - - -extern void *aligned_alloc (size_t __alignment, size_t __size) - throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ; - - - -extern void abort (void) throw () __attribute__ ((__noreturn__)); - - - -extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); - - - - -extern "C++" int at_quick_exit (void (*__func) (void)) - throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); -# 610 "/usr/include/stdlib.h" 3 4 -extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) - throw () __attribute__ ((__nonnull__ (1))); - - - - - -extern void exit (int __status) throw () __attribute__ ((__noreturn__)); - - - - - -extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); - - - - - -extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); - - - - -extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; - - - - -extern char *secure_getenv (const char *__name) - throw () __attribute__ ((__nonnull__ (1))) ; - - - - - - -extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); - - - - - -extern int setenv (const char *__name, const char *__value, int __replace) - throw () __attribute__ ((__nonnull__ (2))); - - -extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))); - - - - - - -extern int clearenv (void) throw (); -# 675 "/usr/include/stdlib.h" 3 4 -extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); -# 688 "/usr/include/stdlib.h" 3 4 -extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; -# 698 "/usr/include/stdlib.h" 3 4 -extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; -# 710 "/usr/include/stdlib.h" 3 4 -extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; -# 720 "/usr/include/stdlib.h" 3 4 -extern int mkstemps64 (char *__template, int __suffixlen) - __attribute__ ((__nonnull__ (1))) ; -# 731 "/usr/include/stdlib.h" 3 4 -extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; -# 742 "/usr/include/stdlib.h" 3 4 -extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; -# 752 "/usr/include/stdlib.h" 3 4 -extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; -# 762 "/usr/include/stdlib.h" 3 4 -extern int mkostemps (char *__template, int __suffixlen, int __flags) - __attribute__ ((__nonnull__ (1))) ; -# 774 "/usr/include/stdlib.h" 3 4 -extern int mkostemps64 (char *__template, int __suffixlen, int __flags) - __attribute__ ((__nonnull__ (1))) ; -# 784 "/usr/include/stdlib.h" 3 4 -extern int system (const char *__command) ; - - - - - -extern char *canonicalize_file_name (const char *__name) - throw () __attribute__ ((__nonnull__ (1))) ; -# 800 "/usr/include/stdlib.h" 3 4 -extern char *realpath (const char *__restrict __name, - char *__restrict __resolved) throw () ; - - - - - - -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) throw () __attribute__ ((__const__)) ; -extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; - - -__extension__ extern long long int llabs (long long int __x) - throw () __attribute__ ((__const__)) ; - - - - - - -extern div_t div (int __numer, int __denom) - throw () __attribute__ ((__const__)) ; -extern ldiv_t ldiv (long int __numer, long int __denom) - throw () __attribute__ ((__const__)) ; - - -__extension__ extern lldiv_t lldiv (long long int __numer, - long long int __denom) - throw () __attribute__ ((__const__)) ; -# 872 "/usr/include/stdlib.h" 3 4 -extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; - - - - -extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; - - - - -extern char *gcvt (double __value, int __ndigit, char *__buf) - throw () __attribute__ ((__nonnull__ (3))) ; - - - - -extern char *qecvt (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign) - throw () __attribute__ ((__nonnull__ (3, 4))) ; -extern char *qfcvt (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign) - throw () __attribute__ ((__nonnull__ (3, 4))) ; -extern char *qgcvt (long double __value, int __ndigit, char *__buf) - throw () __attribute__ ((__nonnull__ (3))) ; - - - - -extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign, char *__restrict __buf, - size_t __len) throw () __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) throw () __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) - throw () __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) - throw () __attribute__ ((__nonnull__ (3, 4, 5))); - - - - - -extern int mblen (const char *__s, size_t __n) throw (); - - -extern int mbtowc (wchar_t *__restrict __pwc, - const char *__restrict __s, size_t __n) throw (); - - -extern int wctomb (char *__s, wchar_t __wchar) throw (); - - - -extern size_t mbstowcs (wchar_t *__restrict __pwcs, - const char *__restrict __s, size_t __n) throw (); - -extern size_t wcstombs (char *__restrict __s, - const wchar_t *__restrict __pwcs, size_t __n) - throw (); - - - - - - - -extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; -# 957 "/usr/include/stdlib.h" 3 4 -extern int getsubopt (char **__restrict __optionp, - char *const *__restrict __tokens, - char **__restrict __valuep) - throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; - - - - - - - -extern int posix_openpt (int __oflag) ; - - - - - - - -extern int grantpt (int __fd) throw (); - - - -extern int unlockpt (int __fd) throw (); - - - - -extern char *ptsname (int __fd) throw () ; - - - - - - -extern int ptsname_r (int __fd, char *__buf, size_t __buflen) - throw () __attribute__ ((__nonnull__ (2))); - - -extern int getpt (void); - - - - - - -extern int getloadavg (double __loadavg[], int __nelem) - throw () __attribute__ ((__nonnull__ (1))); -# 1013 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/include/bits/stdlib-float.h" 1 3 4 -# 1014 "/usr/include/stdlib.h" 2 3 4 -# 1023 "/usr/include/stdlib.h" 3 4 -} -# 76 "/usr/include/c++/9.2.0/cstdlib" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/std_abs.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/std_abs.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/std_abs.h" 3 -# 46 "/usr/include/c++/9.2.0/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++/9.2.0/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); } - - - - inline constexpr __int128 - abs(__int128 __x) { return __x >= 0 ? __x : -__x; } -# 101 "/usr/include/c++/9.2.0/bits/std_abs.h" 3 - inline constexpr - __float128 - abs(__float128 __x) - { return __x < 0 ? -__x : __x; } - - - -} -} -# 78 "/usr/include/c++/9.2.0/cstdlib" 2 3 -# 121 "/usr/include/c++/9.2.0/cstdlib" 3 -extern "C++" -{ -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - using ::div_t; - using ::ldiv_t; - - using ::abort; - - - - 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) { return ldiv(__i, __j); } - - - - -} -# 195 "/usr/include/c++/9.2.0/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; -# 227 "/usr/include/c++/9.2.0/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; -} - - - -} -# 42 "/usr/include/c++/9.2.0/ext/string_conversions.h" 2 3 -# 1 "/usr/include/c++/9.2.0/cwchar" 1 3 -# 39 "/usr/include/c++/9.2.0/cwchar" 3 - -# 40 "/usr/include/c++/9.2.0/cwchar" 3 -# 43 "/usr/include/c++/9.2.0/ext/string_conversions.h" 2 3 -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 - -# 40 "/usr/include/c++/9.2.0/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-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 34 "/usr/include/stdio.h" 2 3 4 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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; -# 84 "/usr/include/stdio.h" 3 4 -typedef __fpos_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 - - - -extern FILE *stdin; -extern FILE *stdout; -extern FILE *stderr; - - - - - - -extern int remove (const char *__filename) throw (); - -extern int rename (const char *__old, const char *__new) throw (); - - - -extern int renameat (int __oldfd, const char *__old, int __newfd, - const char *__new) throw (); -# 164 "/usr/include/stdio.h" 3 4 -extern int renameat2 (int __oldfd, const char *__old, int __newfd, - const char *__new, unsigned int __flags) throw (); - - - - - - - -extern FILE *tmpfile (void) ; -# 183 "/usr/include/stdio.h" 3 4 -extern FILE *tmpfile64 (void) ; - - - -extern char *tmpnam (char *__s) throw () ; - - - - -extern char *tmpnam_r (char *__s) throw () ; -# 204 "/usr/include/stdio.h" 3 4 -extern char *tempnam (const char *__dir, const char *__pfx) - throw () __attribute__ ((__malloc__)) ; - - - - - - - -extern int fclose (FILE *__stream); - - - - -extern int fflush (FILE *__stream); -# 227 "/usr/include/stdio.h" 3 4 -extern int fflush_unlocked (FILE *__stream); -# 237 "/usr/include/stdio.h" 3 4 -extern int fcloseall (void); -# 246 "/usr/include/stdio.h" 3 4 -extern FILE *fopen (const char *__restrict __filename, - const char *__restrict __modes) ; - - - - -extern FILE *freopen (const char *__restrict __filename, - const char *__restrict __modes, - FILE *__restrict __stream) ; -# 270 "/usr/include/stdio.h" 3 4 -extern FILE *fopen64 (const char *__restrict __filename, - const char *__restrict __modes) ; -extern FILE *freopen64 (const char *__restrict __filename, - const char *__restrict __modes, - FILE *__restrict __stream) ; - - - - -extern FILE *fdopen (int __fd, const char *__modes) throw () ; - - - - - -extern FILE *fopencookie (void *__restrict __magic_cookie, - const char *__restrict __modes, - cookie_io_functions_t __io_funcs) throw () ; - - - - -extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) - throw () ; - - - - -extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; - - - - - -extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); - - - -extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, - int __modes, size_t __n) throw (); - - - - -extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, - size_t __size) throw (); - - -extern void setlinebuf (FILE *__stream) throw (); - - - - - - - -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, ...) throw (); - - - - - -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) throw (); - - - -extern int snprintf (char *__restrict __s, size_t __maxlen, - const char *__restrict __format, ...) - throw () __attribute__ ((__format__ (__printf__, 3, 4))); - -extern int vsnprintf (char *__restrict __s, size_t __maxlen, - const char *__restrict __format, __gnuc_va_list __arg) - throw () __attribute__ ((__format__ (__printf__, 3, 0))); - - - - - -extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, - __gnuc_va_list __arg) - throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; -extern int __asprintf (char **__restrict __ptr, - const char *__restrict __fmt, ...) - throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; -extern int asprintf (char **__restrict __ptr, - const char *__restrict __fmt, ...) - throw () __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, ...) throw (); - - - - - - -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, ...) throw () __asm__ ("" "__isoc99_sscanf") - - ; -# 432 "/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) - throw () __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) throw () __asm__ ("" "__isoc99_vsscanf") - - - - __attribute__ ((__format__ (__scanf__, 2, 0))); -# 485 "/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); -# 510 "/usr/include/stdio.h" 3 4 -extern int fgetc_unlocked (FILE *__stream); -# 521 "/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); -# 537 "/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) - ; -# 587 "/usr/include/stdio.h" 3 4 -extern char *fgets_unlocked (char *__restrict __s, int __n, - FILE *__restrict __stream) ; -# 603 "/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); -# 662 "/usr/include/stdio.h" 3 4 -extern int fputs_unlocked (const char *__restrict __s, - FILE *__restrict __stream); -# 673 "/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); -# 707 "/usr/include/stdio.h" 3 4 -extern int fseeko (FILE *__stream, __off_t __off, int __whence); - - - - -extern __off_t ftello (FILE *__stream) ; -# 731 "/usr/include/stdio.h" 3 4 -extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); - - - - -extern int fsetpos (FILE *__stream, const fpos_t *__pos); -# 750 "/usr/include/stdio.h" 3 4 -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) throw (); - -extern int feof (FILE *__stream) throw () ; - -extern int ferror (FILE *__stream) throw () ; - - - -extern void clearerr_unlocked (FILE *__stream) throw (); -extern int feof_unlocked (FILE *__stream) throw () ; -extern int ferror_unlocked (FILE *__stream) throw () ; - - - - - - - -extern void perror (const char *__s); - - - - - -# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 -# 26 "/usr/include/bits/sys_errlist.h" 3 4 -extern int sys_nerr; -extern const char *const sys_errlist[]; - - -extern int _sys_nerr; -extern const char *const _sys_errlist[]; -# 782 "/usr/include/stdio.h" 2 3 4 - - - - -extern int fileno (FILE *__stream) throw () ; - - - - -extern int fileno_unlocked (FILE *__stream) throw () ; -# 800 "/usr/include/stdio.h" 3 4 -extern FILE *popen (const char *__command, const char *__modes) ; - - - - - -extern int pclose (FILE *__stream); - - - - - -extern char *ctermid (char *__s) throw (); - - - - - -extern char *cuserid (char *__s); - - - - -struct obstack; - - -extern int obstack_printf (struct obstack *__restrict __obstack, - const char *__restrict __format, ...) - throw () __attribute__ ((__format__ (__printf__, 2, 3))); -extern int obstack_vprintf (struct obstack *__restrict __obstack, - const char *__restrict __format, - __gnuc_va_list __args) - throw () __attribute__ ((__format__ (__printf__, 2, 0))); - - - - - - - -extern void flockfile (FILE *__stream) throw (); - - - -extern int ftrylockfile (FILE *__stream) throw () ; - - -extern void funlockfile (FILE *__stream) throw (); -# 858 "/usr/include/stdio.h" 3 4 -extern int __uflow (FILE *); -extern int __overflow (FILE *, int); -# 873 "/usr/include/stdio.h" 3 4 -} -# 43 "/usr/include/c++/9.2.0/cstdio" 2 3 -# 96 "/usr/include/c++/9.2.0/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++/9.2.0/cstdio" 3 -namespace __gnu_cxx -{ -# 175 "/usr/include/c++/9.2.0/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; -} -# 44 "/usr/include/c++/9.2.0/ext/string_conversions.h" 2 3 -# 1 "/usr/include/c++/9.2.0/cerrno" 1 3 -# 39 "/usr/include/c++/9.2.0/cerrno" 3 - -# 40 "/usr/include/c++/9.2.0/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 -# 1 "/usr/include/asm/errno.h" 2 3 4 -# 1 "/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) throw () __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++/9.2.0/cerrno" 2 3 -# 45 "/usr/include/c++/9.2.0/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); - } - - -} -# 6494 "/usr/include/c++/9.2.0/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); } - - - - - - - inline string - to_string(int __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int), - "%d", __val); } - - inline string - to_string(unsigned __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, - 4 * sizeof(unsigned), - "%u", __val); } - - inline string - to_string(long __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long), - "%ld", __val); } - - inline string - to_string(unsigned long __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, - 4 * sizeof(unsigned long), - "%lu", __val); } - - inline string - to_string(long long __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, - 4 * sizeof(long long), - "%lld", __val); } - - inline string - to_string(unsigned long long __val) - { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, - 4 * sizeof(unsigned long long), - "%llu", __val); } - - inline string - to_string(float __val) - { - const int __n = - __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, - "%f", __val); - } - - inline string - to_string(double __val) - { - const int __n = - __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, - "%f", __val); - } - - inline string - to_string(long double __val) - { - const int __n = - __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, - "%Lf", __val); - } - - - - 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); } - - - - inline wstring - to_wstring(int __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int), - L"%d", __val); } - - inline wstring - to_wstring(unsigned __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, - 4 * sizeof(unsigned), - L"%u", __val); } - - inline wstring - to_wstring(long __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long), - L"%ld", __val); } - - inline wstring - to_wstring(unsigned long __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, - 4 * sizeof(unsigned long), - L"%lu", __val); } - - inline wstring - to_wstring(long long __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, - 4 * sizeof(long long), - L"%lld", __val); } - - inline wstring - to_wstring(unsigned long long __val) - { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, - 4 * sizeof(unsigned long long), - L"%llu", __val); } - - inline wstring - to_wstring(float __val) - { - const int __n = - __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, - L"%f", __val); - } - - inline wstring - to_wstring(double __val) - { - const int __n = - __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, - L"%f", __val); - } - - inline wstring - to_wstring(long double __val) - { - const int __n = - __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; - return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, - L"%Lf", __val); - } - - - -} - -} - - - - - -# 1 "/usr/include/c++/9.2.0/bits/functional_hash.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/functional_hash.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/functional_hash.h" 3 - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 49 "/usr/include/c++/9.2.0/bits/functional_hash.h" 3 - template<typename _Result, typename _Arg> - struct __hash_base - { - typedef _Result result_type ; - typedef _Arg argument_type ; - }; - - - 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); } - }; -# 124 "/usr/include/c++/9.2.0/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); } }; - - - template<> struct hash<__int128> : public __hash_base<size_t, __int128> { size_t operator()(__int128 __val) const noexcept { return static_cast<size_t>(__val); } }; - template<> struct hash<__int128 unsigned> : public __hash_base<size_t, __int128 unsigned> { size_t operator()(__int128 unsigned __val) const noexcept { return static_cast<size_t>(__val); } }; -# 192 "/usr/include/c++/9.2.0/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; - }; -# 278 "/usr/include/c++/9.2.0/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 - { }; - - -} -# 6720 "/usr/include/c++/9.2.0/bits/basic_string.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - template<> - struct hash<string> - : public __hash_base<size_t, string> - { - size_t - operator()(const string& __s) const noexcept - { return std::_Hash_impl::hash(__s.data(), __s.length()); } - }; - - template<> - struct __is_fast_hash<hash<string>> : std::false_type - { }; - - - - template<> - struct hash<wstring> - : public __hash_base<size_t, wstring> - { - size_t - operator()(const wstring& __s) const noexcept - { return std::_Hash_impl::hash(__s.data(), - __s.length() * sizeof(wchar_t)); } - }; - - template<> - struct __is_fast_hash<hash<wstring>> : std::false_type - { }; -# 6778 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - template<> - struct hash<u16string> - : public __hash_base<size_t, u16string> - { - size_t - operator()(const u16string& __s) const noexcept - { return std::_Hash_impl::hash(__s.data(), - __s.length() * sizeof(char16_t)); } - }; - - template<> - struct __is_fast_hash<hash<u16string>> : std::false_type - { }; - - - template<> - struct hash<u32string> - : public __hash_base<size_t, u32string> - { - size_t - operator()(const u32string& __s) const noexcept - { return std::_Hash_impl::hash(__s.data(), - __s.length() * sizeof(char32_t)); } - }; - - template<> - struct __is_fast_hash<hash<u32string>> : std::false_type - { }; - - - - - - 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}; } -# 6836 "/usr/include/c++/9.2.0/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 - } - } -# 6868 "/usr/include/c++/9.2.0/bits/basic_string.h" 3 - -} -# 56 "/usr/include/c++/9.2.0/string" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/basic_string.tcc" 1 3 -# 42 "/usr/include/c++/9.2.0/bits/basic_string.tcc" 3 - -# 43 "/usr/include/c++/9.2.0/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 == &__s) - return; - - _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); - - if (_M_is_local()) - if (__s._M_is_local()) - { - if (length() && __s.length()) - { - _CharT __tmp_data[_S_local_capacity + 1]; - traits_type::copy(__tmp_data, __s._M_local_buf, - _S_local_capacity + 1); - traits_type::copy(__s._M_local_buf, _M_local_buf, - _S_local_capacity + 1); - traits_type::copy(_M_local_buf, __tmp_data, - _S_local_capacity + 1); - } - else if (__s.length()) - { - traits_type::copy(_M_local_buf, __s._M_local_buf, - _S_local_capacity + 1); - _M_length(__s.length()); - __s._M_set_length(0); - return; - } - else if (length()) - { - traits_type::copy(__s._M_local_buf, _M_local_buf, - _S_local_capacity + 1); - __s._M_length(length()); - _M_set_length(0); - return; - } - } - else - { - const size_type __tmp_capacity = __s._M_allocated_capacity; - traits_type::copy(__s._M_local_buf, _M_local_buf, - _S_local_capacity + 1); - _M_data(__s._M_data()); - __s._M_data(__s._M_local_buf); - _M_capacity(__tmp_capacity); - } - else - { - const size_type __tmp_capacity = _M_allocated_capacity; - if (__s._M_is_local()) - { - traits_type::copy(_M_local_buf, __s._M_local_buf, - _S_local_capacity + 1); - __s._M_data(_M_data()); - _M_data(_M_local_buf); - } - else - { - pointer __tmp_ptr = _M_data(); - _M_data(__s._M_data()); - __s._M_data(__tmp_ptr); - _M_capacity(__s._M_allocated_capacity); - } - __s._M_capacity(__tmp_capacity); - } - - const size_type __tmp_length = length(); - _M_length(__s.length()); - __s._M_length(__tmp_length); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - typename basic_string<_CharT, _Traits, _Alloc>::pointer - basic_string<_CharT, _Traits, _Alloc>:: - _M_create(size_type& __capacity, size_type __old_capacity) - { - - - 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); - - while (__beg != __end && __len < __capacity) - { - _M_data()[__len++] = *__beg; - ++__beg; - } - - try - { - 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); - } - _M_data()[__len++] = *__beg; - ++__beg; - } - } - catch(...) - { - _M_dispose(); - throw; - } - - _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) - { - - if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) - std::__throw_logic_error(("basic_string::" "_M_construct null not valid") - ); - - size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); - - if (__dnew > size_type(_S_local_capacity)) - { - _M_data(_M_create(__dnew, size_type(0))); - _M_capacity(__dnew); - } - - - try - { this->_S_copy_chars(_M_data(), __beg, __end); } - catch(...) - { - _M_dispose(); - throw; - } - - _M_set_length(__dnew); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - _M_construct(size_type __n, _CharT __c) - { - if (__n > size_type(_S_local_capacity)) - { - _M_data(_M_create(__n, size_type(0))); - _M_capacity(__n); - } - - if (__n) - this->_S_assign(_M_data(), __n, __c); - - _M_set_length(__n); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - _M_assign(const basic_string& __str) - { - if (this != &__str) - { - const size_type __rsize = __str.length(); - const size_type __capacity = capacity(); - - if (__rsize > __capacity) - { - size_type __new_capacity = __rsize; - pointer __tmp = _M_create(__new_capacity, __capacity); - _M_dispose(); - _M_data(__tmp); - _M_capacity(__new_capacity); - } - - if (__rsize) - this->_S_copy(_M_data(), __str._M_data(), __rsize); - - _M_set_length(__rsize); - } - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - reserve(size_type __res) - { - - if (__res < length()) - __res = length(); - - const size_type __capacity = capacity(); - if (__res != __capacity) - { - if (__res > __capacity - || __res > size_type(_S_local_capacity)) - { - pointer __tmp = _M_create(__res, __capacity); - this->_S_copy(__tmp, _M_data(), length() + 1); - _M_dispose(); - _M_data(__tmp); - _M_capacity(__res); - } - else if (!_M_is_local()) - { - this->_S_copy(_M_local_data(), _M_data(), length() + 1); - _M_destroy(__capacity); - _M_data(_M_local_data()); - } - } - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, - size_type __len2) - { - const size_type __how_much = length() - __pos - __len1; - - size_type __new_capacity = length() + __len2 - __len1; - pointer __r = _M_create(__new_capacity, capacity()); - - if (__pos) - this->_S_copy(__r, _M_data(), __pos); - if (__s && __len2) - this->_S_copy(__r + __pos, __s, __len2); - if (__how_much) - this->_S_copy(__r + __pos + __len2, - _M_data() + __pos + __len1, __how_much); - - _M_dispose(); - _M_data(__r); - _M_capacity(__new_capacity); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - _M_erase(size_type __pos, size_type __n) - { - const size_type __how_much = length() - __pos - __n; - - if (__how_much && __n) - this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); - - _M_set_length(length() - __n); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - void - basic_string<_CharT, _Traits, _Alloc>:: - resize(size_type __n, _CharT __c) - { - const size_type __size = this->size(); - if (__size < __n) - this->append(__n - __size, __c); - else if (__n < __size) - this->_M_set_length(__n); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc>& - basic_string<_CharT, _Traits, _Alloc>:: - _M_append(const _CharT* __s, size_type __n) - { - const size_type __len = __n + this->size(); - - if (__len <= this->capacity()) - { - if (__n) - this->_S_copy(this->_M_data() + this->size(), __s, __n); - } - else - this->_M_mutate(this->size(), size_type(0), __s, __n); - - this->_M_set_length(__len); - return *this; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - template<typename _InputIterator> - basic_string<_CharT, _Traits, _Alloc>& - basic_string<_CharT, _Traits, _Alloc>:: - _M_replace_dispatch(const_iterator __i1, const_iterator __i2, - _InputIterator __k1, _InputIterator __k2, - std::__false_type) - { - const basic_string __s(__k1, __k2); - const size_type __n1 = __i2 - __i1; - return _M_replace(__i1 - begin(), __n1, __s._M_data(), - __s.size()); - } - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc>& - basic_string<_CharT, _Traits, _Alloc>:: - _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, - _CharT __c) - { - _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); - - const size_type __old_size = this->size(); - const size_type __new_size = __old_size + __n2 - __n1; - - if (__new_size <= this->capacity()) - { - pointer __p = this->_M_data() + __pos1; - - const size_type __how_much = __old_size - __pos1 - __n1; - if (__how_much && __n1 != __n2) - this->_S_move(__p + __n2, __p + __n1, __how_much); - } - else - this->_M_mutate(__pos1, __n1, 0, __n2); - - if (__n2) - this->_S_assign(this->_M_data() + __pos1, __n2, __c); - - this->_M_set_length(__new_size); - return *this; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc>& - basic_string<_CharT, _Traits, _Alloc>:: - _M_replace(size_type __pos, size_type __len1, const _CharT* __s, - const size_type __len2) - { - _M_check_length(__len1, __len2, "basic_string::_M_replace"); - - const size_type __old_size = this->size(); - const size_type __new_size = __old_size + __len2 - __len1; - - if (__new_size <= this->capacity()) - { - pointer __p = this->_M_data() + __pos; - - const size_type __how_much = __old_size - __pos - __len1; - if (_M_disjunct(__s)) - { - if (__how_much && __len1 != __len2) - this->_S_move(__p + __len2, __p + __len1, __how_much); - if (__len2) - this->_S_copy(__p, __s, __len2); - } - else - { - - if (__len2 && __len2 <= __len1) - this->_S_move(__p, __s, __len2); - if (__how_much && __len1 != __len2) - this->_S_move(__p + __len2, __p + __len1, __how_much); - if (__len2 > __len1) - { - if (__s + __len2 <= __p + __len1) - this->_S_move(__p, __s, __len2); - else if (__s >= __p + __len1) - this->_S_copy(__p, __s + __len2 - __len1, __len2); - else - { - const size_type __nleft = (__p + __len1) - __s; - this->_S_move(__p, __s, __nleft); - this->_S_copy(__p + __nleft, __p + __len2, - __len2 - __nleft); - } - } - } - } - else - this->_M_mutate(__pos, __len1, __s, __len2); - - this->_M_set_length(__new_size); - return *this; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - typename basic_string<_CharT, _Traits, _Alloc>::size_type - basic_string<_CharT, _Traits, _Alloc>:: - copy(_CharT* __s, size_type __n, size_type __pos) const - { - _M_check(__pos, "basic_string::copy"); - __n = _M_limit(__pos, __n); - ; - if (__n) - _S_copy(__s, _M_data() + __pos, __n); - - return __n; - } -# 1156 "/usr/include/c++/9.2.0/bits/basic_string.tcc" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc> - operator+(const _CharT* __lhs, - const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { - ; - typedef basic_string<_CharT, _Traits, _Alloc> __string_type; - typedef typename __string_type::size_type __size_type; - const __size_type __len = _Traits::length(__lhs); - __string_type __str; - __str.reserve(__len + __rhs.size()); - __str.append(__lhs, __len); - __str.append(__rhs); - return __str; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - basic_string<_CharT, _Traits, _Alloc> - operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) - { - typedef basic_string<_CharT, _Traits, _Alloc> __string_type; - typedef typename __string_type::size_type __size_type; - __string_type __str; - const __size_type __len = __rhs.size(); - __str.reserve(__len + 1); - __str.append(__size_type(1), __lhs); - __str.append(__rhs); - return __str; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - typename basic_string<_CharT, _Traits, _Alloc>::size_type - basic_string<_CharT, _Traits, _Alloc>:: - find(const _CharT* __s, size_type __pos, size_type __n) const - 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> - int - basic_string<_CharT, _Traits, _Alloc>:: - compare(size_type __pos, size_type __n, const basic_string& __str) const - { - _M_check(__pos, "basic_string::compare"); - __n = _M_limit(__pos, __n); - const size_type __osize = __str.size(); - const size_type __len = std::min(__n, __osize); - int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); - if (!__r) - __r = _S_compare(__n, __osize); - return __r; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - int - basic_string<_CharT, _Traits, _Alloc>:: - compare(size_type __pos1, size_type __n1, const basic_string& __str, - size_type __pos2, size_type __n2) const - { - _M_check(__pos1, "basic_string::compare"); - __str._M_check(__pos2, "basic_string::compare"); - __n1 = _M_limit(__pos1, __n1); - __n2 = __str._M_limit(__pos2, __n2); - const size_type __len = std::min(__n1, __n2); - int __r = traits_type::compare(_M_data() + __pos1, - __str.data() + __pos2, __len); - if (!__r) - __r = _S_compare(__n1, __n2); - return __r; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - int - basic_string<_CharT, _Traits, _Alloc>:: - compare(const _CharT* __s) const 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; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - int - basic_string <_CharT, _Traits, _Alloc>:: - 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; - } - - template<typename _CharT, typename _Traits, typename _Alloc> - int - basic_string <_CharT, _Traits, _Alloc>:: - compare(size_type __pos, size_type __n1, const _CharT* __s, - size_type __n2) const - { - ; - _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; - } - - - 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 (_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; - } -# 1608 "/usr/include/c++/9.2.0/bits/basic_string.tcc" 3 - extern template class basic_string<char>; - - - - - - - - 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>; - - - - - - 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&); - - - - -} -# 57 "/usr/include/c++/9.2.0/string" 2 3 -# 41 "/usr/include/c++/9.2.0/bits/locale_classes.h" 2 3 - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 62 "/usr/include/c++/9.2.0/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 _Cache> - friend struct __use_cache; -# 98 "/usr/include/c++/9.2.0/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); -# 117 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - locale() throw(); -# 126 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - locale(const locale& __other) throw(); -# 136 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - explicit - locale(const char* __s); -# 151 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - locale(const locale& __base, const char* __s, category __cat); -# 162 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - explicit - locale(const std::string& __s) : locale(__s.c_str()) { } -# 177 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - locale(const locale& __base, const std::string& __s, category __cat) - : locale(__base, __s.c_str(), __cat) { } -# 192 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - locale(const locale& __base, const locale& __add, category __cat); -# 205 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - template<typename _Facet> - locale(const locale& __other, _Facet* __f); - - - ~locale() throw(); -# 219 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - const locale& - operator=(const locale& __other) throw(); -# 234 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - template<typename _Facet> - locale - combine(const locale& __other) const; - - - - - - - __attribute ((__abi_tag__ ("cxx11"))) - string - name() const; -# 254 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - bool - operator==(const locale& __other) const throw(); - - - - - - - - bool - operator!=(const locale& __other) const throw() - { return !(this->operator==(__other)); } -# 282 "/usr/include/c++/9.2.0/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; -# 298 "/usr/include/c++/9.2.0/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; -# 333 "/usr/include/c++/9.2.0/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[]; - - }; -# 371 "/usr/include/c++/9.2.0/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: -# 402 "/usr/include/c++/9.2.0/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(); -# 438 "/usr/include/c++/9.2.0/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; - }; -# 483 "/usr/include/c++/9.2.0/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(); - - - - - 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 _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*); - }; -# 641 "/usr/include/c++/9.2.0/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; -# 668 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - explicit - collate(size_t __refs = 0) - : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) - { } -# 682 "/usr/include/c++/9.2.0/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)) - { } -# 699 "/usr/include/c++/9.2.0/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); } -# 718 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - string_type - transform(const _CharT* __lo, const _CharT* __hi) const - { return this->do_transform(__lo, __hi); } -# 732 "/usr/include/c++/9.2.0/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); } -# 761 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - virtual int - do_compare(const _CharT* __lo1, const _CharT* __hi1, - const _CharT* __lo2, const _CharT* __hi2) const; -# 775 "/usr/include/c++/9.2.0/bits/locale_classes.h" 3 - virtual string_type - do_transform(const _CharT* __lo, const _CharT* __hi) const; -# 788 "/usr/include/c++/9.2.0/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++/9.2.0/bits/locale_classes.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/locale_classes.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/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); - } -# 102 "/usr/include/c++/9.2.0/bits/locale_classes.tcc" 3 - template<typename _Facet> - bool - has_facet(const locale& __loc) throw() - { - const size_t __i = _Facet::id._M_id(); - const locale::facet** __facets = __loc._M_impl->_M_facets; - return (__i < __loc._M_impl->_M_facets_size - - && dynamic_cast<const _Facet*>(__facets[__i])); - - - - } -# 130 "/usr/include/c++/9.2.0/bits/locale_classes.tcc" 3 - template<typename _Facet> - const _Facet& - use_facet(const locale& __loc) - { - const size_t __i = _Facet::id._M_id(); - const locale::facet** __facets = __loc._M_impl->_M_facets; - if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) - __throw_bad_cast(); - - return dynamic_cast<const _Facet&>(*__facets[__i]); - - - - } - - - - 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>& - 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>& - use_facet<collate<wchar_t> >(const locale&); - - extern template - bool - has_facet<collate<wchar_t> >(const locale&); - - - - -} -# 852 "/usr/include/c++/9.2.0/bits/locale_classes.h" 2 3 -# 42 "/usr/include/c++/9.2.0/bits/ios_base.h" 2 3 - - - - -# 1 "/usr/include/c++/9.2.0/system_error" 1 3 -# 32 "/usr/include/c++/9.2.0/system_error" 3 - -# 33 "/usr/include/c++/9.2.0/system_error" 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/error_constants.h" 1 3 -# 34 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/error_constants.h" 3 -# 1 "/usr/include/c++/9.2.0/cerrno" 1 3 -# 39 "/usr/include/c++/9.2.0/cerrno" 3 - -# 40 "/usr/include/c++/9.2.0/cerrno" 3 -# 35 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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 - }; - - -} -# 40 "/usr/include/c++/9.2.0/system_error" 2 3 - -# 1 "/usr/include/c++/9.2.0/stdexcept" 1 3 -# 36 "/usr/include/c++/9.2.0/stdexcept" 3 - -# 37 "/usr/include/c++/9.2.0/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++/9.2.0/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; - }; - - - - -} -# 42 "/usr/include/c++/9.2.0/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 { }; -# 71 "/usr/include/c++/9.2.0/system_error" 3 - inline namespace _V2 { - - - class error_category - { - public: - constexpr error_category() noexcept = default; - - virtual ~error_category(); - - error_category(const error_category&) = delete; - error_category& operator=(const error_category&) = delete; - - virtual const char* - name() const noexcept = 0; - - - - - - - private: - __attribute ((__abi_tag__ ("cxx11"))) - virtual __cow_string - _M_message(int) const; - - public: - __attribute ((__abi_tag__ ("cxx11"))) - virtual string - message(int) const = 0; -# 110 "/usr/include/c++/9.2.0/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; - - 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; } - - bool - operator!=(const error_category& __other) const noexcept - { return this != &__other; } - }; - - - __attribute__ ((__const__)) const error_category& system_category() noexcept; - __attribute__ ((__const__)) const error_category& generic_category() noexcept; - - } - - error_code make_error_code(errc) noexcept; - - template<typename _Tp> - struct hash; - - - - struct error_code - { - 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 = typename - enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type> - error_code(_ErrorCodeEnum __e) noexcept - { *this = make_error_code(__e); } - - void - assign(int __v, const error_category& __cat) noexcept - { - _M_value = __v; - _M_cat = &__cat; - } - - void - clear() noexcept - { assign(0, system_category()); } - - - template<typename _ErrorCodeEnum> - typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value, - error_code&>::type - operator=(_ErrorCodeEnum __e) noexcept - { return *this = make_error_code(__e); } - - int - value() const noexcept { return _M_value; } - - 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()); } - - explicit operator bool() const noexcept - { return _M_value != 0; } - - - private: - friend class hash<error_code>; - - int _M_value; - const error_category* _M_cat; - }; - - - inline error_code - make_error_code(errc __e) noexcept - { return error_code(static_cast<int>(__e), generic_category()); } - - 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()); } - - error_condition make_error_condition(errc) noexcept; - - - - struct error_condition - { - 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 = typename - enable_if<is_error_condition_enum<_ErrorConditionEnum>::value>::type> - error_condition(_ErrorConditionEnum __e) noexcept - { *this = make_error_condition(__e); } - - void - assign(int __v, const error_category& __cat) noexcept - { - _M_value = __v; - _M_cat = &__cat; - } - - - template<typename _ErrorConditionEnum> - typename enable_if<is_error_condition_enum - <_ErrorConditionEnum>::value, error_condition&>::type - operator=(_ErrorConditionEnum __e) noexcept - { return *this = make_error_condition(__e); } - - void - clear() noexcept - { assign(0, generic_category()); } - - - int - value() const noexcept { return _M_value; } - - const error_category& - category() const noexcept { return *_M_cat; } - - __attribute ((__abi_tag__ ("cxx11"))) - string - message() const - { return category().message(value()); } - - explicit operator bool() const noexcept - { return _M_value != 0; } - - - private: - int _M_value; - const error_category* _M_cat; - }; - - - inline error_condition - make_error_condition(errc __e) noexcept - { return error_condition(static_cast<int>(__e), generic_category()); } - - 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_code& __lhs, const error_code& __rhs) noexcept - { return (__lhs.category() == __rhs.category() - && __lhs.value() == __rhs.value()); } - - 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())); - } - - 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_condition& __lhs, - const error_condition& __rhs) noexcept - { - return (__lhs.category() == __rhs.category() - && __lhs.value() == __rhs.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); } - - - - - - - - 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._M_value); - return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp); - } - }; -# 419 "/usr/include/c++/9.2.0/system_error" 3 - -} -# 47 "/usr/include/c++/9.2.0/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_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 { }; - - const error_category& iostream_category() noexcept; - - inline error_code - make_error_code(io_errc __e) noexcept - { return error_code(static_cast<int>(__e), iostream_category()); } - - inline error_condition - make_error_condition(io_errc __e) noexcept - { return error_condition(static_cast<int>(__e), iostream_category()); } -# 228 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - class ios_base - { -# 246 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - public: -# 255 "/usr/include/c++/9.2.0/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(); - }; -# 323 "/usr/include/c++/9.2.0/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; -# 398 "/usr/include/c++/9.2.0/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; -# 429 "/usr/include/c++/9.2.0/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; -# 461 "/usr/include/c++/9.2.0/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; - - - - typedef int io_state; - typedef int open_mode; - typedef int seek_dir; - - typedef std::streampos streampos; - typedef std::streamoff streamoff; -# 489 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - enum event - { - erase_event, - imbue_event, - copyfmt_event - }; -# 506 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - typedef void (*event_callback) (event __e, ios_base& __b, int __i); -# 518 "/usr/include/c++/9.2.0/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; } -# 636 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - fmtflags - flags(fmtflags __fmtfl) - { - fmtflags __old = _M_flags; - _M_flags = __fmtfl; - return __old; - } -# 652 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - fmtflags - setf(fmtflags __fmtfl) - { - fmtflags __old = _M_flags; - _M_flags |= __fmtfl; - return __old; - } -# 669 "/usr/include/c++/9.2.0/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; } -# 695 "/usr/include/c++/9.2.0/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; - } -# 746 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - static bool - sync_with_stdio(bool __sync = true); -# 758 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - locale - imbue(const locale& __loc) throw(); -# 769 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - locale - getloc() const - { return _M_ios_locale; } -# 780 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - const locale& - _M_getloc() const - { return _M_ios_locale; } -# 799 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - static int - xalloc() throw(); -# 815 "/usr/include/c++/9.2.0/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; - } -# 836 "/usr/include/c++/9.2.0/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; - } -# 853 "/usr/include/c++/9.2.0/bits/ios_base.h" 3 - virtual ~ios_base(); - - protected: - ios_base() throw (); -# 867 "/usr/include/c++/9.2.0/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; - } - - - -} -# 43 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/streambuf" 1 3 -# 36 "/usr/include/c++/9.2.0/streambuf" 3 - -# 37 "/usr/include/c++/9.2.0/streambuf" 3 -# 45 "/usr/include/c++/9.2.0/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&); -# 121 "/usr/include/c++/9.2.0/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); - - template<typename _CharT2, typename _Traits2> - friend basic_istream<_CharT2, _Traits2>& - operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); - - 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++/9.2.0/streambuf" 3 - locale - pubimbue(const locale& __loc) - { - locale __tmp(this->getloc()); - this->imbue(__loc); - _M_buf_locale = __loc; - return __tmp; - } -# 232 "/usr/include/c++/9.2.0/streambuf" 3 - locale - getloc() const - { return _M_buf_locale; } -# 245 "/usr/include/c++/9.2.0/streambuf" 3 - basic_streambuf* - pubsetbuf(char_type* __s, streamsize __n) - { return this->setbuf(__s, __n); } -# 257 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - streamsize - in_avail() - { - const streamsize __ret = this->egptr() - this->gptr(); - return __ret ? __ret : this->showmanyc(); - } -# 304 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - streamsize - sgetn(char_type* __s, streamsize __n) - { return this->xsgetn(__s, __n); } -# 378 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - streamsize - sputn(const char_type* __s, streamsize __n) - { return this->xsputn(__s, __n); } - - protected: -# 470 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - void - gbump(int __n) { _M_in_cur += __n; } -# 515 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - void - pbump(int __n) { _M_out_cur += __n; } -# 561 "/usr/include/c++/9.2.0/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++/9.2.0/streambuf" 3 - virtual void - imbue(const locale& __loc __attribute__ ((__unused__))) - { } -# 597 "/usr/include/c++/9.2.0/streambuf" 3 - virtual basic_streambuf<char_type,_Traits>* - setbuf(char_type*, streamsize) - { return this; } -# 608 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/streambuf" 3 - virtual int - sync() { return 0; } -# 655 "/usr/include/c++/9.2.0/streambuf" 3 - virtual streamsize - showmanyc() { return 0; } -# 671 "/usr/include/c++/9.2.0/streambuf" 3 - virtual streamsize - xsgetn(char_type* __s, streamsize __n); -# 693 "/usr/include/c++/9.2.0/streambuf" 3 - virtual int_type - underflow() - { return traits_type::eof(); } -# 706 "/usr/include/c++/9.2.0/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++/9.2.0/streambuf" 3 - virtual int_type - pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) - { return traits_type::eof(); } -# 748 "/usr/include/c++/9.2.0/streambuf" 3 - virtual streamsize - xsputn(const char_type* __s, streamsize __n); -# 774 "/usr/include/c++/9.2.0/streambuf" 3 - virtual int_type - overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) - { return traits_type::eof(); } - - - - public: -# 790 "/usr/include/c++/9.2.0/streambuf" 3 - [[__deprecated__("stossc is deprecated, use sbumpc instead")]] - - void - stossc() - { - if (this->gptr() < this->egptr()) - this->gbump(1); - else - this->uflow(); - } - - - - 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++/9.2.0/bits/streambuf.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/streambuf.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/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 - streamsize - __copy_streambufs_eof(basic_streambuf<char>*, - basic_streambuf<char>*, bool&); - - - extern template class basic_streambuf<wchar_t>; - extern template - streamsize - __copy_streambufs(basic_streambuf<wchar_t>*, - basic_streambuf<wchar_t>*); - extern template - streamsize - __copy_streambufs_eof(basic_streambuf<wchar_t>*, - basic_streambuf<wchar_t>*, bool&); - - - - -} -# 863 "/usr/include/c++/9.2.0/streambuf" 2 3 -# 44 "/usr/include/c++/9.2.0/ios" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/basic_ios.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/basic_ios.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/basic_ios.h" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/locale_facets.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - -# 1 "/usr/include/c++/9.2.0/cwctype" 1 3 -# 39 "/usr/include/c++/9.2.0/cwctype" 3 - -# 40 "/usr/include/c++/9.2.0/cwctype" 3 -# 50 "/usr/include/c++/9.2.0/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) throw (); - - - - - -extern int iswalpha (wint_t __wc) throw (); - - -extern int iswcntrl (wint_t __wc) throw (); - - - -extern int iswdigit (wint_t __wc) throw (); - - - -extern int iswgraph (wint_t __wc) throw (); - - - - -extern int iswlower (wint_t __wc) throw (); - - -extern int iswprint (wint_t __wc) throw (); - - - - -extern int iswpunct (wint_t __wc) throw (); - - - - -extern int iswspace (wint_t __wc) throw (); - - - - -extern int iswupper (wint_t __wc) throw (); - - - - -extern int iswxdigit (wint_t __wc) throw (); - - - - - -extern int iswblank (wint_t __wc) throw (); -# 155 "/usr/include/bits/wctype-wchar.h" 3 4 -extern wctype_t wctype (const char *__property) throw (); - - - -extern int iswctype (wint_t __wc, wctype_t __desc) throw (); - - - - - - -extern wint_t towlower (wint_t __wc) throw (); - - -extern wint_t towupper (wint_t __wc) throw (); - -} -# 39 "/usr/include/wctype.h" 2 3 4 - - - - - -extern "C" { - - - -typedef const __int32_t *wctrans_t; - - - -extern wctrans_t wctrans (const char *__property) throw (); - - -extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); - - - - - - - -extern int iswalnum_l (wint_t __wc, locale_t __locale) throw (); - - - - - -extern int iswalpha_l (wint_t __wc, locale_t __locale) throw (); - - -extern int iswcntrl_l (wint_t __wc, locale_t __locale) throw (); - - - -extern int iswdigit_l (wint_t __wc, locale_t __locale) throw (); - - - -extern int iswgraph_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswlower_l (wint_t __wc, locale_t __locale) throw (); - - -extern int iswprint_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswpunct_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswspace_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswupper_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswxdigit_l (wint_t __wc, locale_t __locale) throw (); - - - - -extern int iswblank_l (wint_t __wc, locale_t __locale) throw (); - - - -extern wctype_t wctype_l (const char *__property, locale_t __locale) - throw (); - - - -extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) - throw (); - - - - - - -extern wint_t towlower_l (wint_t __wc, locale_t __locale) throw (); - - -extern wint_t towupper_l (wint_t __wc, locale_t __locale) throw (); - - - -extern wctrans_t wctrans_l (const char *__property, locale_t __locale) - throw (); - - -extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, - locale_t __locale) throw (); - - - -} -# 51 "/usr/include/c++/9.2.0/cwctype" 2 3 -# 80 "/usr/include/c++/9.2.0/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++/9.2.0/bits/locale_facets.h" 2 3 -# 1 "/usr/include/c++/9.2.0/cctype" 1 3 -# 39 "/usr/include/c++/9.2.0/cctype" 3 - -# 40 "/usr/include/c++/9.2.0/cctype" 3 -# 41 "/usr/include/c++/9.2.0/bits/locale_facets.h" 2 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/ctype_base.h" 1 3 -# 36 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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++/9.2.0/bits/locale_facets.h" 2 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/bits/streambuf_iterator.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/streambuf_iterator.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/streambuf_iterator.h" 3 - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 49 "/usr/include/c++/9.2.0/bits/streambuf_iterator.h" 3 - template<typename _CharT, typename _Traits> - class istreambuf_iterator - : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, - _CharT*, - - - _CharT> - - - - { - public: - - - - 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> - 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; - - - - - - char_type - operator*() const - { - int_type __c = _M_get(); -# 144 "/usr/include/c++/9.2.0/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; - } - - - - - - 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> - inline bool - operator==(const istreambuf_iterator<_CharT, _Traits>& __a, - const istreambuf_iterator<_CharT, _Traits>& __b) - { return __a.equal(__b); } - - template<typename _CharT, typename _Traits> - 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: - - 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; - } - - - ostreambuf_iterator& - operator*() - { return *this; } - - - ostreambuf_iterator& - operator++(int) - { return *this; } - - - ostreambuf_iterator& - operator++() - { return *this; } - - - 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; - } - }; - - - 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 __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; - - ; - - - ; - - 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++/9.2.0/bits/locale_facets.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 71 "/usr/include/c++/9.2.0/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; - } -# 149 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - template<typename _CharT> - class __ctype_abstract_base : public locale::facet, public ctype_base - { - public: - - - typedef _CharT char_type; -# 168 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - bool - is(mask __m, char_type __c) const - { return this->do_is(__m, __c); } -# 185 "/usr/include/c++/9.2.0/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); } -# 201 "/usr/include/c++/9.2.0/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); } -# 217 "/usr/include/c++/9.2.0/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); } -# 231 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - toupper(char_type __c) const - { return this->do_toupper(__c); } -# 246 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - const char_type* - toupper(char_type *__lo, const char_type* __hi) const - { return this->do_toupper(__lo, __hi); } -# 260 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - tolower(char_type __c) const - { return this->do_tolower(__c); } -# 275 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - const char_type* - tolower(char_type* __lo, const char_type* __hi) const - { return this->do_tolower(__lo, __hi); } -# 292 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - widen(char __c) const - { return this->do_widen(__c); } -# 311 "/usr/include/c++/9.2.0/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); } -# 330 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char - narrow(char_type __c, char __dfault) const - { return this->do_narrow(__c, __dfault); } -# 352 "/usr/include/c++/9.2.0/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() { } -# 377 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual bool - do_is(mask __m, char_type __c) const = 0; -# 396 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_is(const char_type* __lo, const char_type* __hi, - mask* __vec) const = 0; -# 415 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_scan_is(mask __m, const char_type* __lo, - const char_type* __hi) const = 0; -# 434 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_scan_not(mask __m, const char_type* __lo, - const char_type* __hi) const = 0; -# 452 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_toupper(char_type __c) const = 0; -# 469 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_toupper(char_type* __lo, const char_type* __hi) const = 0; -# 485 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_tolower(char_type __c) const = 0; -# 502 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_tolower(char_type* __lo, const char_type* __hi) const = 0; -# 521 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_widen(char __c) const = 0; -# 542 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char* - do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; -# 563 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char - do_narrow(char_type __c, char __dfault) const = 0; -# 588 "/usr/include/c++/9.2.0/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; - }; -# 611 "/usr/include/c++/9.2.0/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; -# 680 "/usr/include/c++/9.2.0/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); -# 717 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); -# 730 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, - size_t __refs = 0); -# 743 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - inline bool - is(mask __m, char __c) const; -# 758 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - inline const char* - is(const char* __lo, const char* __hi, mask* __vec) const; -# 772 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - inline const char* - scan_is(mask __m, const char* __lo, const char* __hi) const; -# 786 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - inline const char* - scan_not(mask __m, const char* __lo, const char* __hi) const; -# 801 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - toupper(char_type __c) const - { return this->do_toupper(__c); } -# 818 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - const char_type* - toupper(char_type *__lo, const char_type* __hi) const - { return this->do_toupper(__lo, __hi); } -# 834 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - tolower(char_type __c) const - { return this->do_tolower(__c); } -# 851 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - const char_type* - tolower(char_type* __lo, const char_type* __hi) const - { return this->do_tolower(__lo, __hi); } -# 871 "/usr/include/c++/9.2.0/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); - } -# 898 "/usr/include/c++/9.2.0/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); - } -# 930 "/usr/include/c++/9.2.0/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; - } -# 963 "/usr/include/c++/9.2.0/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(); -# 1013 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_toupper(char_type __c) const; -# 1030 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_toupper(char_type* __lo, const char_type* __hi) const; -# 1046 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_tolower(char_type __c) const; -# 1063 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_tolower(char_type* __lo, const char_type* __hi) const; -# 1083 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_widen(char __c) const - { return __c; } -# 1106 "/usr/include/c++/9.2.0/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; - } -# 1133 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char - do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const - { return __c; } -# 1159 "/usr/include/c++/9.2.0/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; - }; -# 1185 "/usr/include/c++/9.2.0/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; -# 1218 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - ctype(size_t __refs = 0); -# 1229 "/usr/include/c++/9.2.0/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(); -# 1253 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual bool - do_is(mask __m, char_type __c) const; -# 1272 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; -# 1290 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; -# 1308 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_scan_not(mask __m, const char_type* __lo, - const char_type* __hi) const; -# 1325 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_toupper(char_type __c) const; -# 1342 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_toupper(char_type* __lo, const char_type* __hi) const; -# 1358 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_tolower(char_type __c) const; -# 1375 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char_type* - do_tolower(char_type* __lo, const char_type* __hi) const; -# 1395 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_widen(char __c) const; -# 1417 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual const char* - do_widen(const char* __lo, const char* __hi, char_type* __to) const; -# 1440 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char - do_narrow(char_type __c, char __dfault) const; -# 1466 "/usr/include/c++/9.2.0/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++/9.2.0/x86_64-pc-linux-gnu/bits/ctype_inline.h" 1 3 -# 37 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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; - } - - -} -# 1539 "/usr/include/c++/9.2.0/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 { -# 1669 "/usr/include/c++/9.2.0/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(); } -# 1707 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - numpunct(__cache_type* __cache, size_t __refs = 0) - : facet(__refs), _M_data(__cache) - { _M_initialize_numpunct(); } -# 1721 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - numpunct(__c_locale __cloc, size_t __refs = 0) - : facet(__refs), _M_data(0) - { _M_initialize_numpunct(__cloc); } -# 1735 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - decimal_point() const - { return this->do_decimal_point(); } -# 1748 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - char_type - thousands_sep() const - { return this->do_thousands_sep(); } -# 1779 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - string - grouping() const - { return this->do_grouping(); } -# 1792 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - string_type - truename() const - { return this->do_truename(); } -# 1805 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - string_type - falsename() const - { return this->do_falsename(); } - - protected: - - virtual - ~numpunct(); -# 1822 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_decimal_point() const - { return _M_data->_M_decimal_point; } -# 1834 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual char_type - do_thousands_sep() const - { return _M_data->_M_thousands_sep; } -# 1847 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual string - do_grouping() const - { return _M_data->_M_grouping; } -# 1860 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - virtual string_type - do_truename() const - { return _M_data->_M_truename; } -# 1873 "/usr/include/c++/9.2.0/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() { } - }; - -} - - -# 1951 "/usr/include/c++/9.2.0/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; -# 1972 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - num_get(size_t __refs = 0) : facet(__refs) { } -# 1998 "/usr/include/c++/9.2.0/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); } -# 2035 "/usr/include/c++/9.2.0/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); } -# 2095 "/usr/include/c++/9.2.0/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); } -# 2138 "/usr/include/c++/9.2.0/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; - } -# 2211 "/usr/include/c++/9.2.0/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; - - - - - - - - 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; -# 2274 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - }; - - template<typename _CharT, typename _InIter> - locale::id num_get<_CharT, _InIter>::id; -# 2292 "/usr/include/c++/9.2.0/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; -# 2313 "/usr/include/c++/9.2.0/bits/locale_facets.h" 3 - explicit - num_put(size_t __refs = 0) : facet(__refs) { } -# 2331 "/usr/include/c++/9.2.0/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); } -# 2373 "/usr/include/c++/9.2.0/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); } -# 2436 "/usr/include/c++/9.2.0/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); } -# 2461 "/usr/include/c++/9.2.0/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() { } -# 2509 "/usr/include/c++/9.2.0/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; - - - - - - - - }; - - 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++/9.2.0/bits/locale_facets.tcc" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/locale_facets.tcc" 3 - -# 34 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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; - } - - - - 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; - } -# 971 "/usr/include/c++/9.2.0/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); - } -# 1044 "/usr/include/c++/9.2.0/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); } -# 1169 "/usr/include/c++/9.2.0/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; - } - - -# 1206 "/usr/include/c++/9.2.0/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>& - 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>& - 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&); - - - - -} -# 2656 "/usr/include/c++/9.2.0/bits/locale_facets.h" 2 3 -# 38 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/bits/basic_ios.h" 3 - explicit operator bool() const - { return !this->fail(); } - - - - - - bool - operator!() const - { return this->fail(); } -# 136 "/usr/include/c++/9.2.0/bits/basic_ios.h" 3 - iostate - rdstate() const - { return _M_streambuf_state; } -# 147 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/bits/basic_ios.h" 3 - iostate - exceptions() const - { return _M_exception; } -# 256 "/usr/include/c++/9.2.0/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++/9.2.0/bits/basic_ios.h" 3 - basic_ostream<_CharT, _Traits>* - tie() const - { return _M_tie; } -# 306 "/usr/include/c++/9.2.0/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++/9.2.0/bits/basic_ios.h" 3 - basic_streambuf<_CharT, _Traits>* - rdbuf(basic_streambuf<_CharT, _Traits>* __sb); -# 360 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/bits/basic_ios.h" 3 - locale - imbue(const locale& __loc); -# 429 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/bits/basic_ios.tcc" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/basic_ios.tcc" 3 - -# 34 "/usr/include/c++/9.2.0/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 != &__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++/9.2.0/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) - { - if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) - _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); - else - _M_ctype = 0; - - if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) - _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); - else - _M_num_put = 0; - - if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) - _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); - else - _M_num_get = 0; - } - - - - - extern template class basic_ios<char>; - - - extern template class basic_ios<wchar_t>; - - - - -} -# 517 "/usr/include/c++/9.2.0/bits/basic_ios.h" 2 3 -# 45 "/usr/include/c++/9.2.0/ios" 2 3 -# 39 "/usr/include/c++/9.2.0/ostream" 2 3 - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 57 "/usr/include/c++/9.2.0/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; -# 83 "/usr/include/c++/9.2.0/ostream" 3 - explicit - basic_ostream(__streambuf_type* __sb) - { this->init(__sb); } - - - - - - - virtual - ~basic_ostream() { } - - - class sentry; - friend class sentry; -# 107 "/usr/include/c++/9.2.0/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; - } -# 165 "/usr/include/c++/9.2.0/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); } -# 219 "/usr/include/c++/9.2.0/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); } -# 244 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - operator<<(const void* __p) - { return _M_insert(__p); } -# 275 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - operator<<(__streambuf_type* __sb); -# 308 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - put(char_type __c); - - - - - - - void - _M_write(const char_type* __s, streamsize __n) - { - const streamsize __put = this->rdbuf()->sputn(__s, __n); - if (__put != __n) - this->setstate(ios_base::badbit); - } -# 340 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - write(const char_type* __s, streamsize __n); -# 353 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - flush(); -# 363 "/usr/include/c++/9.2.0/ostream" 3 - pos_type - tellp(); -# 374 "/usr/include/c++/9.2.0/ostream" 3 - __ostream_type& - seekp(pos_type); -# 386 "/usr/include/c++/9.2.0/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); - }; -# 431 "/usr/include/c++/9.2.0/ostream" 3 - template <typename _CharT, typename _Traits> - class basic_ostream<_CharT, _Traits>::sentry - { - - bool _M_ok; - basic_ostream<_CharT, _Traits>& _M_os; - - public: -# 450 "/usr/include/c++/9.2.0/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 -# 482 "/usr/include/c++/9.2.0/ostream" 3 - explicit - - operator bool() const - { return _M_ok; } - }; -# 504 "/usr/include/c++/9.2.0/ostream" 3 - template<typename _CharT, typename _Traits> - inline basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) - { return __ostream_insert(__out, &__c, 1); } - - template<typename _CharT, typename _Traits> - inline basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) - { return (__out << __out.widen(__c)); } - - - template <class _Traits> - inline basic_ostream<char, _Traits>& - operator<<(basic_ostream<char, _Traits>& __out, char __c) - { return __ostream_insert(__out, &__c, 1); } - - - template<class _Traits> - inline basic_ostream<char, _Traits>& - operator<<(basic_ostream<char, _Traits>& __out, signed char __c) - { return (__out << static_cast<char>(__c)); } - - template<class _Traits> - inline basic_ostream<char, _Traits>& - operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) - { return (__out << static_cast<char>(__c)); } -# 546 "/usr/include/c++/9.2.0/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<class _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<class _Traits> - inline basic_ostream<char, _Traits>& - operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) - { return (__out << reinterpret_cast<const char*>(__s)); } - - template<class _Traits> - inline basic_ostream<char, _Traits> & - operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) - { return (__out << reinterpret_cast<const char*>(__s)); } -# 597 "/usr/include/c++/9.2.0/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'))); } -# 609 "/usr/include/c++/9.2.0/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(); } - - - template<typename _Ch, typename _Up> - basic_ostream<_Ch, _Up>& - __is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*); - - template<typename _Tp, typename = void> - struct __is_convertible_to_basic_ostream_impl - { - using __ostream_type = void; - }; - - template<typename _Tp> - using __do_is_convertible_to_basic_ostream_impl = - decltype(__is_convertible_to_basic_ostream_test - (declval<typename remove_reference<_Tp>::type*>())); - - template<typename _Tp> - struct __is_convertible_to_basic_ostream_impl - <_Tp, - __void_t<__do_is_convertible_to_basic_ostream_impl<_Tp>>> - { - using __ostream_type = - __do_is_convertible_to_basic_ostream_impl<_Tp>; - }; - - template<typename _Tp> - struct __is_convertible_to_basic_ostream - : __is_convertible_to_basic_ostream_impl<_Tp> - { - public: - using type = __not_<is_void< - typename __is_convertible_to_basic_ostream_impl<_Tp>::__ostream_type>>; - constexpr static bool value = type::value; - }; - - template<typename _Ostream, typename _Tp, typename = void> - struct __is_insertable : false_type {}; - - template<typename _Ostream, typename _Tp> - struct __is_insertable<_Ostream, _Tp, - __void_t<decltype(declval<_Ostream&>() - << declval<const _Tp&>())>> - : true_type {}; - - template<typename _Ostream> - using __rvalue_ostream_type = - typename __is_convertible_to_basic_ostream< - _Ostream>::__ostream_type; -# 683 "/usr/include/c++/9.2.0/ostream" 3 - template<typename _Ostream, typename _Tp> - inline - typename enable_if<__and_<__not_<is_lvalue_reference<_Ostream>>, - __is_convertible_to_basic_ostream<_Ostream>, - __is_insertable< - __rvalue_ostream_type<_Ostream>, - const _Tp&>>::value, - __rvalue_ostream_type<_Ostream>>::type - operator<<(_Ostream&& __os, const _Tp& __x) - { - __rvalue_ostream_type<_Ostream> __ret_os = __os; - __ret_os << __x; - return __ret_os; - } - - - -} - -# 1 "/usr/include/c++/9.2.0/bits/ostream.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/ostream.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/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 - __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) - { - try - { _M_write(__s, __n); } - catch(__cxxabiv1::__forced_unwind&) - { - this->_M_setstate(ios_base::badbit); - throw; - } - catch(...) - { this->_M_setstate(ios_base::badbit); } - } - return *this; - } - - template<typename _CharT, typename _Traits> - basic_ostream<_CharT, _Traits>& - basic_ostream<_CharT, _Traits>:: - flush() - { - - - - ios_base::iostate __err = ios_base::goodbit; - try - { - if (this->rdbuf() && 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() - { - pos_type __ret = pos_type(-1); - try - { - if (!this->fail()) - __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); - } - 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_ostream<_CharT, _Traits>& - basic_ostream<_CharT, _Traits>:: - seekp(pos_type __pos) - { - ios_base::iostate __err = ios_base::goodbit; - try - { - if (!this->fail()) - { - - - const pos_type __p = this->rdbuf()->pubseekpos(__pos, - ios_base::out); - - - 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_ostream<_CharT, _Traits>& - basic_ostream<_CharT, _Traits>:: - seekp(off_type __off, ios_base::seekdir __dir) - { - ios_base::iostate __err = ios_base::goodbit; - try - { - if (!this->fail()) - { - - - const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, - ios_base::out); - - - 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_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*); - - - - -} -# 703 "/usr/include/c++/9.2.0/ostream" 2 3 -# 40 "/usr/include/c++/9.2.0/iostream" 2 3 -# 1 "/usr/include/c++/9.2.0/istream" 1 3 -# 36 "/usr/include/c++/9.2.0/istream" 3 - -# 37 "/usr/include/c++/9.2.0/istream" 3 - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 57 "/usr/include/c++/9.2.0/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; -# 119 "/usr/include/c++/9.2.0/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; - } -# 167 "/usr/include/c++/9.2.0/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); } -# 213 "/usr/include/c++/9.2.0/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); } -# 234 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - operator>>(void*& __p) - { return _M_extract(__p); } -# 258 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - operator>>(__streambuf_type* __sb); -# 268 "/usr/include/c++/9.2.0/istream" 3 - streamsize - gcount() const - { return _M_gcount; } -# 301 "/usr/include/c++/9.2.0/istream" 3 - int_type - get(); -# 315 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - get(char_type& __c); -# 342 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - get(char_type* __s, streamsize __n, char_type __delim); -# 353 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - get(char_type* __s, streamsize __n) - { return this->get(__s, __n, this->widen('\n')); } -# 376 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - get(__streambuf_type& __sb, char_type __delim); -# 386 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - get(__streambuf_type& __sb) - { return this->get(__sb, this->widen('\n')); } -# 415 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - getline(char_type* __s, streamsize __n, char_type __delim); -# 426 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - getline(char_type* __s, streamsize __n) - { return this->getline(__s, __n, this->widen('\n')); } -# 450 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - ignore(streamsize __n, int_type __delim); - - __istream_type& - ignore(streamsize __n); - - __istream_type& - ignore(); -# 467 "/usr/include/c++/9.2.0/istream" 3 - int_type - peek(); -# 485 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - read(char_type* __s, streamsize __n); -# 504 "/usr/include/c++/9.2.0/istream" 3 - streamsize - readsome(char_type* __s, streamsize __n); -# 521 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - putback(char_type __c); -# 537 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - unget(); -# 555 "/usr/include/c++/9.2.0/istream" 3 - int - sync(); -# 570 "/usr/include/c++/9.2.0/istream" 3 - pos_type - tellg(); -# 585 "/usr/include/c++/9.2.0/istream" 3 - __istream_type& - seekg(pos_type); -# 601 "/usr/include/c++/9.2.0/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); -# 685 "/usr/include/c++/9.2.0/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; -# 721 "/usr/include/c++/9.2.0/istream" 3 - explicit - sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); -# 732 "/usr/include/c++/9.2.0/istream" 3 - explicit - - operator bool() const - { return _M_ok; } - }; -# 750 "/usr/include/c++/9.2.0/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)); } -# 792 "/usr/include/c++/9.2.0/istream" 3 - template<typename _CharT, typename _Traits> - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); - - - template<> - basic_istream<char>& - operator>>(basic_istream<char>& __in, char* __s); - - template<class _Traits> - inline basic_istream<char, _Traits>& - operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) - { return (__in >> reinterpret_cast<char*>(__s)); } - - template<class _Traits> - inline basic_istream<char, _Traits>& - operator>>(basic_istream<char, _Traits>& __in, signed char* __s) - { return (__in >> reinterpret_cast<char*>(__s)); } -# 823 "/usr/include/c++/9.2.0/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); } - - }; -# 906 "/usr/include/c++/9.2.0/istream" 3 - template<typename _CharT, typename _Traits> - basic_istream<_CharT, _Traits>& - ws(basic_istream<_CharT, _Traits>& __is); - - - template<typename _Ch, typename _Up> - basic_istream<_Ch, _Up>& - __is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*); - - template<typename _Tp, typename = void> - struct __is_convertible_to_basic_istream_impl - { - using __istream_type = void; - }; - - template<typename _Tp> - using __do_is_convertible_to_basic_istream_impl = - decltype(__is_convertible_to_basic_istream_test - (declval<typename remove_reference<_Tp>::type*>())); - - template<typename _Tp> - struct __is_convertible_to_basic_istream_impl - <_Tp, - __void_t<__do_is_convertible_to_basic_istream_impl<_Tp>>> - { - using __istream_type = - __do_is_convertible_to_basic_istream_impl<_Tp>; - }; - - template<typename _Tp> - struct __is_convertible_to_basic_istream - : __is_convertible_to_basic_istream_impl<_Tp> - { - public: - using type = __not_<is_void< - typename __is_convertible_to_basic_istream_impl<_Tp>::__istream_type>>; - constexpr static bool value = type::value; - }; - - template<typename _Istream, typename _Tp, typename = void> - struct __is_extractable : false_type {}; - - template<typename _Istream, typename _Tp> - struct __is_extractable<_Istream, _Tp, - __void_t<decltype(declval<_Istream&>() - >> declval<_Tp>())>> - : true_type {}; - - template<typename _Istream> - using __rvalue_istream_type = - typename __is_convertible_to_basic_istream< - _Istream>::__istream_type; -# 972 "/usr/include/c++/9.2.0/istream" 3 - template<typename _Istream, typename _Tp> - inline - typename enable_if<__and_<__not_<is_lvalue_reference<_Istream>>, - __is_convertible_to_basic_istream<_Istream>, - __is_extractable< - __rvalue_istream_type<_Istream>, - _Tp&&>>::value, - __rvalue_istream_type<_Istream>>::type - operator>>(_Istream&& __is, _Tp&& __x) - { - __rvalue_istream_type<_Istream> __ret_is = __is; - __ret_is >> std::forward<_Tp>(__x); - return __ret_is; - } - - - -} - -# 1 "/usr/include/c++/9.2.0/bits/istream.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/istream.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/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); - - while (!traits_type::eq_int_type(__c, __eof) - && !traits_type::eq_int_type(__c, __idelim) - && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) - { - ++_M_gcount; - __c = __this_sb->snextc(); - __c2 = traits_type::to_char_type(__c); - } - 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 (!_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(); -# 521 "/usr/include/c++/9.2.0/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 (__large_ignore) - _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; - - 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 (__large_ignore) - _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; - - if (traits_type::eq_int_type(__c, __eof)) - __err |= ios_base::eofbit; - else if (traits_type::eq_int_type(__c, __delim)) - { - if (_M_gcount - < __gnu_cxx::__numeric_traits<streamsize>::__max) - ++_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> - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) - { - 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 __num = __in.width(); - if (__num <= 0) - __num = __gnu_cxx::__numeric_traits<streamsize>::__max; - - 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 (_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); - return __in; - } - - - 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; - - 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 (!_Traits::eq_int_type(__c, __eof) - && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) - __c = __sb->snextc(); - - if (_Traits::eq_int_type(__c, __eof)) - __in.setstate(ios_base::eofbit); - return __in; - } - - - - - extern template class basic_istream<char>; - extern template istream& ws(istream&); - extern template istream& operator>>(istream&, char&); - extern template istream& operator>>(istream&, char*); - extern template istream& operator>>(istream&, unsigned char&); - extern template istream& operator>>(istream&, signed 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 wistream& operator>>(wistream&, wchar_t*); - - 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>; - - - - -} -# 992 "/usr/include/c++/9.2.0/istream" 2 3 -# 41 "/usr/include/c++/9.2.0/iostream" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 60 "/usr/include/c++/9.2.0/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; - - - - - static ios_base::Init __ioinit; - - -} -# 16 "/home/nivoliev/Sandbox/Cpp/svg.hpp" 2 -# 1 "/usr/include/c++/9.2.0/fstream" 1 3 -# 36 "/usr/include/c++/9.2.0/fstream" 3 - -# 37 "/usr/include/c++/9.2.0/fstream" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/codecvt.h" 1 3 -# 39 "/usr/include/c++/9.2.0/bits/codecvt.h" 3 - -# 40 "/usr/include/c++/9.2.0/bits/codecvt.h" 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - class codecvt_base - { - public: - enum result - { - ok, - partial, - error, - noconv - }; - }; -# 67 "/usr/include/c++/9.2.0/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; -# 115 "/usr/include/c++/9.2.0/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); - } -# 154 "/usr/include/c++/9.2.0/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); } -# 195 "/usr/include/c++/9.2.0/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() { } -# 236 "/usr/include/c++/9.2.0/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; - }; -# 273 "/usr/include/c++/9.2.0/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(); - }; -# 695 "/usr/include/c++/9.2.0/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() { } - }; -# 802 "/usr/include/c++/9.2.0/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>; -# 837 "/usr/include/c++/9.2.0/bits/codecvt.h" 3 - -} -# 41 "/usr/include/c++/9.2.0/fstream" 2 3 -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 - -# 40 "/usr/include/c++/9.2.0/cstdio" 3 -# 42 "/usr/include/c++/9.2.0/fstream" 2 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/basic_file.h" 1 3 -# 37 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/basic_file.h" 3 - -# 38 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/basic_file.h" 3 - - -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++io.h" 1 3 -# 35 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++io.h" 3 -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 - -# 40 "/usr/include/c++/9.2.0/cstdio" 3 -# 36 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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++/9.2.0/x86_64-pc-linux-gnu/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(); - }; - - -} -# 43 "/usr/include/c++/9.2.0/fstream" 2 3 - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 79 "/usr/include/c++/9.2.0/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; -# 155 "/usr/include/c++/9.2.0/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(); } -# 309 "/usr/include/c++/9.2.0/fstream" 3 - __filebuf_type* - open(const char* __s, ios_base::openmode __mode); -# 330 "/usr/include/c++/9.2.0/fstream" 3 - __filebuf_type* - open(const std::string& __s, ios_base::openmode __mode) - { return open(__s.c_str(), __mode); } -# 360 "/usr/include/c++/9.2.0/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()); -# 392 "/usr/include/c++/9.2.0/fstream" 3 - virtual int_type - overflow(int_type __c = _Traits::eof()); - - - - bool - _M_convert_to_external(char_type*, streamsize); -# 412 "/usr/include/c++/9.2.0/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(); -# 458 "/usr/include/c++/9.2.0/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); - } - }; -# 491 "/usr/include/c++/9.2.0/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: -# 518 "/usr/include/c++/9.2.0/fstream" 3 - basic_ifstream() : __istream_type(), _M_filebuf() - { this->init(&_M_filebuf); } -# 528 "/usr/include/c++/9.2.0/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); - } -# 561 "/usr/include/c++/9.2.0/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++/9.2.0/fstream" 3 - 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); } -# 599 "/usr/include/c++/9.2.0/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); - } -# 631 "/usr/include/c++/9.2.0/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(); } -# 657 "/usr/include/c++/9.2.0/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(); - } -# 696 "/usr/include/c++/9.2.0/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(); - } -# 729 "/usr/include/c++/9.2.0/fstream" 3 - void - close() - { - if (!_M_filebuf.close()) - this->setstate(ios_base::failbit); - } - }; -# 752 "/usr/include/c++/9.2.0/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: -# 779 "/usr/include/c++/9.2.0/fstream" 3 - basic_ofstream(): __ostream_type(), _M_filebuf() - { this->init(&_M_filebuf); } -# 789 "/usr/include/c++/9.2.0/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); - } -# 824 "/usr/include/c++/9.2.0/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++/9.2.0/fstream" 3 - 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); } -# 862 "/usr/include/c++/9.2.0/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); - } -# 894 "/usr/include/c++/9.2.0/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(); } -# 920 "/usr/include/c++/9.2.0/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(); - } -# 959 "/usr/include/c++/9.2.0/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(); - } -# 992 "/usr/include/c++/9.2.0/fstream" 3 - void - close() - { - if (!_M_filebuf.close()) - this->setstate(ios_base::failbit); - } - }; -# 1015 "/usr/include/c++/9.2.0/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: -# 1043 "/usr/include/c++/9.2.0/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); - } -# 1082 "/usr/include/c++/9.2.0/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); - } -# 1104 "/usr/include/c++/9.2.0/fstream" 3 - 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); } -# 1118 "/usr/include/c++/9.2.0/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); - } -# 1150 "/usr/include/c++/9.2.0/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(); } -# 1176 "/usr/include/c++/9.2.0/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(); - } -# 1217 "/usr/include/c++/9.2.0/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(); - } -# 1252 "/usr/include/c++/9.2.0/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++/9.2.0/bits/fstream.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/fstream.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/bits/fstream.tcc" 3 - - - -# 1 "/usr/include/c++/9.2.0/cerrno" 1 3 -# 39 "/usr/include/c++/9.2.0/cerrno" 3 - -# 40 "/usr/include/c++/9.2.0/cerrno" 3 -# 42 "/usr/include/c++/9.2.0/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) - { - if (has_facet<__codecvt_type>(this->_M_buf_locale)) - _M_codecvt = &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; - } -# 247 "/usr/include/c++/9.2.0/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) - { - - const streamsize __chunk = 1ul << 10; - streamsize __bufavail = this->epptr() - this->pptr(); - - - if (!_M_writing && _M_buf_size > 1) - __bufavail = _M_buf_size - 1; - - const streamsize __limit = std::min(__chunk, __bufavail); - if (__n >= __limit) - { - 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) - { -# 820 "/usr/include/c++/9.2.0/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* _M_codecvt_tmp = 0; - if (__builtin_expect(has_facet<__codecvt_type>(__loc), true)) - _M_codecvt_tmp = &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>; - - - - -} -# 1294 "/usr/include/c++/9.2.0/fstream" 2 3 -# 17 "/home/nivoliev/Sandbox/Cpp/svg.hpp" 2 - - - - -# 20 "/home/nivoliev/Sandbox/Cpp/svg.hpp" -class SvgPad { - - public : - - - SvgPad( std::ofstream& file, int width, int height) : - file_(file), - width_(width), - height_(height), - fill_(), - stroke_(), - use_fill_(true), - use_stroke_(true) - {} - - - void open() ; - - void close() ; - - - - - void solid_point( int x, int y) ; - void solid_point( double x, double y) ; - - void contour_point( int x, int y ) ; - void contour_point( double x, double y ) ; - - void line( int x1, int y1, int x2, int y2 ) ; - void line( double x1, double y1, double x2, double y2 ) ; - - void triangle( int x1, int y1, int x2, int y2, int x3, int y3 ) ; - void triangle( double x1, double y1, double x2, double y2, double x3, double y3 ) ; - - void polygon( const int* vertices, unsigned int size ) ; - void polygon( const double* vertices, unsigned int size ) ; - - void box( int minx, int miny, int maxx, int maxy ) ; - void box( double minx, double miny, double maxx, double maxy ) ; - - - - int scalex( double x ) ; - int scaley( double y ) ; - int scale_byte(double v) ; - - - - void fill(int r, int g, int b) ; - void fill(const int color[3]) ; - void fill(double r, double g, double b) ; - void fill(const double color[3]) ; - void toggle_fill() ; - - void stroke(int r, int g, int b) ; - void stroke(const int color[3]) ; - void stroke(double r, double g, double b) ; - void stroke(const double color[3]) ; - void toggle_stroke() ; - - private : - - - std::ofstream& file_ ; - - - int width_ ; - int height_ ; - - - int fill_[3] ; - int stroke_[3] ; - - bool use_fill_ ; - bool use_stroke_ ; - void set_fill_stroke() ; -} ; -# 2 "/home/nivoliev/Sandbox/Cpp/convex.cpp" 2 - -# 1 "/usr/include/boost/numeric/interval.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval.hpp" 3 4 -# 1 "/usr/include/boost/limits.hpp" 1 3 4 -# 14 "/usr/include/boost/limits.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 -# 165 "/usr/include/boost/config/compiler/gcc.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cstddef" 1 3 4 -# 42 "/usr/include/c++/9.2.0/cstddef" 3 4 - -# 43 "/usr/include/c++/9.2.0/cstddef" 3 - - - - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 51 "/usr/include/c++/9.2.0/cstddef" 2 3 - - -# 52 "/usr/include/c++/9.2.0/cstddef" 3 -extern "C++" -{ - -namespace std -{ - - using ::max_align_t; -} -# 197 "/usr/include/c++/9.2.0/cstddef" 3 -} -# 166 "/usr/include/boost/config/compiler/gcc.hpp" 2 3 4 -# 40 "/usr/include/boost/config.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 1 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-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 227 "/usr/include/unistd.h" 2 3 4 -# 274 "/usr/include/unistd.h" 3 4 -typedef __socklen_t socklen_t; -# 287 "/usr/include/unistd.h" 3 4 -extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); - - - - -extern int euidaccess (const char *__name, int __type) - throw () __attribute__ ((__nonnull__ (1))); - - -extern int eaccess (const char *__name, int __type) - throw () __attribute__ ((__nonnull__ (1))); - - - - - - -extern int faccessat (int __fd, const char *__file, int __type, int __flag) - throw () __attribute__ ((__nonnull__ (2))) ; -# 334 "/usr/include/unistd.h" 3 4 -extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); -# 345 "/usr/include/unistd.h" 3 4 -extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) - throw (); - - - - - - -extern int close (int __fd); - - - - - - -extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; - - - - - -extern ssize_t write (int __fd, const void *__buf, size_t __n) ; -# 376 "/usr/include/unistd.h" 3 4 -extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, - __off_t __offset) ; - - - - - - -extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, - __off_t __offset) ; -# 404 "/usr/include/unistd.h" 3 4 -extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset) ; - - -extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, - __off64_t __offset) ; - - - - - - - -extern int pipe (int __pipedes[2]) throw () ; - - - - -extern int pipe2 (int __pipedes[2], int __flags) throw () ; -# 432 "/usr/include/unistd.h" 3 4 -extern unsigned int alarm (unsigned int __seconds) throw (); -# 444 "/usr/include/unistd.h" 3 4 -extern unsigned int sleep (unsigned int __seconds); - - - - - - - -extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) - throw (); - - - - - - -extern int usleep (__useconds_t __useconds); -# 469 "/usr/include/unistd.h" 3 4 -extern int pause (void); - - - -extern int chown (const char *__file, __uid_t __owner, __gid_t __group) - throw () __attribute__ ((__nonnull__ (1))) ; - - - -extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; - - - - -extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) - throw () __attribute__ ((__nonnull__ (1))) ; - - - - - - -extern int fchownat (int __fd, const char *__file, __uid_t __owner, - __gid_t __group, int __flag) - throw () __attribute__ ((__nonnull__ (2))) ; - - - -extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; - - - -extern int fchdir (int __fd) throw () ; -# 511 "/usr/include/unistd.h" 3 4 -extern char *getcwd (char *__buf, size_t __size) throw () ; - - - - - -extern char *get_current_dir_name (void) throw (); - - - - - - - -extern char *getwd (char *__buf) - throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; - - - - -extern int dup (int __fd) throw () ; - - -extern int dup2 (int __fd, int __fd2) throw (); - - - - -extern int dup3 (int __fd, int __fd2, int __flags) throw (); - - - -extern char **__environ; - -extern char **environ; - - - - - -extern int execve (const char *__path, char *const __argv[], - char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) - throw () __attribute__ ((__nonnull__ (2))); - - - - -extern int execv (const char *__path, char *const __argv[]) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int execle (const char *__path, const char *__arg, ...) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int execl (const char *__path, const char *__arg, ...) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern int execvp (const char *__file, char *const __argv[]) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int execlp (const char *__file, const char *__arg, ...) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int execvpe (const char *__file, char *const __argv[], - char *const __envp[]) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - - -extern int nice (int __inc) throw () ; - - - - -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 - - }; - - -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 - - }; -# 610 "/usr/include/unistd.h" 2 3 4 - - -extern long int pathconf (const char *__path, int __name) - throw () __attribute__ ((__nonnull__ (1))); - - -extern long int fpathconf (int __fd, int __name) throw (); - - -extern long int sysconf (int __name) throw (); - - - -extern size_t confstr (int __name, char *__buf, size_t __len) throw (); - - - - -extern __pid_t getpid (void) throw (); - - -extern __pid_t getppid (void) throw (); - - -extern __pid_t getpgrp (void) throw (); - - -extern __pid_t __getpgid (__pid_t __pid) throw (); - -extern __pid_t getpgid (__pid_t __pid) throw (); - - - - - - -extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); -# 660 "/usr/include/unistd.h" 3 4 -extern int setpgrp (void) throw (); - - - - - - -extern __pid_t setsid (void) throw (); - - - -extern __pid_t getsid (__pid_t __pid) throw (); - - - -extern __uid_t getuid (void) throw (); - - -extern __uid_t geteuid (void) throw (); - - -extern __gid_t getgid (void) throw (); - - -extern __gid_t getegid (void) throw (); - - - - -extern int getgroups (int __size, __gid_t __list[]) throw () ; - - - -extern int group_member (__gid_t __gid) throw (); - - - - - - -extern int setuid (__uid_t __uid) throw () ; - - - - -extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () ; - - - - -extern int seteuid (__uid_t __uid) throw () ; - - - - - - -extern int setgid (__gid_t __gid) throw () ; - - - - -extern int setregid (__gid_t __rgid, __gid_t __egid) throw () ; - - - - -extern int setegid (__gid_t __gid) throw () ; - - - - - -extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) - throw (); - - - -extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) - throw (); - - - -extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) - throw () ; - - - -extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) - throw () ; - - - - - - -extern __pid_t fork (void) throw (); - - - - - - - -extern __pid_t vfork (void) throw (); - - - - - -extern char *ttyname (int __fd) throw (); - - - -extern int ttyname_r (int __fd, char *__buf, size_t __buflen) - throw () __attribute__ ((__nonnull__ (2))) ; - - - -extern int isatty (int __fd) throw (); - - - - -extern int ttyslot (void) throw (); - - - - -extern int link (const char *__from, const char *__to) - throw () __attribute__ ((__nonnull__ (1, 2))) ; - - - - -extern int linkat (int __fromfd, const char *__from, int __tofd, - const char *__to, int __flags) - throw () __attribute__ ((__nonnull__ (2, 4))) ; - - - - -extern int symlink (const char *__from, const char *__to) - throw () __attribute__ ((__nonnull__ (1, 2))) ; - - - - -extern ssize_t readlink (const char *__restrict __path, - char *__restrict __buf, size_t __len) - throw () __attribute__ ((__nonnull__ (1, 2))) ; - - - - -extern int symlinkat (const char *__from, int __tofd, - const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; - - -extern ssize_t readlinkat (int __fd, const char *__restrict __path, - char *__restrict __buf, size_t __len) - throw () __attribute__ ((__nonnull__ (2, 3))) ; - - - -extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1))); - - - -extern int unlinkat (int __fd, const char *__name, int __flag) - throw () __attribute__ ((__nonnull__ (2))); - - - -extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))); - - - -extern __pid_t tcgetpgrp (int __fd) throw (); - - -extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); - - - - - - -extern char *getlogin (void); - - - - - - - -extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); - - - - -extern int setlogin (const char *__name) throw () __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) - throw () __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 -} -# 870 "/usr/include/unistd.h" 2 3 4 - - - - - - - -extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); - - - - - - -extern int sethostname (const char *__name, size_t __len) - throw () __attribute__ ((__nonnull__ (1))) ; - - - -extern int sethostid (long int __id) throw () ; - - - - - -extern int getdomainname (char *__name, size_t __len) - throw () __attribute__ ((__nonnull__ (1))) ; -extern int setdomainname (const char *__name, size_t __len) - throw () __attribute__ ((__nonnull__ (1))) ; - - - - - -extern int vhangup (void) throw (); - - -extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; - - - - - - - -extern int profil (unsigned short int *__sample_buffer, size_t __size, - size_t __offset, unsigned int __scale) - throw () __attribute__ ((__nonnull__ (1))); - - - - - -extern int acct (const char *__name) throw (); - - - -extern char *getusershell (void) throw (); -extern void endusershell (void) throw (); -extern void setusershell (void) throw (); - - - - - -extern int daemon (int __nochdir, int __noclose) throw () ; - - - - - - -extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; - - - -extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); - - - - - - - -extern int fsync (int __fd); - - - - - -extern int syncfs (int __fd) throw (); - - - - - - -extern long int gethostid (void); - - -extern void sync (void) throw (); - - - - - -extern int getpagesize (void) throw () __attribute__ ((__const__)); - - - - -extern int getdtablesize (void) throw (); -# 991 "/usr/include/unistd.h" 3 4 -extern int truncate (const char *__file, __off_t __length) - throw () __attribute__ ((__nonnull__ (1))) ; -# 1003 "/usr/include/unistd.h" 3 4 -extern int truncate64 (const char *__file, __off64_t __length) - throw () __attribute__ ((__nonnull__ (1))) ; -# 1014 "/usr/include/unistd.h" 3 4 -extern int ftruncate (int __fd, __off_t __length) throw () ; -# 1024 "/usr/include/unistd.h" 3 4 -extern int ftruncate64 (int __fd, __off64_t __length) throw () ; -# 1035 "/usr/include/unistd.h" 3 4 -extern int brk (void *__addr) throw () ; - - - - - -extern void *sbrk (intptr_t __delta) throw (); -# 1056 "/usr/include/unistd.h" 3 4 -extern long int syscall (long int __sysno, ...) throw (); -# 1079 "/usr/include/unistd.h" 3 4 -extern int lockf (int __fd, int __cmd, __off_t __len) ; -# 1089 "/usr/include/unistd.h" 3 4 -extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; -# 1107 "/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); -# 1124 "/usr/include/unistd.h" 3 4 -extern char *crypt (const char *__key, const char *__salt) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - - - - -extern void swab (const void *__restrict __from, void *__restrict __to, - ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); -# 1161 "/usr/include/unistd.h" 3 4 -int getentropy (void *__buffer, size_t __length) ; -# 1170 "/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) throw (); -# 1171 "/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++/9.2.0/cstdlib" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 4 - -# 40 "/usr/include/c++/9.2.0/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 -# 484 "/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; - - - - -} - - - -namespace boost { - - __extension__ typedef __float128 float128_type; - - - -} -# 543 "/usr/include/boost/config/detail/suffix.hpp" 3 -# 1 "/usr/include/boost/config/helper_macros.hpp" 1 3 4 -# 544 "/usr/include/boost/config/detail/suffix.hpp" 2 3 -# 62 "/usr/include/boost/config.hpp" 2 3 4 - - - -# 15 "/usr/include/boost/limits.hpp" 2 3 4 - - - - -# 1 "/usr/include/c++/9.2.0/limits" 1 3 4 -# 40 "/usr/include/c++/9.2.0/limits" 3 4 - -# 41 "/usr/include/c++/9.2.0/limits" 3 -# 158 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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; - }; -# 1636 "/usr/include/c++/9.2.0/limits" 3 - 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; }; 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; }; -# 1659 "/usr/include/c++/9.2.0/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; - }; - - - - - - -} -# 20 "/usr/include/boost/limits.hpp" 2 3 4 -# 15 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/interval.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/interval.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/detail/interval_prototype.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/interval/detail/interval_prototype.hpp" 3 4 -namespace boost { -namespace numeric { - -namespace interval_lib { - -template<class T> struct rounded_math; -template<class T> struct checking_strict; -class comparison_error; -template<class Rounding, class Checking> struct policies; - - - - - -template<class T> -struct default_policies -{ - typedef policies<rounded_math<T>, checking_strict<T> > type; -}; - -} - -template<class T, class Policies = typename interval_lib::default_policies<T>::type > -class interval; - -} -} -# 16 "/usr/include/boost/numeric/interval/interval.hpp" 2 3 4 - -namespace boost { -namespace numeric { - -namespace interval_lib { - -class comparison_error - : public std::runtime_error -{ -public: - comparison_error() - : std::runtime_error("boost::interval: uncertain comparison") - { } -}; - -} - - - - - -template<class T, class Policies> -class interval -{ -private: - struct interval_holder; - struct number_holder; -public: - typedef T base_type; - typedef Policies traits_type; - - T const &lower() const; - T const &upper() const; - - interval(); - interval(T const &v); - template<class T1> interval(T1 const &v); - interval(T const &l, T const &u); - template<class T1, class T2> interval(T1 const &l, T2 const &u); - interval(interval<T, Policies> const &r); - template<class Policies1> interval(interval<T, Policies1> const &r); - template<class T1, class Policies1> interval(interval<T1, Policies1> const &r); - - interval &operator=(T const &v); - template<class T1> interval &operator=(T1 const &v); - interval &operator=(interval<T, Policies> const &r); - template<class Policies1> interval &operator=(interval<T, Policies1> const &r); - template<class T1, class Policies1> interval &operator=(interval<T1, Policies1> const &r); - - void assign(const T& l, const T& u); - - static interval empty(); - static interval whole(); - static interval hull(const T& x, const T& y); - - interval& operator+= (const T& r); - interval& operator+= (const interval& r); - interval& operator-= (const T& r); - interval& operator-= (const interval& r); - interval& operator*= (const T& r); - interval& operator*= (const interval& r); - interval& operator/= (const T& r); - interval& operator/= (const interval& r); - - bool operator< (const interval_holder& r) const; - bool operator> (const interval_holder& r) const; - bool operator<= (const interval_holder& r) const; - bool operator>= (const interval_holder& r) const; - bool operator== (const interval_holder& r) const; - bool operator!= (const interval_holder& r) const; - - bool operator< (const number_holder& r) const; - bool operator> (const number_holder& r) const; - bool operator<= (const number_holder& r) const; - bool operator>= (const number_holder& r) const; - bool operator== (const number_holder& r) const; - bool operator!= (const number_holder& r) const; - - - - interval(const T& l, const T& u, bool): low(l), up(u) {} - void set_empty(); - void set_whole(); - void set(const T& l, const T& u); - -private: - struct interval_holder { - template<class Policies2> - interval_holder(const interval<T, Policies2>& r) - : low(r.lower()), up(r.upper()) - { - typedef typename Policies2::checking checking2; - if (checking2::is_empty(low, up)) - throw interval_lib::comparison_error(); - } - - const T& low; - const T& up; - }; - - struct number_holder { - number_holder(const T& r) : val(r) - { - typedef typename Policies::checking checking; - if (checking::is_nan(r)) - throw interval_lib::comparison_error(); - } - - const T& val; - }; - - typedef typename Policies::checking checking; - typedef typename Policies::rounding rounding; - - T low; - T up; -}; - -template<class T, class Policies> inline -interval<T, Policies>::interval(): - low(static_cast<T>(0)), up(static_cast<T>(0)) -{} - -template<class T, class Policies> inline -interval<T, Policies>::interval(T const &v): low(v), up(v) -{ - if (checking::is_nan(v)) set_empty(); -} - -template<class T, class Policies> template<class T1> inline -interval<T, Policies>::interval(T1 const &v) -{ - if (checking::is_nan(v)) set_empty(); - else { - rounding rnd; - low = rnd.conv_down(v); - up = rnd.conv_up (v); - } -} - -template<class T, class Policies> template<class T1, class T2> inline -interval<T, Policies>::interval(T1 const &l, T2 const &u) -{ - if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) set_empty(); - else { - rounding rnd; - low = rnd.conv_down(l); - up = rnd.conv_up (u); - } -} - -template<class T, class Policies> inline -interval<T, Policies>::interval(T const &l, T const &u): low(l), up(u) -{ - if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) - set_empty(); -} - - -template<class T, class Policies> inline -interval<T, Policies>::interval(interval<T, Policies> const &r): low(r.lower()), up(r.upper()) -{} - -template<class T, class Policies> template<class Policies1> inline -interval<T, Policies>::interval(interval<T, Policies1> const &r): low(r.lower()), up(r.upper()) -{ - typedef typename Policies1::checking checking1; - if (checking1::is_empty(r.lower(), r.upper())) set_empty(); -} - -template<class T, class Policies> template<class T1, class Policies1> inline -interval<T, Policies>::interval(interval<T1, Policies1> const &r) -{ - typedef typename Policies1::checking checking1; - if (checking1::is_empty(r.lower(), r.upper())) set_empty(); - else { - rounding rnd; - low = rnd.conv_down(r.lower()); - up = rnd.conv_up (r.upper()); - } -} - -template<class T, class Policies> inline -interval<T, Policies> &interval<T, Policies>::operator=(T const &v) -{ - if (checking::is_nan(v)) set_empty(); - else low = up = v; - return *this; -} - -template<class T, class Policies> template<class T1> inline -interval<T, Policies> &interval<T, Policies>::operator=(T1 const &v) -{ - if (checking::is_nan(v)) set_empty(); - else { - rounding rnd; - low = rnd.conv_down(v); - up = rnd.conv_up (v); - } - return *this; -} - -template<class T, class Policies> inline -interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies> const &r) -{ - low = r.lower(); - up = r.upper(); - return *this; -} - -template<class T, class Policies> template<class Policies1> inline -interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies1> const &r) -{ - typedef typename Policies1::checking checking1; - if (checking1::is_empty(r.lower(), r.upper())) set_empty(); - else { - low = r.lower(); - up = r.upper(); - } - return *this; -} - -template<class T, class Policies> template<class T1, class Policies1> inline -interval<T, Policies> &interval<T, Policies>::operator=(interval<T1, Policies1> const &r) -{ - typedef typename Policies1::checking checking1; - if (checking1::is_empty(r.lower(), r.upper())) set_empty(); - else { - rounding rnd; - low = rnd.conv_down(r.lower()); - up = rnd.conv_up (r.upper()); - } - return *this; -} - -template<class T, class Policies> inline -void interval<T, Policies>::assign(const T& l, const T& u) -{ - if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) - set_empty(); - else set(l, u); -} - -template<class T, class Policies> inline -void interval<T, Policies>::set(const T& l, const T& u) -{ - low = l; - up = u; -} - -template<class T, class Policies> inline -void interval<T, Policies>::set_empty() -{ - low = checking::empty_lower(); - up = checking::empty_upper(); -} - -template<class T, class Policies> inline -void interval<T, Policies>::set_whole() -{ - low = checking::neg_inf(); - up = checking::pos_inf(); -} - -template<class T, class Policies> inline -interval<T, Policies> interval<T, Policies>::hull(const T& x, const T& y) -{ - bool bad_x = checking::is_nan(x); - bool bad_y = checking::is_nan(y); - if (bad_x) - if (bad_y) return interval::empty(); - else return interval(y, y, true); - else - if (bad_y) return interval(x, x, true); - if (x <= y) return interval(x, y, true); - else return interval(y, x, true); -} - -template<class T, class Policies> inline -interval<T, Policies> interval<T, Policies>::empty() -{ - return interval<T, Policies>(checking::empty_lower(), - checking::empty_upper(), true); -} - -template<class T, class Policies> inline -interval<T, Policies> interval<T, Policies>::whole() -{ - return interval<T, Policies>(checking::neg_inf(), checking::pos_inf(), true); -} - -template<class T, class Policies> inline -const T& interval<T, Policies>::lower() const -{ - return low; -} - -template<class T, class Policies> inline -const T& interval<T, Policies>::upper() const -{ - return up; -} - - - - - -template<class T, class Policies> inline -bool interval<T, Policies>::operator< (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up < r.low) return true; - else if (low >= r.up) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator> (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (low > r.up) return true; - else if (up <= r.low) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator<= (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up <= r.low) return true; - else if (low > r.up) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator>= (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (low >= r.up) return true; - else if (up < r.low) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator== (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up == r.low && low == r.up) return true; - else if (up < r.low || low > r.up) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator!= (const interval_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up < r.low || low > r.up) return true; - else if (up == r.low && low == r.up) return false; - } - throw interval_lib::comparison_error(); -} - - - - - -template<class T, class Policies> inline -bool interval<T, Policies>::operator< (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up < r.val) return true; - else if (low >= r.val) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator> (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (low > r.val) return true; - else if (up <= r.val) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator<= (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up <= r.val) return true; - else if (low > r.val) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator>= (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (low >= r.val) return true; - else if (up < r.val) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator== (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up == r.val && low == r.val) return true; - else if (up < r.val || low > r.val) return false; - } - throw interval_lib::comparison_error(); -} - -template<class T, class Policies> inline -bool interval<T, Policies>::operator!= (const number_holder& r) const -{ - if (!checking::is_empty(low, up)) { - if (up < r.val || low > r.val) return true; - else if (up == r.val && low == r.val) return false; - } - throw interval_lib::comparison_error(); -} - -} -} -# 16 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/policies.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/policies.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - - - - - -template<class Rounding, class Checking> -struct policies -{ - typedef Rounding rounding; - typedef Checking checking; -}; - - - - - -template<class OldInterval, class NewRounding> -class change_rounding -{ - typedef typename OldInterval::base_type T; - typedef typename OldInterval::traits_type p; - typedef typename p::checking checking; -public: - typedef interval<T, policies<NewRounding, checking> > type; -}; - -template<class OldInterval, class NewChecking> -class change_checking -{ - typedef typename OldInterval::base_type T; - typedef typename OldInterval::traits_type p; - typedef typename p::rounding rounding; -public: - typedef interval<T, policies<rounding, NewChecking> > type; -}; - - - - - - -template<class OldInterval> -class unprotect -{ - typedef typename OldInterval::base_type T; - typedef typename OldInterval::traits_type p; - typedef typename p::rounding r; - typedef typename r::unprotected_rounding newRounding; -public: - typedef typename change_rounding<OldInterval, newRounding>::type type; -}; - -} -} -} -# 17 "/usr/include/boost/numeric/interval.hpp" 2 3 4 - -# 1 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/rounding.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/interval/rounding.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - - - - - -template<class T> -struct rounding_control -{ - typedef int rounding_mode; - static void get_rounding_mode(rounding_mode&) {} - static void set_rounding_mode(rounding_mode) {} - static void upward() {} - static void downward() {} - static void to_nearest() {} - static const T& to_int(const T& x) { return x; } - static const T& force_rounding(const T& x) { return x; } -}; - - - - - - - -template<class T, class Rounding = rounding_control<T> > -struct rounded_arith_exact; - -template<class T, class Rounding = rounding_control<T> > -struct rounded_arith_std; - -template<class T, class Rounding = rounding_control<T> > -struct rounded_arith_opp; - -template<class T, class Rounding> -struct rounded_transc_dummy; - -template<class T, class Rounding = rounded_arith_exact<T> > -struct rounded_transc_exact; - -template<class T, class Rounding = rounded_arith_std<T> > -struct rounded_transc_std; - -template<class T, class Rounding = rounded_arith_opp<T> > -struct rounded_transc_opp; - - - - - -namespace detail { - -template<class Rounding> -struct save_state_unprotected: Rounding -{ - typedef save_state_unprotected<Rounding> unprotected_rounding; -}; - -} - -template<class Rounding> -struct save_state: Rounding -{ - typename Rounding::rounding_mode mode; - save_state() { - this->get_rounding_mode(mode); - this->init(); - } - ~save_state() { this->set_rounding_mode(mode); } - typedef detail::save_state_unprotected<Rounding> unprotected_rounding; -}; - -template<class Rounding> -struct save_state_nothing: Rounding -{ - typedef save_state_nothing<Rounding> unprotected_rounding; -}; - -template<class T> -struct rounded_math: save_state_nothing<rounded_arith_exact<T> > -{}; - -} -} -} -# 15 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/rounded_arith.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/rounded_arith.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/detail/bugs.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/rounded_arith.hpp" 2 3 4 -# 1 "/usr/include/boost/config/no_tr1/cmath.hpp" 1 3 4 -# 21 "/usr/include/boost/config/no_tr1/cmath.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cmath" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cmath" 3 4 - -# 40 "/usr/include/c++/9.2.0/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 -# 138 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/flt-eval-method.h" 1 3 4 -# 139 "/usr/include/math.h" 2 3 4 -# 149 "/usr/include/math.h" 3 4 -typedef float float_t; -typedef double double_t; -# 190 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/fp-logb.h" 1 3 4 -# 191 "/usr/include/math.h" 2 3 4 -# 233 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/fp-fast.h" 1 3 4 -# 234 "/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, - }; -# 289 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassify (double __value) throw () - __attribute__ ((__const__)); - - -extern int __signbit (double __value) throw () - __attribute__ ((__const__)); - - - -extern int __isinf (double __value) throw () __attribute__ ((__const__)); - - -extern int __finite (double __value) throw () __attribute__ ((__const__)); - - -extern int __isnan (double __value) throw () __attribute__ ((__const__)); - - -extern int __iseqsig (double __x, double __y) throw (); - - -extern int __issignaling (double __value) throw () - __attribute__ ((__const__)); -# 290 "/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) throw (); extern double __acos (double __x) throw (); - -extern double asin (double __x) throw (); extern double __asin (double __x) throw (); - -extern double atan (double __x) throw (); extern double __atan (double __x) throw (); - -extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); - - - extern double cos (double __x) throw (); extern double __cos (double __x) throw (); - - extern double sin (double __x) throw (); extern double __sin (double __x) throw (); - -extern double tan (double __x) throw (); extern double __tan (double __x) throw (); - - - - -extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); - -extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); - -extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); - - - - extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () - ; - - - - -extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); - -extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); - -extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); - - - - - - extern double exp (double __x) throw (); extern double __exp (double __x) throw (); - - -extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); - - -extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); - - - extern double log (double __x) throw (); extern double __log (double __x) throw (); - - -extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); - - -extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); - - - - -extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); - - -extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); - - -extern double logb (double __x) throw (); extern double __logb (double __x) throw (); - - - - -extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); - - -extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); - - - - - - - extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); - - -extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); - - - -extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); - - - - -extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); - - - - - - -extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); - - -extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); - - -extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); - - -extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); -# 182 "/usr/include/bits/mathcalls.h" 3 4 -extern int finite (double __value) throw () __attribute__ ((__const__)); - - -extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); - - - -extern double significand (double __x) throw (); extern double __significand (double __x) throw (); - - - - - - -extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); - - - - -extern double nan (const char *__tagb) throw (); extern double __nan (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern double j0 (double) throw (); extern double __j0 (double) throw (); -extern double j1 (double) throw (); extern double __j1 (double) throw (); -extern double jn (int, double) throw (); extern double __jn (int, double) throw (); -extern double y0 (double) throw (); extern double __y0 (double) throw (); -extern double y1 (double) throw (); extern double __y1 (double) throw (); -extern double yn (int, double) throw (); extern double __yn (int, double) throw (); - - - - - -extern double erf (double) throw (); extern double __erf (double) throw (); -extern double erfc (double) throw (); extern double __erfc (double) throw (); -extern double lgamma (double) throw (); extern double __lgamma (double) throw (); - - - - -extern double tgamma (double) throw (); extern double __tgamma (double) throw (); - - - - - -extern double gamma (double) throw (); extern double __gamma (double) throw (); - - - - - - - -extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); - - - - - - -extern double rint (double __x) throw (); extern double __rint (double __x) throw (); - - -extern double nextafter (double __x, double __y) throw (); extern double __nextafter (double __x, double __y) throw (); - -extern double nexttoward (double __x, long double __y) throw (); extern double __nexttoward (double __x, long double __y) throw (); - - - - -extern double nextdown (double __x) throw (); extern double __nextdown (double __x) throw (); - -extern double nextup (double __x) throw (); extern double __nextup (double __x) throw (); - - - -extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); - - - -extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); - - - -extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); - - - - -extern long int llogb (double __x) throw (); extern long int __llogb (double __x) throw (); - - - - -extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); - - - -extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); - - - -extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); - - - -extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); - - - - -extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); - - - - - - -extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); -__extension__ -extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); - - - -extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); -__extension__ -extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); - - - -extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); - - -extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); - - -extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); - - -extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); - - - - -extern double roundeven (double __x) throw () __attribute__ ((__const__)); extern double __roundeven (double __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) throw () - ; - - -extern double fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); - - -extern double fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) throw () __attribute__ ((__const__)); - - -extern int totalorder (double __x, double __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermag (double __x, double __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalize (double *__cx, const double *__x) throw (); - - -extern double getpayload (const double *__x) throw (); extern double __getpayload (const double *__x) throw (); - - -extern int setpayload (double *__x, double __payload) throw (); - - -extern int setpayloadsig (double *__x, double __payload) throw (); - - - - - - - -extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); -# 291 "/usr/include/math.h" 2 3 4 -# 306 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyf (float __value) throw () - __attribute__ ((__const__)); - - -extern int __signbitf (float __value) throw () - __attribute__ ((__const__)); - - - -extern int __isinff (float __value) throw () __attribute__ ((__const__)); - - -extern int __finitef (float __value) throw () __attribute__ ((__const__)); - - -extern int __isnanf (float __value) throw () __attribute__ ((__const__)); - - -extern int __iseqsigf (float __x, float __y) throw (); - - -extern int __issignalingf (float __value) throw () - __attribute__ ((__const__)); -# 307 "/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) throw (); extern float __acosf (float __x) throw (); - -extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); - -extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); - -extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); - - - extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); - - extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); - -extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); - - - - -extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); - -extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); - -extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); - - - - extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw () - ; - - - - -extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); - -extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); - -extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); - - - - - - extern float expf (float __x) throw (); extern float __expf (float __x) throw (); - - -extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); - - -extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); - - - extern float logf (float __x) throw (); extern float __logf (float __x) throw (); - - -extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); - - -extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); - - - - -extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); - - -extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); - - -extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); - - - - -extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); - - -extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); - - - - - - - extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); - - -extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); - - - -extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); - - - - -extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); - - - - - - -extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); - - -extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); - - -extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); - - -extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); -# 177 "/usr/include/bits/mathcalls.h" 3 4 -extern int isinff (float __value) throw () __attribute__ ((__const__)); - - - - -extern int finitef (float __value) throw () __attribute__ ((__const__)); - - -extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); - - - -extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); - - - - - - -extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); - - - - -extern float nanf (const char *__tagb) throw (); extern float __nanf (const char *__tagb) throw (); -# 211 "/usr/include/bits/mathcalls.h" 3 4 -extern int isnanf (float __value) throw () __attribute__ ((__const__)); - - - - - -extern float j0f (float) throw (); extern float __j0f (float) throw (); -extern float j1f (float) throw (); extern float __j1f (float) throw (); -extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); -extern float y0f (float) throw (); extern float __y0f (float) throw (); -extern float y1f (float) throw (); extern float __y1f (float) throw (); -extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); - - - - - -extern float erff (float) throw (); extern float __erff (float) throw (); -extern float erfcf (float) throw (); extern float __erfcf (float) throw (); -extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); - - - - -extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); - - - - - -extern float gammaf (float) throw (); extern float __gammaf (float) throw (); - - - - - - - -extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); - - - - - - -extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); - - -extern float nextafterf (float __x, float __y) throw (); extern float __nextafterf (float __x, float __y) throw (); - -extern float nexttowardf (float __x, long double __y) throw (); extern float __nexttowardf (float __x, long double __y) throw (); - - - - -extern float nextdownf (float __x) throw (); extern float __nextdownf (float __x) throw (); - -extern float nextupf (float __x) throw (); extern float __nextupf (float __x) throw (); - - - -extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); - - - -extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); - - - -extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); - - - - -extern long int llogbf (float __x) throw (); extern long int __llogbf (float __x) throw (); - - - - -extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); - - - -extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); - - - -extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); - - - -extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); - - - - -extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); - - - - - - -extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); -__extension__ -extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); - - - -extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); -__extension__ -extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); - - - -extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); - - -extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); - - -extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); - - -extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); - - - - -extern float roundevenf (float __x) throw () __attribute__ ((__const__)); extern float __roundevenf (float __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) throw () - ; - - -extern float fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); - - -extern float fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf (float __x, float __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf (float __x, float __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef (float *__cx, const float *__x) throw (); - - -extern float getpayloadf (const float *__x) throw (); extern float __getpayloadf (const float *__x) throw (); - - -extern int setpayloadf (float *__x, float __payload) throw (); - - -extern int setpayloadsigf (float *__x, float __payload) throw (); - - - - - - - -extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); -# 308 "/usr/include/math.h" 2 3 4 -# 349 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyl (long double __value) throw () - __attribute__ ((__const__)); - - -extern int __signbitl (long double __value) throw () - __attribute__ ((__const__)); - - - -extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); - - -extern int __finitel (long double __value) throw () __attribute__ ((__const__)); - - -extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); - - -extern int __iseqsigl (long double __x, long double __y) throw (); - - -extern int __issignalingl (long double __value) throw () - __attribute__ ((__const__)); -# 350 "/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) throw (); extern long double __acosl (long double __x) throw (); - -extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); - -extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); - -extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); - - - extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); - - extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); - -extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); - - - - -extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); - -extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); - -extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); - - - - extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw () - ; - - - - -extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); - -extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); - -extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); - - - - - - extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); - - -extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); - - -extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); - - - extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); - - -extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); - - -extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); - - - - -extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); - - -extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); - - -extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); - - - - -extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); - - -extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); - - - - - - - extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); - - -extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); - - - -extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); - - - - -extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); - - - - - - -extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); - - -extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); - - -extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); - - -extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); -# 177 "/usr/include/bits/mathcalls.h" 3 4 -extern int isinfl (long double __value) throw () __attribute__ ((__const__)); - - - - -extern int finitel (long double __value) throw () __attribute__ ((__const__)); - - -extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); - - - -extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); - - - - - - -extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); - - - - -extern long double nanl (const char *__tagb) throw (); extern long double __nanl (const char *__tagb) throw (); -# 211 "/usr/include/bits/mathcalls.h" 3 4 -extern int isnanl (long double __value) throw () __attribute__ ((__const__)); - - - - - -extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); -extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); -extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); -extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); -extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); -extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); - - - - - -extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); -extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); -extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); - - - - -extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); - - - - - -extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); - - - - - - - -extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); - - - - - - -extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); - - -extern long double nextafterl (long double __x, long double __y) throw (); extern long double __nextafterl (long double __x, long double __y) throw (); - -extern long double nexttowardl (long double __x, long double __y) throw (); extern long double __nexttowardl (long double __x, long double __y) throw (); - - - - -extern long double nextdownl (long double __x) throw (); extern long double __nextdownl (long double __x) throw (); - -extern long double nextupl (long double __x) throw (); extern long double __nextupl (long double __x) throw (); - - - -extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); - - - -extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); - - - -extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); - - - - -extern long int llogbl (long double __x) throw (); extern long int __llogbl (long double __x) throw (); - - - - -extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); - - - -extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); - - - -extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); - - - -extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); - - - - -extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); - - - - - - -extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); -__extension__ -extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); - - - -extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); -__extension__ -extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); - - - -extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); - - -extern long double fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); - - -extern long double fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); - - -extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); - - - - -extern long double roundevenl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundevenl (long double __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) throw () - ; - - -extern long double fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); - - -extern long double fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); - - -extern int totalorderl (long double __x, long double __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagl (long double __x, long double __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizel (long double *__cx, const long double *__x) throw (); - - -extern long double getpayloadl (const long double *__x) throw (); extern long double __getpayloadl (const long double *__x) throw (); - - -extern int setpayloadl (long double *__x, long double __payload) throw (); - - -extern int setpayloadsigl (long double *__x, long double __payload) throw (); - - - - - - - -extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); -# 351 "/usr/include/math.h" 2 3 4 -# 389 "/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) throw (); extern _Float32 __acosf32 (_Float32 __x) throw (); - -extern _Float32 asinf32 (_Float32 __x) throw (); extern _Float32 __asinf32 (_Float32 __x) throw (); - -extern _Float32 atanf32 (_Float32 __x) throw (); extern _Float32 __atanf32 (_Float32 __x) throw (); - -extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) throw (); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) throw (); - - - extern _Float32 cosf32 (_Float32 __x) throw (); extern _Float32 __cosf32 (_Float32 __x) throw (); - - extern _Float32 sinf32 (_Float32 __x) throw (); extern _Float32 __sinf32 (_Float32 __x) throw (); - -extern _Float32 tanf32 (_Float32 __x) throw (); extern _Float32 __tanf32 (_Float32 __x) throw (); - - - - -extern _Float32 coshf32 (_Float32 __x) throw (); extern _Float32 __coshf32 (_Float32 __x) throw (); - -extern _Float32 sinhf32 (_Float32 __x) throw (); extern _Float32 __sinhf32 (_Float32 __x) throw (); - -extern _Float32 tanhf32 (_Float32 __x) throw (); extern _Float32 __tanhf32 (_Float32 __x) throw (); - - - - extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw (); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw () - ; - - - - -extern _Float32 acoshf32 (_Float32 __x) throw (); extern _Float32 __acoshf32 (_Float32 __x) throw (); - -extern _Float32 asinhf32 (_Float32 __x) throw (); extern _Float32 __asinhf32 (_Float32 __x) throw (); - -extern _Float32 atanhf32 (_Float32 __x) throw (); extern _Float32 __atanhf32 (_Float32 __x) throw (); - - - - - - extern _Float32 expf32 (_Float32 __x) throw (); extern _Float32 __expf32 (_Float32 __x) throw (); - - -extern _Float32 frexpf32 (_Float32 __x, int *__exponent) throw (); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) throw (); - - -extern _Float32 ldexpf32 (_Float32 __x, int __exponent) throw (); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) throw (); - - - extern _Float32 logf32 (_Float32 __x) throw (); extern _Float32 __logf32 (_Float32 __x) throw (); - - -extern _Float32 log10f32 (_Float32 __x) throw (); extern _Float32 __log10f32 (_Float32 __x) throw (); - - -extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) throw (); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern _Float32 exp10f32 (_Float32 __x) throw (); extern _Float32 __exp10f32 (_Float32 __x) throw (); - - - - -extern _Float32 expm1f32 (_Float32 __x) throw (); extern _Float32 __expm1f32 (_Float32 __x) throw (); - - -extern _Float32 log1pf32 (_Float32 __x) throw (); extern _Float32 __log1pf32 (_Float32 __x) throw (); - - -extern _Float32 logbf32 (_Float32 __x) throw (); extern _Float32 __logbf32 (_Float32 __x) throw (); - - - - -extern _Float32 exp2f32 (_Float32 __x) throw (); extern _Float32 __exp2f32 (_Float32 __x) throw (); - - -extern _Float32 log2f32 (_Float32 __x) throw (); extern _Float32 __log2f32 (_Float32 __x) throw (); - - - - - - - extern _Float32 powf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) throw (); - - -extern _Float32 sqrtf32 (_Float32 __x) throw (); extern _Float32 __sqrtf32 (_Float32 __x) throw (); - - - -extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) throw (); - - - - -extern _Float32 cbrtf32 (_Float32 __x) throw (); extern _Float32 __cbrtf32 (_Float32 __x) throw (); - - - - - - -extern _Float32 ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - -extern _Float32 fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - -extern _Float32 floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - -extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) throw (); -# 196 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); - - - - -extern _Float32 nanf32 (const char *__tagb) throw (); extern _Float32 __nanf32 (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32 j0f32 (_Float32) throw (); extern _Float32 __j0f32 (_Float32) throw (); -extern _Float32 j1f32 (_Float32) throw (); extern _Float32 __j1f32 (_Float32) throw (); -extern _Float32 jnf32 (int, _Float32) throw (); extern _Float32 __jnf32 (int, _Float32) throw (); -extern _Float32 y0f32 (_Float32) throw (); extern _Float32 __y0f32 (_Float32) throw (); -extern _Float32 y1f32 (_Float32) throw (); extern _Float32 __y1f32 (_Float32) throw (); -extern _Float32 ynf32 (int, _Float32) throw (); extern _Float32 __ynf32 (int, _Float32) throw (); - - - - - -extern _Float32 erff32 (_Float32) throw (); extern _Float32 __erff32 (_Float32) throw (); -extern _Float32 erfcf32 (_Float32) throw (); extern _Float32 __erfcf32 (_Float32) throw (); -extern _Float32 lgammaf32 (_Float32) throw (); extern _Float32 __lgammaf32 (_Float32) throw (); - - - - -extern _Float32 tgammaf32 (_Float32) throw (); extern _Float32 __tgammaf32 (_Float32) throw (); -# 249 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32 lgammaf32_r (_Float32, int *__signgamp) throw (); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) throw (); - - - - - - -extern _Float32 rintf32 (_Float32 __x) throw (); extern _Float32 __rintf32 (_Float32 __x) throw (); - - -extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) throw (); - - - - - - -extern _Float32 nextdownf32 (_Float32 __x) throw (); extern _Float32 __nextdownf32 (_Float32 __x) throw (); - -extern _Float32 nextupf32 (_Float32 __x) throw (); extern _Float32 __nextupf32 (_Float32 __x) throw (); - - - -extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) throw (); - - - -extern _Float32 scalbnf32 (_Float32 __x, int __n) throw (); extern _Float32 __scalbnf32 (_Float32 __x, int __n) throw (); - - - -extern int ilogbf32 (_Float32 __x) throw (); extern int __ilogbf32 (_Float32 __x) throw (); - - - - -extern long int llogbf32 (_Float32 __x) throw (); extern long int __llogbf32 (_Float32 __x) throw (); - - - - -extern _Float32 scalblnf32 (_Float32 __x, long int __n) throw (); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) throw (); - - - -extern _Float32 nearbyintf32 (_Float32 __x) throw (); extern _Float32 __nearbyintf32 (_Float32 __x) throw (); - - - -extern _Float32 roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - - -extern _Float32 truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - - - -extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); - - - - - - -extern long int lrintf32 (_Float32 __x) throw (); extern long int __lrintf32 (_Float32 __x) throw (); -__extension__ -extern long long int llrintf32 (_Float32 __x) throw (); extern long long int __llrintf32 (_Float32 __x) throw (); - - - -extern long int lroundf32 (_Float32 __x) throw (); extern long int __lroundf32 (_Float32 __x) throw (); -__extension__ -extern long long int llroundf32 (_Float32 __x) throw (); extern long long int __llroundf32 (_Float32 __x) throw (); - - - -extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) throw (); - - -extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); - - -extern _Float32 fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); - - -extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); - - - - -extern _Float32 roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw () - ; - - -extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); - - -extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf32 (_Float32 __x, _Float32 __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf32 (_Float32 __x, _Float32 __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) throw (); - - -extern _Float32 getpayloadf32 (const _Float32 *__x) throw (); extern _Float32 __getpayloadf32 (const _Float32 *__x) throw (); - - -extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) throw (); - - -extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) throw (); -# 390 "/usr/include/math.h" 2 3 4 -# 406 "/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) throw (); extern _Float64 __acosf64 (_Float64 __x) throw (); - -extern _Float64 asinf64 (_Float64 __x) throw (); extern _Float64 __asinf64 (_Float64 __x) throw (); - -extern _Float64 atanf64 (_Float64 __x) throw (); extern _Float64 __atanf64 (_Float64 __x) throw (); - -extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) throw (); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) throw (); - - - extern _Float64 cosf64 (_Float64 __x) throw (); extern _Float64 __cosf64 (_Float64 __x) throw (); - - extern _Float64 sinf64 (_Float64 __x) throw (); extern _Float64 __sinf64 (_Float64 __x) throw (); - -extern _Float64 tanf64 (_Float64 __x) throw (); extern _Float64 __tanf64 (_Float64 __x) throw (); - - - - -extern _Float64 coshf64 (_Float64 __x) throw (); extern _Float64 __coshf64 (_Float64 __x) throw (); - -extern _Float64 sinhf64 (_Float64 __x) throw (); extern _Float64 __sinhf64 (_Float64 __x) throw (); - -extern _Float64 tanhf64 (_Float64 __x) throw (); extern _Float64 __tanhf64 (_Float64 __x) throw (); - - - - extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw (); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw () - ; - - - - -extern _Float64 acoshf64 (_Float64 __x) throw (); extern _Float64 __acoshf64 (_Float64 __x) throw (); - -extern _Float64 asinhf64 (_Float64 __x) throw (); extern _Float64 __asinhf64 (_Float64 __x) throw (); - -extern _Float64 atanhf64 (_Float64 __x) throw (); extern _Float64 __atanhf64 (_Float64 __x) throw (); - - - - - - extern _Float64 expf64 (_Float64 __x) throw (); extern _Float64 __expf64 (_Float64 __x) throw (); - - -extern _Float64 frexpf64 (_Float64 __x, int *__exponent) throw (); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) throw (); - - -extern _Float64 ldexpf64 (_Float64 __x, int __exponent) throw (); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) throw (); - - - extern _Float64 logf64 (_Float64 __x) throw (); extern _Float64 __logf64 (_Float64 __x) throw (); - - -extern _Float64 log10f64 (_Float64 __x) throw (); extern _Float64 __log10f64 (_Float64 __x) throw (); - - -extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) throw (); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern _Float64 exp10f64 (_Float64 __x) throw (); extern _Float64 __exp10f64 (_Float64 __x) throw (); - - - - -extern _Float64 expm1f64 (_Float64 __x) throw (); extern _Float64 __expm1f64 (_Float64 __x) throw (); - - -extern _Float64 log1pf64 (_Float64 __x) throw (); extern _Float64 __log1pf64 (_Float64 __x) throw (); - - -extern _Float64 logbf64 (_Float64 __x) throw (); extern _Float64 __logbf64 (_Float64 __x) throw (); - - - - -extern _Float64 exp2f64 (_Float64 __x) throw (); extern _Float64 __exp2f64 (_Float64 __x) throw (); - - -extern _Float64 log2f64 (_Float64 __x) throw (); extern _Float64 __log2f64 (_Float64 __x) throw (); - - - - - - - extern _Float64 powf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float64 sqrtf64 (_Float64 __x) throw (); extern _Float64 __sqrtf64 (_Float64 __x) throw (); - - - -extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) throw (); - - - - -extern _Float64 cbrtf64 (_Float64 __x) throw (); extern _Float64 __cbrtf64 (_Float64 __x) throw (); - - - - - - -extern _Float64 ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - -extern _Float64 fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - -extern _Float64 floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - -extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) throw (); -# 196 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); - - - - -extern _Float64 nanf64 (const char *__tagb) throw (); extern _Float64 __nanf64 (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64 j0f64 (_Float64) throw (); extern _Float64 __j0f64 (_Float64) throw (); -extern _Float64 j1f64 (_Float64) throw (); extern _Float64 __j1f64 (_Float64) throw (); -extern _Float64 jnf64 (int, _Float64) throw (); extern _Float64 __jnf64 (int, _Float64) throw (); -extern _Float64 y0f64 (_Float64) throw (); extern _Float64 __y0f64 (_Float64) throw (); -extern _Float64 y1f64 (_Float64) throw (); extern _Float64 __y1f64 (_Float64) throw (); -extern _Float64 ynf64 (int, _Float64) throw (); extern _Float64 __ynf64 (int, _Float64) throw (); - - - - - -extern _Float64 erff64 (_Float64) throw (); extern _Float64 __erff64 (_Float64) throw (); -extern _Float64 erfcf64 (_Float64) throw (); extern _Float64 __erfcf64 (_Float64) throw (); -extern _Float64 lgammaf64 (_Float64) throw (); extern _Float64 __lgammaf64 (_Float64) throw (); - - - - -extern _Float64 tgammaf64 (_Float64) throw (); extern _Float64 __tgammaf64 (_Float64) throw (); -# 249 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64 lgammaf64_r (_Float64, int *__signgamp) throw (); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) throw (); - - - - - - -extern _Float64 rintf64 (_Float64 __x) throw (); extern _Float64 __rintf64 (_Float64 __x) throw (); - - -extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) throw (); - - - - - - -extern _Float64 nextdownf64 (_Float64 __x) throw (); extern _Float64 __nextdownf64 (_Float64 __x) throw (); - -extern _Float64 nextupf64 (_Float64 __x) throw (); extern _Float64 __nextupf64 (_Float64 __x) throw (); - - - -extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) throw (); - - - -extern _Float64 scalbnf64 (_Float64 __x, int __n) throw (); extern _Float64 __scalbnf64 (_Float64 __x, int __n) throw (); - - - -extern int ilogbf64 (_Float64 __x) throw (); extern int __ilogbf64 (_Float64 __x) throw (); - - - - -extern long int llogbf64 (_Float64 __x) throw (); extern long int __llogbf64 (_Float64 __x) throw (); - - - - -extern _Float64 scalblnf64 (_Float64 __x, long int __n) throw (); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) throw (); - - - -extern _Float64 nearbyintf64 (_Float64 __x) throw (); extern _Float64 __nearbyintf64 (_Float64 __x) throw (); - - - -extern _Float64 roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - - -extern _Float64 truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - - - -extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); - - - - - - -extern long int lrintf64 (_Float64 __x) throw (); extern long int __lrintf64 (_Float64 __x) throw (); -__extension__ -extern long long int llrintf64 (_Float64 __x) throw (); extern long long int __llrintf64 (_Float64 __x) throw (); - - - -extern long int lroundf64 (_Float64 __x) throw (); extern long int __lroundf64 (_Float64 __x) throw (); -__extension__ -extern long long int llroundf64 (_Float64 __x) throw (); extern long long int __llroundf64 (_Float64 __x) throw (); - - - -extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); - - -extern _Float64 fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); - - -extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); - - - - -extern _Float64 roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw () - ; - - -extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); - - -extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf64 (_Float64 __x, _Float64 __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf64 (_Float64 __x, _Float64 __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) throw (); - - -extern _Float64 getpayloadf64 (const _Float64 *__x) throw (); extern _Float64 __getpayloadf64 (const _Float64 *__x) throw (); - - -extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) throw (); - - -extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) throw (); -# 407 "/usr/include/math.h" 2 3 4 -# 420 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyf128 (_Float128 __value) throw () - __attribute__ ((__const__)); - - -extern int __signbitf128 (_Float128 __value) throw () - __attribute__ ((__const__)); - - - -extern int __isinff128 (_Float128 __value) throw () __attribute__ ((__const__)); - - -extern int __finitef128 (_Float128 __value) throw () __attribute__ ((__const__)); - - -extern int __isnanf128 (_Float128 __value) throw () __attribute__ ((__const__)); - - -extern int __iseqsigf128 (_Float128 __x, _Float128 __y) throw (); - - -extern int __issignalingf128 (_Float128 __value) throw () - __attribute__ ((__const__)); -# 421 "/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) throw (); extern _Float128 __acosf128 (_Float128 __x) throw (); - -extern _Float128 asinf128 (_Float128 __x) throw (); extern _Float128 __asinf128 (_Float128 __x) throw (); - -extern _Float128 atanf128 (_Float128 __x) throw (); extern _Float128 __atanf128 (_Float128 __x) throw (); - -extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) throw (); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) throw (); - - - extern _Float128 cosf128 (_Float128 __x) throw (); extern _Float128 __cosf128 (_Float128 __x) throw (); - - extern _Float128 sinf128 (_Float128 __x) throw (); extern _Float128 __sinf128 (_Float128 __x) throw (); - -extern _Float128 tanf128 (_Float128 __x) throw (); extern _Float128 __tanf128 (_Float128 __x) throw (); - - - - -extern _Float128 coshf128 (_Float128 __x) throw (); extern _Float128 __coshf128 (_Float128 __x) throw (); - -extern _Float128 sinhf128 (_Float128 __x) throw (); extern _Float128 __sinhf128 (_Float128 __x) throw (); - -extern _Float128 tanhf128 (_Float128 __x) throw (); extern _Float128 __tanhf128 (_Float128 __x) throw (); - - - - extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) throw (); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) throw () - ; - - - - -extern _Float128 acoshf128 (_Float128 __x) throw (); extern _Float128 __acoshf128 (_Float128 __x) throw (); - -extern _Float128 asinhf128 (_Float128 __x) throw (); extern _Float128 __asinhf128 (_Float128 __x) throw (); - -extern _Float128 atanhf128 (_Float128 __x) throw (); extern _Float128 __atanhf128 (_Float128 __x) throw (); - - - - - - extern _Float128 expf128 (_Float128 __x) throw (); extern _Float128 __expf128 (_Float128 __x) throw (); - - -extern _Float128 frexpf128 (_Float128 __x, int *__exponent) throw (); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) throw (); - - -extern _Float128 ldexpf128 (_Float128 __x, int __exponent) throw (); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) throw (); - - - extern _Float128 logf128 (_Float128 __x) throw (); extern _Float128 __logf128 (_Float128 __x) throw (); - - -extern _Float128 log10f128 (_Float128 __x) throw (); extern _Float128 __log10f128 (_Float128 __x) throw (); - - -extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) throw (); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern _Float128 exp10f128 (_Float128 __x) throw (); extern _Float128 __exp10f128 (_Float128 __x) throw (); - - - - -extern _Float128 expm1f128 (_Float128 __x) throw (); extern _Float128 __expm1f128 (_Float128 __x) throw (); - - -extern _Float128 log1pf128 (_Float128 __x) throw (); extern _Float128 __log1pf128 (_Float128 __x) throw (); - - -extern _Float128 logbf128 (_Float128 __x) throw (); extern _Float128 __logbf128 (_Float128 __x) throw (); - - - - -extern _Float128 exp2f128 (_Float128 __x) throw (); extern _Float128 __exp2f128 (_Float128 __x) throw (); - - -extern _Float128 log2f128 (_Float128 __x) throw (); extern _Float128 __log2f128 (_Float128 __x) throw (); - - - - - - - extern _Float128 powf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float128 sqrtf128 (_Float128 __x) throw (); extern _Float128 __sqrtf128 (_Float128 __x) throw (); - - - -extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) throw (); - - - - -extern _Float128 cbrtf128 (_Float128 __x) throw (); extern _Float128 __cbrtf128 (_Float128 __x) throw (); - - - - - - -extern _Float128 ceilf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - -extern _Float128 fabsf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - -extern _Float128 floorf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - -extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) throw (); -# 196 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); - - - - -extern _Float128 nanf128 (const char *__tagb) throw (); extern _Float128 __nanf128 (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float128 j0f128 (_Float128) throw (); extern _Float128 __j0f128 (_Float128) throw (); -extern _Float128 j1f128 (_Float128) throw (); extern _Float128 __j1f128 (_Float128) throw (); -extern _Float128 jnf128 (int, _Float128) throw (); extern _Float128 __jnf128 (int, _Float128) throw (); -extern _Float128 y0f128 (_Float128) throw (); extern _Float128 __y0f128 (_Float128) throw (); -extern _Float128 y1f128 (_Float128) throw (); extern _Float128 __y1f128 (_Float128) throw (); -extern _Float128 ynf128 (int, _Float128) throw (); extern _Float128 __ynf128 (int, _Float128) throw (); - - - - - -extern _Float128 erff128 (_Float128) throw (); extern _Float128 __erff128 (_Float128) throw (); -extern _Float128 erfcf128 (_Float128) throw (); extern _Float128 __erfcf128 (_Float128) throw (); -extern _Float128 lgammaf128 (_Float128) throw (); extern _Float128 __lgammaf128 (_Float128) throw (); - - - - -extern _Float128 tgammaf128 (_Float128) throw (); extern _Float128 __tgammaf128 (_Float128) throw (); -# 249 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float128 lgammaf128_r (_Float128, int *__signgamp) throw (); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) throw (); - - - - - - -extern _Float128 rintf128 (_Float128 __x) throw (); extern _Float128 __rintf128 (_Float128 __x) throw (); - - -extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) throw (); - - - - - - -extern _Float128 nextdownf128 (_Float128 __x) throw (); extern _Float128 __nextdownf128 (_Float128 __x) throw (); - -extern _Float128 nextupf128 (_Float128 __x) throw (); extern _Float128 __nextupf128 (_Float128 __x) throw (); - - - -extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) throw (); - - - -extern _Float128 scalbnf128 (_Float128 __x, int __n) throw (); extern _Float128 __scalbnf128 (_Float128 __x, int __n) throw (); - - - -extern int ilogbf128 (_Float128 __x) throw (); extern int __ilogbf128 (_Float128 __x) throw (); - - - - -extern long int llogbf128 (_Float128 __x) throw (); extern long int __llogbf128 (_Float128 __x) throw (); - - - - -extern _Float128 scalblnf128 (_Float128 __x, long int __n) throw (); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) throw (); - - - -extern _Float128 nearbyintf128 (_Float128 __x) throw (); extern _Float128 __nearbyintf128 (_Float128 __x) throw (); - - - -extern _Float128 roundf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - - -extern _Float128 truncf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - - - -extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) throw (); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) throw (); - - - - - - -extern long int lrintf128 (_Float128 __x) throw (); extern long int __lrintf128 (_Float128 __x) throw (); -__extension__ -extern long long int llrintf128 (_Float128 __x) throw (); extern long long int __llrintf128 (_Float128 __x) throw (); - - - -extern long int lroundf128 (_Float128 __x) throw (); extern long int __lroundf128 (_Float128 __x) throw (); -__extension__ -extern long long int llroundf128 (_Float128 __x) throw (); extern long long int __llroundf128 (_Float128 __x) throw (); - - - -extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) throw (); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); - - -extern _Float128 fminf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); - - -extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) throw (); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) throw (); - - - - -extern _Float128 roundevenf128 (_Float128 __x) throw () __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) throw () - ; - - -extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); - - -extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf128 (_Float128 __x, _Float128 __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf128 (_Float128 __x, _Float128 __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) throw (); - - -extern _Float128 getpayloadf128 (const _Float128 *__x) throw (); extern _Float128 __getpayloadf128 (const _Float128 *__x) throw (); - - -extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) throw (); - - -extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) throw (); -# 424 "/usr/include/math.h" 2 3 4 -# 440 "/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) throw (); extern _Float32x __acosf32x (_Float32x __x) throw (); - -extern _Float32x asinf32x (_Float32x __x) throw (); extern _Float32x __asinf32x (_Float32x __x) throw (); - -extern _Float32x atanf32x (_Float32x __x) throw (); extern _Float32x __atanf32x (_Float32x __x) throw (); - -extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) throw (); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) throw (); - - - extern _Float32x cosf32x (_Float32x __x) throw (); extern _Float32x __cosf32x (_Float32x __x) throw (); - - extern _Float32x sinf32x (_Float32x __x) throw (); extern _Float32x __sinf32x (_Float32x __x) throw (); - -extern _Float32x tanf32x (_Float32x __x) throw (); extern _Float32x __tanf32x (_Float32x __x) throw (); - - - - -extern _Float32x coshf32x (_Float32x __x) throw (); extern _Float32x __coshf32x (_Float32x __x) throw (); - -extern _Float32x sinhf32x (_Float32x __x) throw (); extern _Float32x __sinhf32x (_Float32x __x) throw (); - -extern _Float32x tanhf32x (_Float32x __x) throw (); extern _Float32x __tanhf32x (_Float32x __x) throw (); - - - - extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw (); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw () - ; - - - - -extern _Float32x acoshf32x (_Float32x __x) throw (); extern _Float32x __acoshf32x (_Float32x __x) throw (); - -extern _Float32x asinhf32x (_Float32x __x) throw (); extern _Float32x __asinhf32x (_Float32x __x) throw (); - -extern _Float32x atanhf32x (_Float32x __x) throw (); extern _Float32x __atanhf32x (_Float32x __x) throw (); - - - - - - extern _Float32x expf32x (_Float32x __x) throw (); extern _Float32x __expf32x (_Float32x __x) throw (); - - -extern _Float32x frexpf32x (_Float32x __x, int *__exponent) throw (); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) throw (); - - -extern _Float32x ldexpf32x (_Float32x __x, int __exponent) throw (); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) throw (); - - - extern _Float32x logf32x (_Float32x __x) throw (); extern _Float32x __logf32x (_Float32x __x) throw (); - - -extern _Float32x log10f32x (_Float32x __x) throw (); extern _Float32x __log10f32x (_Float32x __x) throw (); - - -extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) throw (); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern _Float32x exp10f32x (_Float32x __x) throw (); extern _Float32x __exp10f32x (_Float32x __x) throw (); - - - - -extern _Float32x expm1f32x (_Float32x __x) throw (); extern _Float32x __expm1f32x (_Float32x __x) throw (); - - -extern _Float32x log1pf32x (_Float32x __x) throw (); extern _Float32x __log1pf32x (_Float32x __x) throw (); - - -extern _Float32x logbf32x (_Float32x __x) throw (); extern _Float32x __logbf32x (_Float32x __x) throw (); - - - - -extern _Float32x exp2f32x (_Float32x __x) throw (); extern _Float32x __exp2f32x (_Float32x __x) throw (); - - -extern _Float32x log2f32x (_Float32x __x) throw (); extern _Float32x __log2f32x (_Float32x __x) throw (); - - - - - - - extern _Float32x powf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) throw (); - - -extern _Float32x sqrtf32x (_Float32x __x) throw (); extern _Float32x __sqrtf32x (_Float32x __x) throw (); - - - -extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) throw (); - - - - -extern _Float32x cbrtf32x (_Float32x __x) throw (); extern _Float32x __cbrtf32x (_Float32x __x) throw (); - - - - - - -extern _Float32x ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - -extern _Float32x fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - -extern _Float32x floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - -extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) throw (); -# 196 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); - - - - -extern _Float32x nanf32x (const char *__tagb) throw (); extern _Float32x __nanf32x (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32x j0f32x (_Float32x) throw (); extern _Float32x __j0f32x (_Float32x) throw (); -extern _Float32x j1f32x (_Float32x) throw (); extern _Float32x __j1f32x (_Float32x) throw (); -extern _Float32x jnf32x (int, _Float32x) throw (); extern _Float32x __jnf32x (int, _Float32x) throw (); -extern _Float32x y0f32x (_Float32x) throw (); extern _Float32x __y0f32x (_Float32x) throw (); -extern _Float32x y1f32x (_Float32x) throw (); extern _Float32x __y1f32x (_Float32x) throw (); -extern _Float32x ynf32x (int, _Float32x) throw (); extern _Float32x __ynf32x (int, _Float32x) throw (); - - - - - -extern _Float32x erff32x (_Float32x) throw (); extern _Float32x __erff32x (_Float32x) throw (); -extern _Float32x erfcf32x (_Float32x) throw (); extern _Float32x __erfcf32x (_Float32x) throw (); -extern _Float32x lgammaf32x (_Float32x) throw (); extern _Float32x __lgammaf32x (_Float32x) throw (); - - - - -extern _Float32x tgammaf32x (_Float32x) throw (); extern _Float32x __tgammaf32x (_Float32x) throw (); -# 249 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) throw (); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) throw (); - - - - - - -extern _Float32x rintf32x (_Float32x __x) throw (); extern _Float32x __rintf32x (_Float32x __x) throw (); - - -extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) throw (); - - - - - - -extern _Float32x nextdownf32x (_Float32x __x) throw (); extern _Float32x __nextdownf32x (_Float32x __x) throw (); - -extern _Float32x nextupf32x (_Float32x __x) throw (); extern _Float32x __nextupf32x (_Float32x __x) throw (); - - - -extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) throw (); - - - -extern _Float32x scalbnf32x (_Float32x __x, int __n) throw (); extern _Float32x __scalbnf32x (_Float32x __x, int __n) throw (); - - - -extern int ilogbf32x (_Float32x __x) throw (); extern int __ilogbf32x (_Float32x __x) throw (); - - - - -extern long int llogbf32x (_Float32x __x) throw (); extern long int __llogbf32x (_Float32x __x) throw (); - - - - -extern _Float32x scalblnf32x (_Float32x __x, long int __n) throw (); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) throw (); - - - -extern _Float32x nearbyintf32x (_Float32x __x) throw (); extern _Float32x __nearbyintf32x (_Float32x __x) throw (); - - - -extern _Float32x roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - - -extern _Float32x truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - - - -extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); - - - - - - -extern long int lrintf32x (_Float32x __x) throw (); extern long int __lrintf32x (_Float32x __x) throw (); -__extension__ -extern long long int llrintf32x (_Float32x __x) throw (); extern long long int __llrintf32x (_Float32x __x) throw (); - - - -extern long int lroundf32x (_Float32x __x) throw (); extern long int __lroundf32x (_Float32x __x) throw (); -__extension__ -extern long long int llroundf32x (_Float32x __x) throw (); extern long long int __llroundf32x (_Float32x __x) throw (); - - - -extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) throw (); - - -extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); - - -extern _Float32x fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); - - -extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); - - - - -extern _Float32x roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw () - ; - - -extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); - - -extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf32x (_Float32x __x, _Float32x __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf32x (_Float32x __x, _Float32x __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) throw (); - - -extern _Float32x getpayloadf32x (const _Float32x *__x) throw (); extern _Float32x __getpayloadf32x (const _Float32x *__x) throw (); - - -extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) throw (); - - -extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) throw (); -# 441 "/usr/include/math.h" 2 3 4 -# 457 "/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) throw (); extern _Float64x __acosf64x (_Float64x __x) throw (); - -extern _Float64x asinf64x (_Float64x __x) throw (); extern _Float64x __asinf64x (_Float64x __x) throw (); - -extern _Float64x atanf64x (_Float64x __x) throw (); extern _Float64x __atanf64x (_Float64x __x) throw (); - -extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) throw (); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) throw (); - - - extern _Float64x cosf64x (_Float64x __x) throw (); extern _Float64x __cosf64x (_Float64x __x) throw (); - - extern _Float64x sinf64x (_Float64x __x) throw (); extern _Float64x __sinf64x (_Float64x __x) throw (); - -extern _Float64x tanf64x (_Float64x __x) throw (); extern _Float64x __tanf64x (_Float64x __x) throw (); - - - - -extern _Float64x coshf64x (_Float64x __x) throw (); extern _Float64x __coshf64x (_Float64x __x) throw (); - -extern _Float64x sinhf64x (_Float64x __x) throw (); extern _Float64x __sinhf64x (_Float64x __x) throw (); - -extern _Float64x tanhf64x (_Float64x __x) throw (); extern _Float64x __tanhf64x (_Float64x __x) throw (); - - - - extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) throw (); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) throw () - ; - - - - -extern _Float64x acoshf64x (_Float64x __x) throw (); extern _Float64x __acoshf64x (_Float64x __x) throw (); - -extern _Float64x asinhf64x (_Float64x __x) throw (); extern _Float64x __asinhf64x (_Float64x __x) throw (); - -extern _Float64x atanhf64x (_Float64x __x) throw (); extern _Float64x __atanhf64x (_Float64x __x) throw (); - - - - - - extern _Float64x expf64x (_Float64x __x) throw (); extern _Float64x __expf64x (_Float64x __x) throw (); - - -extern _Float64x frexpf64x (_Float64x __x, int *__exponent) throw (); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) throw (); - - -extern _Float64x ldexpf64x (_Float64x __x, int __exponent) throw (); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) throw (); - - - extern _Float64x logf64x (_Float64x __x) throw (); extern _Float64x __logf64x (_Float64x __x) throw (); - - -extern _Float64x log10f64x (_Float64x __x) throw (); extern _Float64x __log10f64x (_Float64x __x) throw (); - - -extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) throw (); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) throw () __attribute__ ((__nonnull__ (2))); - - - -extern _Float64x exp10f64x (_Float64x __x) throw (); extern _Float64x __exp10f64x (_Float64x __x) throw (); - - - - -extern _Float64x expm1f64x (_Float64x __x) throw (); extern _Float64x __expm1f64x (_Float64x __x) throw (); - - -extern _Float64x log1pf64x (_Float64x __x) throw (); extern _Float64x __log1pf64x (_Float64x __x) throw (); - - -extern _Float64x logbf64x (_Float64x __x) throw (); extern _Float64x __logbf64x (_Float64x __x) throw (); - - - - -extern _Float64x exp2f64x (_Float64x __x) throw (); extern _Float64x __exp2f64x (_Float64x __x) throw (); - - -extern _Float64x log2f64x (_Float64x __x) throw (); extern _Float64x __log2f64x (_Float64x __x) throw (); - - - - - - - extern _Float64x powf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float64x sqrtf64x (_Float64x __x) throw (); extern _Float64x __sqrtf64x (_Float64x __x) throw (); - - - -extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) throw (); - - - - -extern _Float64x cbrtf64x (_Float64x __x) throw (); extern _Float64x __cbrtf64x (_Float64x __x) throw (); - - - - - - -extern _Float64x ceilf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - -extern _Float64x fabsf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - -extern _Float64x floorf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - -extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) throw (); -# 196 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); - - - - -extern _Float64x nanf64x (const char *__tagb) throw (); extern _Float64x __nanf64x (const char *__tagb) throw (); -# 217 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64x j0f64x (_Float64x) throw (); extern _Float64x __j0f64x (_Float64x) throw (); -extern _Float64x j1f64x (_Float64x) throw (); extern _Float64x __j1f64x (_Float64x) throw (); -extern _Float64x jnf64x (int, _Float64x) throw (); extern _Float64x __jnf64x (int, _Float64x) throw (); -extern _Float64x y0f64x (_Float64x) throw (); extern _Float64x __y0f64x (_Float64x) throw (); -extern _Float64x y1f64x (_Float64x) throw (); extern _Float64x __y1f64x (_Float64x) throw (); -extern _Float64x ynf64x (int, _Float64x) throw (); extern _Float64x __ynf64x (int, _Float64x) throw (); - - - - - -extern _Float64x erff64x (_Float64x) throw (); extern _Float64x __erff64x (_Float64x) throw (); -extern _Float64x erfcf64x (_Float64x) throw (); extern _Float64x __erfcf64x (_Float64x) throw (); -extern _Float64x lgammaf64x (_Float64x) throw (); extern _Float64x __lgammaf64x (_Float64x) throw (); - - - - -extern _Float64x tgammaf64x (_Float64x) throw (); extern _Float64x __tgammaf64x (_Float64x) throw (); -# 249 "/usr/include/bits/mathcalls.h" 3 4 -extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) throw (); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) throw (); - - - - - - -extern _Float64x rintf64x (_Float64x __x) throw (); extern _Float64x __rintf64x (_Float64x __x) throw (); - - -extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) throw (); - - - - - - -extern _Float64x nextdownf64x (_Float64x __x) throw (); extern _Float64x __nextdownf64x (_Float64x __x) throw (); - -extern _Float64x nextupf64x (_Float64x __x) throw (); extern _Float64x __nextupf64x (_Float64x __x) throw (); - - - -extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) throw (); - - - -extern _Float64x scalbnf64x (_Float64x __x, int __n) throw (); extern _Float64x __scalbnf64x (_Float64x __x, int __n) throw (); - - - -extern int ilogbf64x (_Float64x __x) throw (); extern int __ilogbf64x (_Float64x __x) throw (); - - - - -extern long int llogbf64x (_Float64x __x) throw (); extern long int __llogbf64x (_Float64x __x) throw (); - - - - -extern _Float64x scalblnf64x (_Float64x __x, long int __n) throw (); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) throw (); - - - -extern _Float64x nearbyintf64x (_Float64x __x) throw (); extern _Float64x __nearbyintf64x (_Float64x __x) throw (); - - - -extern _Float64x roundf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - - -extern _Float64x truncf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - - - -extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) throw (); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) throw (); - - - - - - -extern long int lrintf64x (_Float64x __x) throw (); extern long int __lrintf64x (_Float64x __x) throw (); -__extension__ -extern long long int llrintf64x (_Float64x __x) throw (); extern long long int __llrintf64x (_Float64x __x) throw (); - - - -extern long int lroundf64x (_Float64x __x) throw (); extern long int __lroundf64x (_Float64x __x) throw (); -__extension__ -extern long long int llroundf64x (_Float64x __x) throw (); extern long long int __llroundf64x (_Float64x __x) throw (); - - - -extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) throw (); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); - - -extern _Float64x fminf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); - - -extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) throw (); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) throw (); - - - - -extern _Float64x roundevenf64x (_Float64x __x) throw () __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) throw () __attribute__ ((__const__)); - - - -extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) throw () - ; - - - -extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) throw () - ; - - - - -extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw () - ; - - - - -extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) throw () - ; - - -extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); - - -extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) throw () __attribute__ ((__const__)); - - -extern int totalorderf64x (_Float64x __x, _Float64x __y) throw () - __attribute__ ((__const__)); - - -extern int totalordermagf64x (_Float64x __x, _Float64x __y) throw () - __attribute__ ((__const__)); - - -extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) throw (); - - -extern _Float64x getpayloadf64x (const _Float64x *__x) throw (); extern _Float64x __getpayloadf64x (const _Float64x *__x) throw (); - - -extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) throw (); - - -extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) throw (); -# 458 "/usr/include/math.h" 2 3 4 -# 503 "/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) throw (); - - -extern float fdiv (double __x, double __y) throw (); - - -extern float fmul (double __x, double __y) throw (); - - -extern float fsub (double __x, double __y) throw (); -# 504 "/usr/include/math.h" 2 3 4 -# 517 "/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) throw (); - - -extern float fdivl (long double __x, long double __y) throw (); - - -extern float fmull (long double __x, long double __y) throw (); - - -extern float fsubl (long double __x, long double __y) throw (); -# 518 "/usr/include/math.h" 2 3 4 -# 537 "/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) throw (); - - -extern double ddivl (long double __x, long double __y) throw (); - - -extern double dmull (long double __x, long double __y) throw (); - - -extern double dsubl (long double __x, long double __y) throw (); -# 538 "/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 _Float32 f32addf32x (_Float32x __x, _Float32x __y) throw (); - - -extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) throw (); - - -extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) throw (); - - -extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) throw (); -# 617 "/usr/include/math.h" 2 3 4 -# 626 "/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) throw (); - - -extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) throw (); -# 627 "/usr/include/math.h" 2 3 4 -# 636 "/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) throw (); - - -extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) throw (); -# 637 "/usr/include/math.h" 2 3 4 -# 646 "/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) throw (); - - -extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) throw (); -# 647 "/usr/include/math.h" 2 3 4 -# 666 "/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) throw (); - - -extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) throw (); - - -extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) throw (); -# 667 "/usr/include/math.h" 2 3 4 -# 676 "/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) throw (); - - -extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) throw (); -# 677 "/usr/include/math.h" 2 3 4 -# 686 "/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) throw (); - - -extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) throw (); -# 687 "/usr/include/math.h" 2 3 4 -# 706 "/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) throw (); - - -extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) throw (); - - -extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) throw (); -# 707 "/usr/include/math.h" 2 3 4 -# 716 "/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) throw (); - - -extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) throw (); -# 717 "/usr/include/math.h" 2 3 4 -# 736 "/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) throw (); - - -extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) throw (); - - -extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) throw (); -# 737 "/usr/include/math.h" 2 3 4 -# 773 "/usr/include/math.h" 3 4 -extern int signgam; -# 853 "/usr/include/math.h" 3 4 -enum - { - FP_NAN = - - 0, - FP_INFINITE = - - 1, - FP_ZERO = - - 2, - FP_SUBNORMAL = - - 3, - FP_NORMAL = - - 4 - }; -# 973 "/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) - throw () __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); } - -} -# 974 "/usr/include/math.h" 2 3 4 -# 985 "/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); } - -} -# 1016 "/usr/include/math.h" 3 4 -extern "C++" { -# 1047 "/usr/include/math.h" 3 4 -template <class __T> inline bool -iszero (__T __val) -{ - return __val == 0; -} - -} -# 1498 "/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<_Float128> -{ - static int __call (_Float128 __x, _Float128 __y) throw () - { - return __iseqsigf128 (__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); -} - -} - - - - -} -# 46 "/usr/include/c++/9.2.0/cmath" 2 3 -# 77 "/usr/include/c++/9.2.0/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); } -# 412 "/usr/include/c++/9.2.0/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); } -# 536 "/usr/include/c++/9.2.0/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)); - } -# 1065 "/usr/include/c++/9.2.0/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); } -# 1923 "/usr/include/c++/9.2.0/cmath" 3 - -} - - - - - -} -# 22 "/usr/include/boost/config/no_tr1/cmath.hpp" 2 3 4 -# 16 "/usr/include/boost/numeric/interval/rounded_arith.hpp" 2 3 4 - -namespace boost { -namespace numeric { -namespace interval_lib { - - - - - - -template<class T, class Rounding> -struct rounded_arith_exact: Rounding { - void init() { } - template<class U> T conv_down(U const &v) { return v; } - template<class U> T conv_up (U const &v) { return v; } - T add_down (const T& x, const T& y) { return x + y; } - T add_up (const T& x, const T& y) { return x + y; } - T sub_down (const T& x, const T& y) { return x - y; } - T sub_up (const T& x, const T& y) { return x - y; } - T mul_down (const T& x, const T& y) { return x * y; } - T mul_up (const T& x, const T& y) { return x * y; } - T div_down (const T& x, const T& y) { return x / y; } - T div_up (const T& x, const T& y) { return x / y; } - T median (const T& x, const T& y) { return (x + y) / 2; } - T sqrt_down(const T& x) - { using std::sqrt; return sqrt(x); } - T sqrt_up (const T& x) - { using std::sqrt; return sqrt(x); } - T int_down (const T& x) - { using std::floor; return floor(x); } - T int_up (const T& x) - { using std::ceil; return ceil(x); } -}; - -template<class T, class Rounding> -struct rounded_arith_std: Rounding { - - - - void init() { } - template<class U> T conv_down(U const &v) { this->downward(); return this->force_rounding(v); } - template<class U> T conv_up (U const &v) { this->upward(); return this->force_rounding(v); } - T add_down(const T& x, const T& y) { this->downward(); return this->force_rounding(x + y); } - T sub_down(const T& x, const T& y) { this->downward(); return this->force_rounding(x - y); } - T mul_down(const T& x, const T& y) { this->downward(); return this->force_rounding(x * y); } - T div_down(const T& x, const T& y) { this->downward(); return this->force_rounding(x / y); } - T add_up (const T& x, const T& y) { this->upward(); return this->force_rounding(x + y); } - T sub_up (const T& x, const T& y) { this->upward(); return this->force_rounding(x - y); } - T mul_up (const T& x, const T& y) { this->upward(); return this->force_rounding(x * y); } - T div_up (const T& x, const T& y) { this->upward(); return this->force_rounding(x / y); } - T median(const T& x, const T& y) { this->to_nearest(); return this->force_rounding((x + y) / 2); } - T sqrt_down(const T& x) - { using std::sqrt; this->downward(); return this->force_rounding(sqrt(x)); } - T sqrt_up (const T& x) - { using std::sqrt; this->upward(); return this->force_rounding(sqrt(x)); } - T int_down(const T& x) { this->downward(); return this->to_int(x); } - T int_up (const T& x) { this->upward(); return this->to_int(x); } - - - -}; - -template<class T, class Rounding> -struct rounded_arith_opp: Rounding { - void init() { this->upward(); } -# 93 "/usr/include/boost/numeric/interval/rounded_arith.hpp" 3 4 - template<class U> T conv_down(U const &v) { return -this->force_rounding(-v); } - template<class U> T conv_up (U const &v) { return this->force_rounding(v); } - T add_down(const T& x, const T& y) { return -this->force_rounding((-x) - y); } - T sub_down(const T& x, const T& y) { return -this->force_rounding(y - x); } - T mul_down(const T& x, const T& y) { return -this->force_rounding(x * (-y)); } - T div_down(const T& x, const T& y) { return -this->force_rounding(x / (-y)); } - T add_up (const T& x, const T& y) { return this->force_rounding(x + y); } - T sub_up (const T& x, const T& y) { return this->force_rounding(x - y); } - T mul_up (const T& x, const T& y) { return this->force_rounding(x * y); } - T div_up (const T& x, const T& y) { return this->force_rounding(x / y); } - T median (const T& x, const T& y) { this->to_nearest(); T r = this->force_rounding((x + y) / 2); this->upward(); return r; } - T sqrt_down(const T& x) - { using std::sqrt; this->downward(); T r = this->force_rounding(sqrt(x)); this->upward(); return r; } - T sqrt_up (const T& x) - { using std::sqrt; return this->force_rounding(sqrt(x)); } - T int_down(const T& x) { return -this->to_int(-x); } - T int_up (const T& x) { return this->to_int(x); } - - - - -}; - -} -} -} -# 16 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/numeric/interval/detail/c99_rounding_control.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/detail/c99_rounding_control.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/detail/c99sub_rounding_control.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/detail/c99sub_rounding_control.hpp" 3 4 -# 1 "/usr/include/boost/detail/fenv.hpp" 1 3 4 -# 97 "/usr/include/boost/detail/fenv.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/fenv.h" 1 3 4 -# 32 "/usr/include/c++/9.2.0/fenv.h" 3 4 - -# 33 "/usr/include/c++/9.2.0/fenv.h" 3 - - - -# 1 "/usr/include/fenv.h" 1 3 4 -# 26 "/usr/include/fenv.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 27 "/usr/include/fenv.h" 2 3 4 -# 64 "/usr/include/fenv.h" 3 4 -# 1 "/usr/include/bits/fenv.h" 1 3 4 -# 24 "/usr/include/bits/fenv.h" 3 4 -enum - { - FE_INVALID = - - 0x01, - __FE_DENORM = 0x02, - FE_DIVBYZERO = - - 0x04, - FE_OVERFLOW = - - 0x08, - FE_UNDERFLOW = - - 0x10, - FE_INEXACT = - - 0x20 - }; - - - - - - - -enum - { - FE_TONEAREST = - - 0, - FE_DOWNWARD = - - 0x400, - FE_UPWARD = - - 0x800, - FE_TOWARDZERO = - - 0xc00 - }; - - - -typedef unsigned short int fexcept_t; - - - - - - -typedef struct - { - unsigned short int __control_word; - unsigned short int __glibc_reserved1; - unsigned short int __status_word; - unsigned short int __glibc_reserved2; - unsigned short int __tags; - unsigned short int __glibc_reserved3; - unsigned int __eip; - unsigned short int __cs_selector; - unsigned int __opcode:11; - unsigned int __glibc_reserved4:5; - unsigned int __data_offset; - unsigned short int __data_selector; - unsigned short int __glibc_reserved5; - - unsigned int __mxcsr; - - } -fenv_t; -# 106 "/usr/include/bits/fenv.h" 3 4 -typedef struct - { - unsigned short int __control_word; - unsigned short int __glibc_reserved; - unsigned int __mxcsr; - } -femode_t; -# 65 "/usr/include/fenv.h" 2 3 4 - -extern "C" { - - - - -extern int feclearexcept (int __excepts) throw (); - - - -extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw (); - - -extern int feraiseexcept (int __excepts) throw (); - - - - -extern int fesetexcept (int __excepts) throw (); - - - - -extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) throw (); - - - -extern int fetestexcept (int __excepts) throw (); - - - - -extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) throw (); - - - - - - -extern int fegetround (void) throw () __attribute__ ((__pure__)); - - -extern int fesetround (int __rounding_direction) throw (); - - - - - - -extern int fegetenv (fenv_t *__envp) throw (); - - - - -extern int feholdexcept (fenv_t *__envp) throw (); - - - -extern int fesetenv (const fenv_t *__envp) throw (); - - - - -extern int feupdateenv (const fenv_t *__envp) throw (); - - - - - - - -extern int fegetmode (femode_t *__modep) throw (); - - - -extern int fesetmode (const femode_t *__modep) throw (); -# 161 "/usr/include/fenv.h" 3 4 -extern int feenableexcept (int __excepts) throw (); - - - - -extern int fedisableexcept (int __excepts) throw (); - - -extern int fegetexcept (void) throw (); - - -} -# 37 "/usr/include/c++/9.2.0/fenv.h" 2 3 -# 55 "/usr/include/c++/9.2.0/fenv.h" 3 -namespace std -{ - - using ::fenv_t; - using ::fexcept_t; - - - using ::feclearexcept; - using ::fegetexceptflag; - using ::feraiseexcept; - using ::fesetexceptflag; - using ::fetestexcept; - - using ::fegetround; - using ::fesetround; - - using ::fegetenv; - using ::feholdexcept; - using ::fesetenv; - using ::feupdateenv; -} -# 98 "/usr/include/boost/detail/fenv.hpp" 2 3 4 -# 15 "/usr/include/boost/numeric/interval/detail/c99sub_rounding_control.hpp" 2 3 4 - -namespace boost { -namespace numeric { -namespace interval_lib { -namespace detail { - -extern "C" { double rint(double); } - -struct c99_rounding_control -{ - typedef int rounding_mode; - - static void set_rounding_mode(rounding_mode mode) { fesetround(mode); } - static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); } - static void downward() { set_rounding_mode(0x400); } - static void upward() { set_rounding_mode(0x800); } - static void to_nearest() { set_rounding_mode(0); } - static void toward_zero() { set_rounding_mode(0xc00); } - - template<class T> - static T to_int(const T& r) { return rint(r); } -}; - -} -} -} -} -# 15 "/usr/include/boost/numeric/interval/detail/c99_rounding_control.hpp" 2 3 4 - -namespace boost { -namespace numeric { -namespace interval_lib { - -template<> -struct rounding_control<float>: - detail::c99_rounding_control -{ - static float force_rounding(float const &r) - { volatile float r_ = r; return r_; } -}; - -template<> -struct rounding_control<double>: - detail::c99_rounding_control -{ - static double force_rounding(double const &r) - { volatile double r_ = r; return r_; } -}; - -template<> -struct rounding_control<long double>: - detail::c99_rounding_control -{ - static long double force_rounding(long double const &r) - { volatile long double r_ = r; return r_; } -}; - -} -} -} -# 22 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 2 3 4 -# 45 "/usr/include/boost/numeric/interval/hw_rounding.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - - - - - -template<> -struct rounded_math<float> - : save_state<rounded_arith_opp<float> > -{}; - -template<> -struct rounded_math<double> - : save_state<rounded_arith_opp<double> > -{}; - -template<> -struct rounded_math<long double> - : save_state<rounded_arith_opp<long double> > -{}; - -} -} -} -# 19 "/usr/include/boost/numeric/interval.hpp" 2 3 4 - -# 1 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - -template<class T, class Rounding> -struct rounded_transc_exact: Rounding -{ - - - - T exp_down(const T& x) { using std::exp; return exp(x); } T exp_up (const T& x) { using std::exp; return exp(x); } - T log_down(const T& x) { using std::log; return log(x); } T log_up (const T& x) { using std::log; return log(x); } - T sin_down(const T& x) { using std::sin; return sin(x); } T sin_up (const T& x) { using std::sin; return sin(x); } - T cos_down(const T& x) { using std::cos; return cos(x); } T cos_up (const T& x) { using std::cos; return cos(x); } - T tan_down(const T& x) { using std::tan; return tan(x); } T tan_up (const T& x) { using std::tan; return tan(x); } - T asin_down(const T& x) { using std::asin; return asin(x); } T asin_up (const T& x) { using std::asin; return asin(x); } - T acos_down(const T& x) { using std::acos; return acos(x); } T acos_up (const T& x) { using std::acos; return acos(x); } - T atan_down(const T& x) { using std::atan; return atan(x); } T atan_up (const T& x) { using std::atan; return atan(x); } - T sinh_down(const T& x) { using std::sinh; return sinh(x); } T sinh_up (const T& x) { using std::sinh; return sinh(x); } - T cosh_down(const T& x) { using std::cosh; return cosh(x); } T cosh_up (const T& x) { using std::cosh; return cosh(x); } - T tanh_down(const T& x) { using std::tanh; return tanh(x); } T tanh_up (const T& x) { using std::tanh; return tanh(x); } - - - - - T asinh_down(const T& x) { using ::asinh; return asinh(x); } T asinh_up (const T& x) { using ::asinh; return asinh(x); } - T acosh_down(const T& x) { using ::acosh; return acosh(x); } T acosh_up (const T& x) { using ::acosh; return acosh(x); } - T atanh_down(const T& x) { using ::atanh; return atanh(x); } T atanh_up (const T& x) { using ::atanh; return atanh(x); } - -}; - -template<class T, class Rounding> -struct rounded_transc_std: Rounding -{ - - - - - - - - T exp_down(const T& x) { using std::exp; this->downward(); return this->force_rounding(exp(x)); } T exp_up (const T& x) { using std::exp; this->upward(); return this->force_rounding(exp(x)); } - T log_down(const T& x) { using std::log; this->downward(); return this->force_rounding(log(x)); } T log_up (const T& x) { using std::log; this->upward(); return this->force_rounding(log(x)); } - T sin_down(const T& x) { using std::sin; this->downward(); return this->force_rounding(sin(x)); } T sin_up (const T& x) { using std::sin; this->upward(); return this->force_rounding(sin(x)); } - T cos_down(const T& x) { using std::cos; this->downward(); return this->force_rounding(cos(x)); } T cos_up (const T& x) { using std::cos; this->upward(); return this->force_rounding(cos(x)); } - T tan_down(const T& x) { using std::tan; this->downward(); return this->force_rounding(tan(x)); } T tan_up (const T& x) { using std::tan; this->upward(); return this->force_rounding(tan(x)); } - T asin_down(const T& x) { using std::asin; this->downward(); return this->force_rounding(asin(x)); } T asin_up (const T& x) { using std::asin; this->upward(); return this->force_rounding(asin(x)); } - T acos_down(const T& x) { using std::acos; this->downward(); return this->force_rounding(acos(x)); } T acos_up (const T& x) { using std::acos; this->upward(); return this->force_rounding(acos(x)); } - T atan_down(const T& x) { using std::atan; this->downward(); return this->force_rounding(atan(x)); } T atan_up (const T& x) { using std::atan; this->upward(); return this->force_rounding(atan(x)); } - T sinh_down(const T& x) { using std::sinh; this->downward(); return this->force_rounding(sinh(x)); } T sinh_up (const T& x) { using std::sinh; this->upward(); return this->force_rounding(sinh(x)); } - T cosh_down(const T& x) { using std::cosh; this->downward(); return this->force_rounding(cosh(x)); } T cosh_up (const T& x) { using std::cosh; this->upward(); return this->force_rounding(cosh(x)); } - T tanh_down(const T& x) { using std::tanh; this->downward(); return this->force_rounding(tanh(x)); } T tanh_up (const T& x) { using std::tanh; this->upward(); return this->force_rounding(tanh(x)); } -# 77 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 - T asinh_down(const T& x) { using ::asinh; this->downward(); return this->force_rounding(asinh(x)); } T asinh_up (const T& x) { using ::asinh; this->upward(); return this->force_rounding(asinh(x)); } - T acosh_down(const T& x) { using ::acosh; this->downward(); return this->force_rounding(acosh(x)); } T acosh_up (const T& x) { using ::acosh; this->upward(); return this->force_rounding(acosh(x)); } - T atanh_down(const T& x) { using ::atanh; this->downward(); return this->force_rounding(atanh(x)); } T atanh_up (const T& x) { using ::atanh; this->upward(); return this->force_rounding(atanh(x)); } - -}; - -template<class T, class Rounding> -struct rounded_transc_opp: Rounding -{ -# 94 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 - T exp_down(const T& x) { using std::exp; this->downward(); T y = this->force_rounding(exp(x)); this->upward(); return y; } T exp_up (const T& x) { using std::exp; return this->force_rounding(exp(x)); } - T log_down(const T& x) { using std::log; this->downward(); T y = this->force_rounding(log(x)); this->upward(); return y; } T log_up (const T& x) { using std::log; return this->force_rounding(log(x)); } - T cos_down(const T& x) { using std::cos; this->downward(); T y = this->force_rounding(cos(x)); this->upward(); return y; } T cos_up (const T& x) { using std::cos; return this->force_rounding(cos(x)); } - T acos_down(const T& x) { using std::acos; this->downward(); T y = this->force_rounding(acos(x)); this->upward(); return y; } T acos_up (const T& x) { using std::acos; return this->force_rounding(acos(x)); } - T cosh_down(const T& x) { using std::cosh; this->downward(); T y = this->force_rounding(cosh(x)); this->upward(); return y; } T cosh_up (const T& x) { using std::cosh; return this->force_rounding(cosh(x)); } -# 107 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 - T sin_down(const T& x) { using std::sin; return -this->force_rounding(-sin(x)); } T sin_up (const T& x) { using std::sin; return this->force_rounding(sin(x)); } - T tan_down(const T& x) { using std::tan; return -this->force_rounding(-tan(x)); } T tan_up (const T& x) { using std::tan; return this->force_rounding(tan(x)); } - T asin_down(const T& x) { using std::asin; return -this->force_rounding(-asin(x)); } T asin_up (const T& x) { using std::asin; return this->force_rounding(asin(x)); } - T atan_down(const T& x) { using std::atan; return -this->force_rounding(-atan(x)); } T atan_up (const T& x) { using std::atan; return this->force_rounding(atan(x)); } - T sinh_down(const T& x) { using std::sinh; return -this->force_rounding(-sinh(x)); } T sinh_up (const T& x) { using std::sinh; return this->force_rounding(sinh(x)); } - T tanh_down(const T& x) { using std::tanh; return -this->force_rounding(-tanh(x)); } T tanh_up (const T& x) { using std::tanh; return this->force_rounding(tanh(x)); } -# 122 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 - T asinh_down(const T& x) { using ::asinh; this->downward(); T y = this->force_rounding(asinh(x)); this->upward(); return y; } T asinh_up (const T& x) { using ::asinh; return this->force_rounding(asinh(x)); } - T atanh_down(const T& x) { using ::atanh; this->downward(); T y = this->force_rounding(atanh(x)); this->upward(); return y; } T atanh_up (const T& x) { using ::atanh; return this->force_rounding(atanh(x)); } -# 132 "/usr/include/boost/numeric/interval/rounded_transc.hpp" 3 4 - T acosh_down(const T& x) { using ::acosh; return -this->force_rounding(-acosh(x)); } T acosh_up (const T& x) { using ::acosh; return this->force_rounding(acosh(x)); } - -}; - -} -} -} -# 21 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/constants.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/interval/constants.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { -namespace constants { - - - - - -static const float pi_f_l = 13176794.0f/(1<<22); -static const float pi_f_u = 13176795.0f/(1<<22); -static const double pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30); -static const double pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30); - -template<class T> inline T pi_lower() { return 3; } -template<class T> inline T pi_upper() { return 4; } -template<class T> inline T pi_half_lower() { return 1; } -template<class T> inline T pi_half_upper() { return 2; } -template<class T> inline T pi_twice_lower() { return 6; } -template<class T> inline T pi_twice_upper() { return 7; } - -template<> inline float pi_lower<float>() { return pi_f_l; } -template<> inline float pi_upper<float>() { return pi_f_u; } -template<> inline float pi_half_lower<float>() { return pi_f_l / 2; } -template<> inline float pi_half_upper<float>() { return pi_f_u / 2; } -template<> inline float pi_twice_lower<float>() { return pi_f_l * 2; } -template<> inline float pi_twice_upper<float>() { return pi_f_u * 2; } - -template<> inline double pi_lower<double>() { return pi_d_l; } -template<> inline double pi_upper<double>() { return pi_d_u; } -template<> inline double pi_half_lower<double>() { return pi_d_l / 2; } -template<> inline double pi_half_upper<double>() { return pi_d_u / 2; } -template<> inline double pi_twice_lower<double>() { return pi_d_l * 2; } -template<> inline double pi_twice_upper<double>() { return pi_d_u * 2; } - -template<> inline long double pi_lower<long double>() { return pi_d_l; } -template<> inline long double pi_upper<long double>() { return pi_d_u; } -template<> inline long double pi_half_lower<long double>() { return pi_d_l / 2; } -template<> inline long double pi_half_upper<long double>() { return pi_d_u / 2; } -template<> inline long double pi_twice_lower<long double>() { return pi_d_l * 2; } -template<> inline long double pi_twice_upper<long double>() { return pi_d_u * 2; } - -} - -template<class I> inline -I pi() -{ - typedef typename I::base_type T; - return I(constants::pi_lower<T>(), - constants::pi_upper<T>(), true); -} - -template<class I> inline -I pi_half() -{ - typedef typename I::base_type T; - return I(constants::pi_half_lower<T>(), - constants::pi_half_upper<T>(), true); -} - -template<class I> inline -I pi_twice() -{ - typedef typename I::base_type T; - return I(constants::pi_twice_lower<T>(), - constants::pi_twice_upper<T>(), true); -} - -} -} -} -# 22 "/usr/include/boost/numeric/interval.hpp" 2 3 4 - -# 1 "/usr/include/boost/numeric/interval/checking.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/checking.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cassert" 1 3 4 -# 41 "/usr/include/c++/9.2.0/cassert" 3 4 - -# 42 "/usr/include/c++/9.2.0/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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 44 "/usr/include/c++/9.2.0/cassert" 2 3 -# 16 "/usr/include/boost/numeric/interval/checking.hpp" 2 3 4 - - -namespace boost { -namespace numeric { -namespace interval_lib { - -struct exception_create_empty -{ - void operator()() - { - throw std::runtime_error("boost::interval: empty interval created"); - } -}; - -struct exception_invalid_number -{ - void operator()() - { - throw std::invalid_argument("boost::interval: invalid number"); - } -}; - -template<class T> -struct checking_base -{ - static T pos_inf() - { - (static_cast <bool> (std::numeric_limits<T>::has_infinity) ? void (0) : __assert_fail ("std::numeric_limits<T>::has_infinity", "/usr/include/boost/numeric/interval/checking.hpp", 43, __extension__ __PRETTY_FUNCTION__)); - return std::numeric_limits<T>::infinity(); - } - static T neg_inf() - { - (static_cast <bool> (std::numeric_limits<T>::has_infinity) ? void (0) : __assert_fail ("std::numeric_limits<T>::has_infinity", "/usr/include/boost/numeric/interval/checking.hpp", 48, __extension__ __PRETTY_FUNCTION__)); - return -std::numeric_limits<T>::infinity(); - } - static T nan() - { - (static_cast <bool> (std::numeric_limits<T>::has_quiet_NaN) ? void (0) : __assert_fail ("std::numeric_limits<T>::has_quiet_NaN", "/usr/include/boost/numeric/interval/checking.hpp", 53, __extension__ __PRETTY_FUNCTION__)); - return std::numeric_limits<T>::quiet_NaN(); - } - static bool is_nan(const T& x) - { - return std::numeric_limits<T>::has_quiet_NaN && (x != x); - } - static T empty_lower() - { - return (std::numeric_limits<T>::has_quiet_NaN ? - std::numeric_limits<T>::quiet_NaN() : static_cast<T>(1)); - } - static T empty_upper() - { - return (std::numeric_limits<T>::has_quiet_NaN ? - std::numeric_limits<T>::quiet_NaN() : static_cast<T>(0)); - } - static bool is_empty(const T& l, const T& u) - { - return !(l <= u); - } -}; - -template<class T, class Checking = checking_base<T>, - class Exception = exception_create_empty> -struct checking_no_empty: Checking -{ - static T nan() - { - (static_cast <bool> (false) ? void (0) : __assert_fail ("false", "/usr/include/boost/numeric/interval/checking.hpp", 82, __extension__ __PRETTY_FUNCTION__)); - return Checking::nan(); - } - static T empty_lower() - { - Exception()(); - return Checking::empty_lower(); - } - static T empty_upper() - { - Exception()(); - return Checking::empty_upper(); - } - static bool is_empty(const T&, const T&) - { - return false; - } -}; - -template<class T, class Checking = checking_base<T> > -struct checking_no_nan: Checking -{ - static bool is_nan(const T&) - { - return false; - } -}; - -template<class T, class Checking = checking_base<T>, - class Exception = exception_invalid_number> -struct checking_catch_nan: Checking -{ - static bool is_nan(const T& x) - { - if (Checking::is_nan(x)) Exception()(); - return false; - } -}; - -template<class T> -struct checking_strict: - checking_no_nan<T, checking_no_empty<T> > -{}; - -} -} -} -# 24 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/compare.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/interval/compare.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/compare/certain.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/compare/certain.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/detail/test_input.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/detail/test_input.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { -namespace user { - -template<class T> inline -bool is_zero(T const &v) { return v == static_cast<T>(0); } - -template<class T> inline -bool is_neg (T const &v) { return v < static_cast<T>(0); } - -template<class T> inline -bool is_pos (T const &v) { return v > static_cast<T>(0); } - -} - -namespace detail { - -template<class T, class Policies> inline -bool test_input(const interval<T, Policies>& x) { - typedef typename Policies::checking checking; - return checking::is_empty(x.lower(), x.upper()); -} - -template<class T, class Policies1, class Policies2> inline -bool test_input(const interval<T, Policies1>& x, const interval<T, Policies2>& y) { - typedef typename Policies1::checking checking1; - typedef typename Policies2::checking checking2; - return checking1::is_empty(x.lower(), x.upper()) || - checking2::is_empty(y.lower(), y.upper()); -} - -template<class T, class Policies> inline -bool test_input(const T& x, const interval<T, Policies>& y) { - typedef typename Policies::checking checking; - return checking::is_nan(x) || checking::is_empty(y.lower(), y.upper()); -} - -template<class T, class Policies> inline -bool test_input(const interval<T, Policies>& x, const T& y) { - typedef typename Policies::checking checking; - return checking::is_empty(x.lower(), x.upper()) || checking::is_nan(y); -} - -template<class T, class Policies> inline -bool test_input(const T& x) { - typedef typename Policies::checking checking; - return checking::is_nan(x); -} - -template<class T, class Policies> inline -bool test_input(const T& x, const T& y) { - typedef typename Policies::checking checking; - return checking::is_nan(x) || checking::is_nan(y); -} - -} -} -} -} -# 15 "/usr/include/boost/numeric/interval/compare/certain.hpp" 2 3 4 - -namespace boost { -namespace numeric { -namespace interval_lib { -namespace compare { -namespace certain { - -template<class T, class Policies1, class Policies2> inline -bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() < y.lower(); -} - -template<class T, class Policies> inline -bool operator<(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() < y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() <= y.lower(); -} - -template<class T, class Policies> inline -bool operator<=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() <= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() > y.upper(); -} - -template<class T, class Policies> inline -bool operator>(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() > y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() >= y.upper(); -} - -template<class T, class Policies> inline -bool operator>=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() >= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() == y.lower() && x.lower() == y.upper(); -} - -template<class T, class Policies> inline -bool operator==(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() == y && x.lower() == y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() < y.lower() || x.lower() > y.upper(); -} - -template<class T, class Policies> inline -bool operator!=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() < y || x.lower() > y; -} - -} -} -} -} -} -# 14 "/usr/include/boost/numeric/interval/compare.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/compare/possible.hpp" 1 3 4 -# 16 "/usr/include/boost/numeric/interval/compare/possible.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { -namespace compare { -namespace possible { - -template<class T, class Policies1, class Policies2> inline -bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() < y.upper(); -} - -template<class T, class Policies> inline -bool operator<(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() < y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() <= y.upper(); -} - -template<class T, class Policies> inline -bool operator<=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() <= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() > y.lower(); -} - -template<class T, class Policies> inline -bool operator>(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() > y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() >= y.lower(); -} - -template<class T, class Policies> inline -bool operator>=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.upper() >= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() <= y.upper() && x.upper() >= y.lower(); -} - -template<class T, class Policies> inline -bool operator==(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() <= y && x.upper() >= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() != y.upper() || x.upper() != y.lower(); -} - -template<class T, class Policies> inline -bool operator!=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() != y || x.upper() != y; -} - -} -} -} -} -} -# 15 "/usr/include/boost/numeric/interval/compare.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/compare/explicit.hpp" 1 3 4 -# 16 "/usr/include/boost/numeric/interval/compare/explicit.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - - - - - -template<class T, class Policies1, class Policies2> inline -bool cerlt(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() < y.lower(); -} - -template<class T, class Policies> inline -bool cerlt(const interval<T, Policies>& x, const T& y) -{ - return x.upper() < y; -} - -template<class T, class Policies> inline -bool cerlt(const T& x, const interval<T, Policies>& y) -{ - return x < y.lower(); -} - -template<class T, class Policies1, class Policies2> inline -bool cerle(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() <= y.lower(); -} - -template<class T, class Policies> inline -bool cerle(const interval<T, Policies>& x, const T& y) -{ - return x.upper() <= y; -} - -template<class T, class Policies> inline -bool cerle(const T& x, const interval<T, Policies>& y) -{ - return x <= y.lower(); -} - -template<class T, class Policies1, class Policies2> inline -bool cergt(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.lower() > y.upper(); -} - -template<class T, class Policies> inline -bool cergt(const interval<T, Policies>& x, const T& y) -{ - return x.lower() > y; -} - -template<class T, class Policies> inline -bool cergt(const T& x, const interval<T, Policies>& y) -{ - return x > y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool cerge(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.lower() >= y.upper(); -} - -template<class T, class Policies> inline -bool cerge(const interval<T, Policies>& x, const T& y) -{ - return x.lower() >= y; -} - -template<class T, class Policies> inline -bool cerge(const T& x, const interval<T, Policies>& y) -{ - return x >= y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool cereq(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.lower() == y.upper() && y.lower() == x.upper(); -} - -template<class T, class Policies> inline -bool cereq(const interval<T, Policies>& x, const T& y) -{ - return x.lower() == y && x.upper() == y; -} - -template<class T, class Policies> inline -bool cereq(const T& x, const interval<T, Policies>& y) -{ - return x == y.lower() && x == y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool cerne(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() < y.lower() || y.upper() < x.lower(); -} - -template<class T, class Policies> inline -bool cerne(const interval<T, Policies>& x, const T& y) -{ - return x.upper() < y || y < x.lower(); -} - -template<class T, class Policies> inline -bool cerne(const T& x, const interval<T, Policies>& y) -{ - return x < y.lower() || y.upper() < x; -} - - - - - -template<class T, class Policies1, class Policies2> inline -bool poslt(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.lower() < y.upper(); -} - -template<class T, class Policies> inline -bool poslt(const interval<T, Policies>& x, const T& y) -{ - return x.lower() < y; -} - -template<class T, class Policies> inline -bool poslt(const T& x, const interval<T, Policies>& y) -{ - return x < y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool posle(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.lower() <= y.upper(); -} - -template<class T, class Policies> inline -bool posle(const interval<T, Policies>& x, const T& y) -{ - return x.lower() <= y; -} - -template<class T, class Policies> inline -bool posle(const T& x, const interval<T, Policies>& y) -{ - return x <= y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool posgt(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() > y.lower(); -} - -template<class T, class Policies> inline -bool posgt(const interval<T, Policies>& x, const T& y) -{ - return x.upper() > y; -} - -template<class T, class Policies> inline -bool posgt(const T& x, const interval<T, Policies> & y) -{ - return x > y.lower(); -} - -template<class T, class Policies1, class Policies2> inline -bool posge(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() >= y.lower(); -} - -template<class T, class Policies> inline -bool posge(const interval<T, Policies>& x, const T& y) -{ - return x.upper() >= y; -} - -template<class T, class Policies> inline -bool posge(const T& x, const interval<T, Policies>& y) -{ - return x >= y.lower(); -} - -template<class T, class Policies1, class Policies2> inline -bool poseq(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() >= y.lower() && y.upper() >= x.lower(); -} - -template<class T, class Policies> inline -bool poseq(const interval<T, Policies>& x, const T& y) -{ - return x.upper() >= y && y >= x.lower(); -} - -template<class T, class Policies> inline -bool poseq(const T& x, const interval<T, Policies>& y) -{ - return x >= y.lower() && y.upper() >= x; -} - -template<class T, class Policies1, class Policies2> inline -bool posne(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return x.upper() != y.lower() || y.upper() != x.lower(); -} - -template<class T, class Policies> inline -bool posne(const interval<T, Policies>& x, const T& y) -{ - return x.upper() != y || y != x.lower(); -} - -template<class T, class Policies> inline -bool posne(const T& x, const interval<T, Policies>& y) -{ - return x != y.lower() || y.upper() != x; -} - -} -} -} -# 16 "/usr/include/boost/numeric/interval/compare.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/compare/lexicographic.hpp" 1 3 4 -# 16 "/usr/include/boost/numeric/interval/compare/lexicographic.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { -namespace compare { -namespace lexicographic { - -template<class T, class Policies1, class Policies2> inline -bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - const T& yl = y.lower(); - return xl < yl || (xl == yl && x.upper() < y.upper()); -} - -template<class T, class Policies> inline -bool operator<(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() < y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - const T& yl = y.lower(); - return xl < yl || (xl == yl && x.upper() <= y.upper()); -} - -template<class T, class Policies> inline -bool operator<=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - return xl < y || (xl == y && x.upper() <= y); -} - -template<class T, class Policies1, class Policies2> inline -bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - const T& yl = y.lower(); - return xl > yl || (xl == yl && x.upper() > y.upper()); -} - -template<class T, class Policies> inline -bool operator>(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - return xl > y || (xl == y && x.upper() > y); -} - -template<class T, class Policies1, class Policies2> inline -bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - const T& xl = x.lower(); - const T& yl = y.lower(); - return xl > yl || (xl == yl && x.upper() >= y.upper()); -} - -template<class T, class Policies> inline -bool operator>=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() >= y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() == y.lower() && x.upper() == y.upper(); -} - -template<class T, class Policies> inline -bool operator==(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() == y && x.upper() == y; -} - -template<class T, class Policies1, class Policies2> inline -bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() != y.lower() || x.upper() != y.upper(); -} - -template<class T, class Policies> inline -bool operator!=(const interval<T, Policies>& x, const T& y) -{ - if (detail::test_input(x, y)) throw comparison_error(); - return x.lower() != y || x.upper() != y; -} - -} -} -} -} -} -# 17 "/usr/include/boost/numeric/interval/compare.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/compare/set.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/compare/set.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/utility.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/interval/utility.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/utility_fwd.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/interval/utility_fwd.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/utility" 1 3 4 -# 58 "/usr/include/c++/9.2.0/utility" 3 4 - -# 59 "/usr/include/c++/9.2.0/utility" 3 -# 69 "/usr/include/c++/9.2.0/utility" 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_relops.h" 1 3 -# 67 "/usr/include/c++/9.2.0/bits/stl_relops.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - namespace rel_ops - { -# 85 "/usr/include/c++/9.2.0/bits/stl_relops.h" 3 - template <class _Tp> - inline bool - operator!=(const _Tp& __x, const _Tp& __y) - { return !(__x == __y); } -# 98 "/usr/include/c++/9.2.0/bits/stl_relops.h" 3 - template <class _Tp> - inline bool - operator>(const _Tp& __x, const _Tp& __y) - { return __y < __x; } -# 111 "/usr/include/c++/9.2.0/bits/stl_relops.h" 3 - template <class _Tp> - inline bool - operator<=(const _Tp& __x, const _Tp& __y) - { return !(__y < __x); } -# 124 "/usr/include/c++/9.2.0/bits/stl_relops.h" 3 - template <class _Tp> - inline bool - operator>=(const _Tp& __x, const _Tp& __y) - { return !(__x < __y); } - } - - -} -# 70 "/usr/include/c++/9.2.0/utility" 2 3 -# 78 "/usr/include/c++/9.2.0/utility" 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<std::size_t __i, typename _Tp> - struct tuple_element; - - - template<std::size_t __i, typename _Tp> - using __tuple_element_t = typename tuple_element<__i, _Tp>::type; - - template<std::size_t __i, typename _Tp> - struct tuple_element<__i, const _Tp> - { - typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; - }; - - template<std::size_t __i, typename _Tp> - struct tuple_element<__i, volatile _Tp> - { - typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; - }; - - template<std::size_t __i, typename _Tp> - struct tuple_element<__i, const volatile _Tp> - { - typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; - }; - - - - - - - - template<std::size_t __i, typename _Tp> - using tuple_element_t = typename tuple_element<__i, _Tp>::type; - - - - - - template<typename _T1, typename _T2> - struct __is_tuple_like_impl<std::pair<_T1, _T2>> : true_type - { }; - - - template<class _Tp1, class _Tp2> - struct tuple_size<std::pair<_Tp1, _Tp2>> - : public integral_constant<std::size_t, 2> { }; - - - template<class _Tp1, class _Tp2> - struct tuple_element<0, std::pair<_Tp1, _Tp2>> - { typedef _Tp1 type; }; - - - template<class _Tp1, class _Tp2> - struct tuple_element<1, std::pair<_Tp1, _Tp2>> - { typedef _Tp2 type; }; - - template<std::size_t _Int> - struct __pair_get; - - template<> - struct __pair_get<0> - { - template<typename _Tp1, typename _Tp2> - static constexpr _Tp1& - __get(std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.first; } - - template<typename _Tp1, typename _Tp2> - static constexpr _Tp1&& - __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<_Tp1>(__pair.first); } - - template<typename _Tp1, typename _Tp2> - static constexpr const _Tp1& - __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.first; } - - template<typename _Tp1, typename _Tp2> - static constexpr const _Tp1&& - __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<const _Tp1>(__pair.first); } - }; - - template<> - struct __pair_get<1> - { - template<typename _Tp1, typename _Tp2> - static constexpr _Tp2& - __get(std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.second; } - - template<typename _Tp1, typename _Tp2> - static constexpr _Tp2&& - __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<_Tp2>(__pair.second); } - - template<typename _Tp1, typename _Tp2> - static constexpr const _Tp2& - __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.second; } - - template<typename _Tp1, typename _Tp2> - static constexpr const _Tp2&& - __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<const _Tp2>(__pair.second); } - }; - - template<std::size_t _Int, class _Tp1, class _Tp2> - constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& - get(std::pair<_Tp1, _Tp2>& __in) noexcept - { return __pair_get<_Int>::__get(__in); } - - template<std::size_t _Int, class _Tp1, class _Tp2> - constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& - get(std::pair<_Tp1, _Tp2>&& __in) noexcept - { return __pair_get<_Int>::__move_get(std::move(__in)); } - - template<std::size_t _Int, class _Tp1, class _Tp2> - constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& - get(const std::pair<_Tp1, _Tp2>& __in) noexcept - { return __pair_get<_Int>::__const_get(__in); } - - template<std::size_t _Int, class _Tp1, class _Tp2> - constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& - get(const std::pair<_Tp1, _Tp2>&& __in) noexcept - { return __pair_get<_Int>::__const_move_get(std::move(__in)); } - - - - - - 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); } - - - - - template <typename _Tp, typename _Up = _Tp> - inline _Tp - exchange(_Tp& __obj, _Up&& __new_val) - { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } - - - - - template<size_t... _Indexes> struct _Index_tuple { }; -# 301 "/usr/include/c++/9.2.0/utility" 3 - template<size_t _Num> - struct _Build_index_tuple - { - - - - - - - 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)>; -# 396 "/usr/include/c++/9.2.0/utility" 3 - -} -# 16 "/usr/include/boost/numeric/interval/utility_fwd.hpp" 2 3 4 - - - - - -namespace boost { namespace numeric { - - - - - - template<class T, class Policies> - const T& lower(const interval<T,Policies>& x); - - template<class T, class Policies> - const T& upper(const interval<T,Policies>& x); - - template<class T, class Policies> - T checked_lower(const interval<T,Policies>& x); - - template<class T, class Policies> - T width(const interval<T,Policies>& x); - - template<class T, class Policies> - T median(const interval<T,Policies>& x); - - template<class T, class Policies> - interval<T,Policies> widen(const interval<T,Policies>& x, const T& v); - - - - - - template <class T, class Policies> - bool empty(const interval<T,Policies>& x); - - template <class T, class Policies> - bool zero_in(const interval<T,Policies>& x); - - template <class T, class Policies> - bool in_zero(const interval<T,Policies>& x); - - template <class T, class Policies> - bool in(const T& x, const interval<T,Policies>& y); - - template <class T, class Policies> - bool - subset( - const interval<T,Policies>& x - , const interval<T,Policies>& y - ); - - template <class T, class Policies1, class Policies2> - bool - proper_subset( - const interval<T,Policies1>& x - , const interval<T,Policies2>& y - ); - - template <class T, class Policies1, class Policies2> - bool - overlap( - const interval<T,Policies1>& x - , const interval<T,Policies2>& y - ); - - template <class T, class Policies> - bool singleton(const interval<T, Policies>& x); - - template <class T, class Policies1, class Policies2> - bool - equal( - const interval<T,Policies1>& x - , const interval<T,Policies2>& y - ); - - template <class T, class Policies> - interval<T, Policies> - intersect( - const interval<T,Policies>& x - , const interval<T,Policies>& y - ); - - template <class T, class Policies> - interval<T, Policies> - hull(const interval<T,Policies>& x, const interval<T,Policies>& y); - - template <class T, class Policies> - interval<T, Policies> - hull(const interval<T,Policies>& x, const T& y); - - template <class T, class Policies> - interval<T, Policies> - hull(const T& x, const interval<T,Policies>& y); - - template <class T> - interval<T> hull(const T& x, const T& y); - - template <class T, class Policies> - std::pair<interval<T,Policies>,interval<T,Policies> > - bisect(const interval<T,Policies>& x); - - - - - - template <class T, class Policies> - T norm(const interval<T,Policies>& x); - - template <class T, class Policies> - interval<T,Policies> abs(const interval<T,Policies>& x); - - template <class T, class Policies> - interval<T,Policies> - max ( - const interval<T,Policies>& x - , const interval<T,Policies>& y - ); - - template <class T, class Policies> - interval<T,Policies> - max ( - const interval<T,Policies>& x - , const T& y - ); - - template <class T, class Policies> - interval<T,Policies> - max ( - const T& x - , const interval<T,Policies>& y - ); - - template <class T, class Policies> - interval<T,Policies> - min ( - const interval<T,Policies>& x - , const interval<T,Policies>& y - ); - - template <class T, class Policies> - interval<T,Policies> - min ( - const interval<T,Policies>& x - , const T& y - ); - - template <class T, class Policies> - interval<T,Policies> - min ( - const T& x - , const interval<T,Policies>& y - ); -}} -# 15 "/usr/include/boost/numeric/interval/utility.hpp" 2 3 4 - - -# 1 "/usr/include/c++/9.2.0/algorithm" 1 3 4 -# 58 "/usr/include/c++/9.2.0/algorithm" 3 4 - -# 59 "/usr/include/c++/9.2.0/algorithm" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/stl_algo.h" 1 3 -# 59 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 -# 1 "/usr/include/c++/9.2.0/cstdlib" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 - -# 40 "/usr/include/c++/9.2.0/cstdlib" 3 -# 60 "/usr/include/c++/9.2.0/bits/stl_algo.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/algorithmfwd.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/algorithmfwd.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/algorithmfwd.h" 3 -# 42 "/usr/include/c++/9.2.0/bits/algorithmfwd.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 195 "/usr/include/c++/9.2.0/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); -# 224 "/usr/include/c++/9.2.0/bits/algorithmfwd.h" 3 - 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); -# 565 "/usr/include/c++/9.2.0/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); -# 594 "/usr/include/c++/9.2.0/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); - - - -} -# 61 "/usr/include/c++/9.2.0/bits/stl_algo.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_heap.h" 1 3 -# 62 "/usr/include/c++/9.2.0/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); - } -# 152 "/usr/include/c++/9.2.0/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); - } -# 187 "/usr/include/c++/9.2.0/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); - } -# 269 "/usr/include/c++/9.2.0/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); - } - } -# 302 "/usr/include/c++/9.2.0/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--; - } - } -# 358 "/usr/include/c++/9.2.0/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); - } -# 384 "/usr/include/c++/9.2.0/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); - } - } -# 420 "/usr/include/c++/9.2.0/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); - } -# 447 "/usr/include/c++/9.2.0/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); - } -# 475 "/usr/include/c++/9.2.0/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); - } -# 503 "/usr/include/c++/9.2.0/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); - } -# 527 "/usr/include/c++/9.2.0/bits/stl_heap.h" 3 - template<typename _RandomAccessIterator> - inline bool - is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) - { return std::is_heap_until(__first, __last) == __last; } -# 540 "/usr/include/c++/9.2.0/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++/9.2.0/bits/stl_algo.h" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_tempbuf.h" 1 3 -# 60 "/usr/include/c++/9.2.0/bits/stl_tempbuf.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_construct.h" 1 3 -# 63 "/usr/include/c++/9.2.0/bits/stl_construct.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - template<typename _T1, typename... _Args> - inline void - _Construct(_T1* __p, _Args&&... __args) - { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); } -# 87 "/usr/include/c++/9.2.0/bits/stl_construct.h" 3 - template<typename _T1> - inline void - _Construct_novalue(_T1* __p) - { ::new(static_cast<void*>(__p)) _T1; } - - - - - template<typename _Tp> - inline void - _Destroy(_Tp* __pointer) - { __pointer->~_Tp(); } - - template<bool> - struct _Destroy_aux - { - template<typename _ForwardIterator> - static void - __destroy(_ForwardIterator __first, _ForwardIterator __last) - { - for (; __first != __last; ++__first) - std::_Destroy(std::__addressof(*__first)); - } - }; - - template<> - struct _Destroy_aux<true> - { - template<typename _ForwardIterator> - static void - __destroy(_ForwardIterator, _ForwardIterator) { } - }; - - - - - - - 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, typename _Allocator> - void - _Destroy(_ForwardIterator __first, _ForwardIterator __last, - _Allocator& __alloc) - { - typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; - for (; __first != __last; ++__first) - __traits::destroy(__alloc, std::__addressof(*__first)); - } - - template<typename _ForwardIterator, typename _Tp> - inline void - _Destroy(_ForwardIterator __first, _ForwardIterator __last, - allocator<_Tp>&) - { - _Destroy(__first, __last); - } -# 232 "/usr/include/c++/9.2.0/bits/stl_construct.h" 3 - -} -# 61 "/usr/include/c++/9.2.0/bits/stl_tempbuf.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 83 "/usr/include/c++/9.2.0/bits/stl_tempbuf.h" 3 - template<typename _Tp> - 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 /= 2; - } - return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); - } -# 110 "/usr/include/c++/9.2.0/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::return_temporary_buffer(_M_buffer); - } - - private: - - _Temporary_buffer(const _Temporary_buffer&); - - void - operator=(const _Temporary_buffer&); - }; - - - template<bool> - struct __uninitialized_construct_buf_dispatch - { - template<typename _Pointer, typename _ForwardIterator> - static void - __ucr(_Pointer __first, _Pointer __last, - _ForwardIterator __seed) - { - 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) { } - }; -# 229 "/usr/include/c++/9.2.0/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); - } - - 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) - { - try - { - std::pair<pointer, size_type> __p(std::get_temporary_buffer< - value_type>(_M_original_len)); - _M_buffer = __p.first; - _M_len = __p.second; - if (_M_buffer) - std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, - __seed); - } - catch(...) - { - std::return_temporary_buffer(_M_buffer); - _M_buffer = 0; - _M_len = 0; - throw; - } - } - - -} -# 63 "/usr/include/c++/9.2.0/bits/stl_algo.h" 2 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/uniform_int_dist.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/uniform_int_dist.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - namespace __detail - { - - template<typename _Tp> - inline 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 = numeric_limits<_IntType>::max()) - : _M_a(__a), _M_b(__b) - { - ; - } - - 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 = numeric_limits<_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 _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 uniform_int_distribution& __d1, - const uniform_int_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> - template<typename _UniformRandomNumberGenerator> - typename uniform_int_distribution<_IntType>::result_type - uniform_int_distribution<_IntType>:: - operator()(_UniformRandomNumberGenerator& __urng, - const param_type& __param) - { - typedef typename _UniformRandomNumberGenerator::result_type - _Gresult_type; - typedef typename std::make_unsigned<result_type>::type __utype; - typedef typename std::common_type<_Gresult_type, __utype>::type - __uctype; - - const __uctype __urngmin = __urng.min(); - const __uctype __urngmax = __urng.max(); - const __uctype __urngrange = __urngmax - __urngmin; - const __uctype __urange - = __uctype(__param.b()) - __uctype(__param.a()); - - __uctype __ret; - - if (__urngrange > __urange) - { - - const __uctype __uerange = __urange + 1; - const __uctype __scaling = __urngrange / __uerange; - const __uctype __past = __uerange * __scaling; - do - __ret = __uctype(__urng()) - __urngmin; - while (__ret >= __past); - __ret /= __scaling; - } - else if (__urngrange < __urange) - { -# 271 "/usr/include/c++/9.2.0/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 _UniformRandomNumberGenerator> - void - uniform_int_distribution<_IntType>:: - __generate_impl(_ForwardIterator __f, _ForwardIterator __t, - _UniformRandomNumberGenerator& __urng, - const param_type& __param) - { - - typedef typename _UniformRandomNumberGenerator::result_type - _Gresult_type; - typedef typename std::make_unsigned<result_type>::type __utype; - typedef typename std::common_type<_Gresult_type, __utype>::type - __uctype; - - const __uctype __urngmin = __urng.min(); - const __uctype __urngmax = __urng.max(); - const __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) - { -# 355 "/usr/include/c++/9.2.0/bits/uniform_int_dist.h" 3 - __uctype __tmp; - while (__f != __t) - { - 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); - *__f++ = __ret; - } - } - else - while (__f != __t) - *__f++ = __uctype(__urng()) - __urngmin + __param.a(); - } - - - - -} -# 67 "/usr/include/c++/9.2.0/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(_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> - 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; - } -# 202 "/usr/include/c++/9.2.0/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)); - - - _ForwardIterator2 __p; - _ForwardIterator1 __current = __first1; - - for (;;) - { - __first1 = - std::__find_if(__first1, __last1, - __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); - - if (__first1 == __last1) - return __last1; - - __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; - } - } -# 423 "/usr/include/c++/9.2.0/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()); - } -# 471 "/usr/include/c++/9.2.0/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)); - } -# 506 "/usr/include/c++/9.2.0/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); } -# 523 "/usr/include/c++/9.2.0/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); } -# 541 "/usr/include/c++/9.2.0/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); } -# 556 "/usr/include/c++/9.2.0/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)); - } -# 580 "/usr/include/c++/9.2.0/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); - } -# 601 "/usr/include/c++/9.2.0/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); - _DistanceType __half; - _ForwardIterator __middle; - - while (__len > 0) - { - __half = __len >> 1; - __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; - } -# 668 "/usr/include/c++/9.2.0/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)); - } -# 700 "/usr/include/c++/9.2.0/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)); - } -# 734 "/usr/include/c++/9.2.0/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) - { - if (__n > 0) - { - while (true) - { - *__result = *__first; - ++__result; - if (--__n > 0) - ++__first; - else - break; - } - } - return __result; - } - - 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); } -# 797 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _InputIterator, typename _Size, typename _OutputIterator> - inline _OutputIterator - copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) - { - - - - - - return std::__copy_n(__first, __n, __result, - std::__iterator_category(__first)); - } -# 825 "/usr/include/c++/9.2.0/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); - } - - - 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; - } -# 894 "/usr/include/c++/9.2.0/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)); - } -# 927 "/usr/include/c++/9.2.0/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; - } -# 993 "/usr/include/c++/9.2.0/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()); - } -# 1023 "/usr/include/c++/9.2.0/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; - } - } -# 1178 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _BidirectionalIterator> - inline void - reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) - { - - - - ; - std::__reverse(__first, __last, std::__iterator_category(__first)); - } -# 1205 "/usr/include/c++/9.2.0/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); - } - } - } -# 1432 "/usr/include/c++/9.2.0/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)); - } - - } -# 1469 "/usr/include/c++/9.2.0/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; - } - } -# 1546 "/usr/include/c++/9.2.0/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())); - } -# 1648 "/usr/include/c++/9.2.0/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; - } -# 1734 "/usr/include/c++/9.2.0/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) - { -# 1748 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - - - - - - - ; - ; - ; - - return std::__partial_sort_copy(__first, __last, - __result_first, __result_last, - __gnu_cxx::__ops::__iter_less_iter()); - } -# 1783 "/usr/include/c++/9.2.0/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) - { -# 1799 "/usr/include/c++/9.2.0/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); - } -# 2020 "/usr/include/c++/9.2.0/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; - } -# 2074 "/usr/include/c++/9.2.0/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()); - } -# 2104 "/usr/include/c++/9.2.0/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); - } -# 2175 "/usr/include/c++/9.2.0/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()); - } -# 2211 "/usr/include/c++/9.2.0/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)); - } -# 2244 "/usr/include/c++/9.2.0/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); - } -# 2277 "/usr/include/c++/9.2.0/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, _Distance __buffer_size, - _Compare __comp) - { - if (__len1 <= __len2 && __len1 <= __buffer_size) - { - _Pointer __buffer_end = std::move(__first, __middle, __buffer); - std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, - __first, __comp); - } - else if (__len2 <= __buffer_size) - { - _Pointer __buffer_end = std::move(__middle, __last, __buffer); - std::__move_merge_adaptive_backward(__first, __middle, __buffer, - __buffer_end, __last, __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, - __len1 - __len11, __len22, __buffer, - __buffer_size); - std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, - __len22, __buffer, __buffer_size, __comp); - std::__merge_adaptive(__new_middle, __second_cut, __last, - __len1 - __len11, - __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, __len1 + __len2); - - if (__buf.begin() == 0) - std::__merge_without_buffer - (__first, __middle, __last, __len1, __len2, __comp); - else - std::__merge_adaptive - (__first, __middle, __last, __len1, __len2, __buf.begin(), - _DistanceType(__buf.size()), __comp); - } -# 2566 "/usr/include/c++/9.2.0/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()); - } -# 2607 "/usr/include/c++/9.2.0/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 _Distance, typename _Compare> - void - __stable_sort_adaptive(_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(__first, __middle, __buffer, - __buffer_size, __comp); - std::__stable_sort_adaptive(__middle, __last, __buffer, - __buffer_size, __comp); - } - else - { - std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); - std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); - } - std::__merge_adaptive(__first, __middle, __last, - _Distance(__middle - __first), - _Distance(__last - __middle), - __buffer, __buffer_size, - __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); - } -# 2779 "/usr/include/c++/9.2.0/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; - else if (__comp(__first1, __first2)) - ++__first1; - else - { - ++__first1; - ++__first2; - } - - return __first2 == __last2; - } -# 2818 "/usr/include/c++/9.2.0/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()); - } -# 2862 "/usr/include/c++/9.2.0/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)); - } -# 2897 "/usr/include/c++/9.2.0/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; - } - } - } -# 2946 "/usr/include/c++/9.2.0/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()); - } -# 2978 "/usr/include/c++/9.2.0/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; - } - } - } -# 3046 "/usr/include/c++/9.2.0/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()); - } -# 3078 "/usr/include/c++/9.2.0/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; - } -# 3128 "/usr/include/c++/9.2.0/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); - } -# 3162 "/usr/include/c++/9.2.0/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); - } - - 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; - } -# 3201 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _ForwardIterator> - inline bool - is_sorted(_ForwardIterator __first, _ForwardIterator __last) - { return std::is_sorted_until(__first, __last) == __last; } -# 3215 "/usr/include/c++/9.2.0/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; - } -# 3244 "/usr/include/c++/9.2.0/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()); - } -# 3268 "/usr/include/c++/9.2.0/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)); - } -# 3293 "/usr/include/c++/9.2.0/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); - } -# 3314 "/usr/include/c++/9.2.0/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); - } -# 3394 "/usr/include/c++/9.2.0/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()); - } -# 3422 "/usr/include/c++/9.2.0/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 _Tp - min(initializer_list<_Tp> __l) - { return *std::min_element(__l.begin(), __l.end()); } - - template<typename _Tp, typename _Compare> - constexpr - inline _Tp - min(initializer_list<_Tp> __l, _Compare __comp) - { return *std::min_element(__l.begin(), __l.end(), __comp); } - - template<typename _Tp> - constexpr - inline _Tp - max(initializer_list<_Tp> __l) - { return *std::max_element(__l.begin(), __l.end()); } - - template<typename _Tp, typename _Compare> - constexpr - inline _Tp - max(initializer_list<_Tp> __l, _Compare __comp) - { return *std::max_element(__l.begin(), __l.end(), __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()); - 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(), __comp); - return std::make_pair(*__p.first, *__p.second); - } - - 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; - } -# 3534 "/usr/include/c++/9.2.0/bits/stl_algo.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()); - } -# 3565 "/usr/include/c++/9.2.0/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; - } -# 3658 "/usr/include/c++/9.2.0/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()); - } -# 3685 "/usr/include/c++/9.2.0/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)); - } -# 3761 "/usr/include/c++/9.2.0/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); - } -# 3783 "/usr/include/c++/9.2.0/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))); - } - - - - - -# 3868 "/usr/include/c++/9.2.0/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; - } -# 3889 "/usr/include/c++/9.2.0/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)); - } -# 3913 "/usr/include/c++/9.2.0/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)); - } -# 3944 "/usr/include/c++/9.2.0/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++/9.2.0/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; - } -# 4016 "/usr/include/c++/9.2.0/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()); - } -# 4041 "/usr/include/c++/9.2.0/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)); - } -# 4066 "/usr/include/c++/9.2.0/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)); - } -# 4089 "/usr/include/c++/9.2.0/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)); - } -# 4129 "/usr/include/c++/9.2.0/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()); - } -# 4168 "/usr/include/c++/9.2.0/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)); - } -# 4203 "/usr/include/c++/9.2.0/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)); - } -# 4236 "/usr/include/c++/9.2.0/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)); - } -# 4284 "/usr/include/c++/9.2.0/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; - } -# 4321 "/usr/include/c++/9.2.0/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; - } -# 4354 "/usr/include/c++/9.2.0/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; - } -# 4386 "/usr/include/c++/9.2.0/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; - } -# 4418 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _ForwardIterator, typename _Generator> - void - generate(_ForwardIterator __first, _ForwardIterator __last, - _Generator __gen) - { - - - - - ; - - for (; __first != __last; ++__first) - *__first = __gen(); - } -# 4449 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _OutputIterator, typename _Size, typename _Generator> - _OutputIterator - generate_n(_OutputIterator __first, _Size __n, _Generator __gen) - { - - - - - - for (__decltype(__n + 0) __niter = __n; - __niter > 0; --__niter, (void) ++__first) - *__first = __gen(); - return __first; - } -# 4485 "/usr/include/c++/9.2.0/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)); - } -# 4525 "/usr/include/c++/9.2.0/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)); - } -# 4558 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _RandomAccessIterator> - 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); - } - } -# 4593 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - template<typename _RandomAccessIterator, typename _RandomNumberGenerator> - 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); - } - } -# 4633 "/usr/include/c++/9.2.0/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)); - } -# 4666 "/usr/include/c++/9.2.0/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()); - } -# 4704 "/usr/include/c++/9.2.0/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)); - } -# 4740 "/usr/include/c++/9.2.0/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()); - } -# 4779 "/usr/include/c++/9.2.0/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)); - } -# 4816 "/usr/include/c++/9.2.0/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()); - } -# 4846 "/usr/include/c++/9.2.0/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)); - } -# 4907 "/usr/include/c++/9.2.0/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()); - } -# 4957 "/usr/include/c++/9.2.0/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; - - typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; - _TmpBuf __buf(__first, std::distance(__first, __last)); - - if (__buf.begin() == 0) - std::__inplace_stable_sort(__first, __last, __comp); - else - std::__stable_sort_adaptive(__first, __last, __buf.begin(), - _DistanceType(__buf.size()), __comp); - } -# 5021 "/usr/include/c++/9.2.0/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()); - } -# 5055 "/usr/include/c++/9.2.0/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)); - } -# 5124 "/usr/include/c++/9.2.0/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()); - } -# 5174 "/usr/include/c++/9.2.0/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; - } -# 5245 "/usr/include/c++/9.2.0/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()); - } -# 5294 "/usr/include/c++/9.2.0/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); - } -# 5367 "/usr/include/c++/9.2.0/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()); - } -# 5418 "/usr/include/c++/9.2.0/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)); - } -# 5497 "/usr/include/c++/9.2.0/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()); - } -# 5548 "/usr/include/c++/9.2.0/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; - } -# 5601 "/usr/include/c++/9.2.0/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()); - } -# 5626 "/usr/include/c++/9.2.0/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; - } -# 5665 "/usr/include/c++/9.2.0/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()); - } -# 5690 "/usr/include/c++/9.2.0/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 _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>; - - __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; - } -# 5833 "/usr/include/c++/9.2.0/bits/stl_algo.h" 3 - - -} -# 63 "/usr/include/c++/9.2.0/algorithm" 2 3 -# 18 "/usr/include/boost/numeric/interval/utility.hpp" 2 3 4 - - - - - - -namespace boost { -namespace numeric { - - - - - -template<class T, class Policies> inline -const T& lower(const interval<T, Policies>& x) -{ - return x.lower(); -} - -template<class T, class Policies> inline -const T& upper(const interval<T, Policies>& x) -{ - return x.upper(); -} - -template<class T, class Policies> inline -T checked_lower(const interval<T, Policies>& x) -{ - if (empty(x)) { - typedef typename Policies::checking checking; - return checking::nan(); - } - return x.lower(); -} - -template<class T, class Policies> inline -T checked_upper(const interval<T, Policies>& x) -{ - if (empty(x)) { - typedef typename Policies::checking checking; - return checking::nan(); - } - return x.upper(); -} - -template<class T, class Policies> inline -T width(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) return static_cast<T>(0); - typename Policies::rounding rnd; - return rnd.sub_up(x.upper(), x.lower()); -} - -template<class T, class Policies> inline -T median(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) { - typedef typename Policies::checking checking; - return checking::nan(); - } - typename Policies::rounding rnd; - return rnd.median(x.lower(), x.upper()); -} - -template<class T, class Policies> inline -interval<T, Policies> widen(const interval<T, Policies>& x, const T& v) -{ - if (interval_lib::detail::test_input(x)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T, Policies>(rnd.sub_down(x.lower(), v), - rnd.add_up (x.upper(), v), true); -} - - - - - -template<class T, class Policies> inline -bool empty(const interval<T, Policies>& x) -{ - return interval_lib::detail::test_input(x); -} - -template<class T, class Policies> inline -bool zero_in(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) return false; - return (!interval_lib::user::is_pos(x.lower())) && - (!interval_lib::user::is_neg(x.upper())); -} - -template<class T, class Policies> inline -bool in_zero(const interval<T, Policies>& x) -{ - return zero_in<T, Policies>(x); -} - -template<class T, class Policies> inline -bool in(const T& x, const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) return false; - return y.lower() <= x && x <= y.upper(); -} - -template<class T, class Policies> inline -bool subset(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - if (empty(x)) return true; - return !empty(y) && y.lower() <= x.lower() && x.upper() <= y.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool proper_subset(const interval<T, Policies1>& x, - const interval<T, Policies2>& y) -{ - if (empty(y)) return false; - if (empty(x)) return true; - return y.lower() <= x.lower() && x.upper() <= y.upper() && - (y.lower() != x.lower() || x.upper() != y.upper()); -} - -template<class T, class Policies1, class Policies2> inline -bool overlap(const interval<T, Policies1>& x, - const interval<T, Policies2>& y) -{ - if (interval_lib::detail::test_input(x, y)) return false; - return (x.lower() <= y.lower() && y.lower() <= x.upper()) || - (y.lower() <= x.lower() && x.lower() <= y.upper()); -} - -template<class T, class Policies> inline -bool singleton(const interval<T, Policies>& x) -{ - return !empty(x) && x.lower() == x.upper(); -} - -template<class T, class Policies1, class Policies2> inline -bool equal(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - if (empty(x)) return empty(y); - return !empty(y) && x.lower() == y.lower() && x.upper() == y.upper(); -} - -template<class T, class Policies> inline -interval<T, Policies> intersect(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - using std::min; - using std::max; - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - const T& l = max (x.lower(), y.lower()); - const T& u = min (x.upper(), y.upper()); - if (l <= u) return interval<T, Policies>(l, u, true); - else return interval<T, Policies>::empty(); -} - -template<class T, class Policies> inline -interval<T, Policies> hull(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - using std::min; - using std::max; - bool bad_x = interval_lib::detail::test_input(x); - bool bad_y = interval_lib::detail::test_input(y); - if (bad_x) - if (bad_y) return interval<T, Policies>::empty(); - else return y; - else - if (bad_y) return x; - return interval<T, Policies>(min (x.lower(), y.lower()), - max (x.upper(), y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> hull(const interval<T, Policies>& x, const T& y) -{ - using std::min; - using std::max; - bool bad_x = interval_lib::detail::test_input(x); - bool bad_y = interval_lib::detail::test_input<T, Policies>(y); - if (bad_y) - if (bad_x) return interval<T, Policies>::empty(); - else return x; - else - if (bad_x) return interval<T, Policies>(y, y, true); - return interval<T, Policies>(min (x.lower(), y), - max (x.upper(), y), true); -} - -template<class T, class Policies> inline -interval<T, Policies> hull(const T& x, const interval<T, Policies>& y) -{ - using std::min; - using std::max; - bool bad_x = interval_lib::detail::test_input<T, Policies>(x); - bool bad_y = interval_lib::detail::test_input(y); - if (bad_x) - if (bad_y) return interval<T, Policies>::empty(); - else return y; - else - if (bad_y) return interval<T, Policies>(x, x, true); - return interval<T, Policies>(min (x, y.lower()), - max (x, y.upper()), true); -} - -template<class T> inline -interval<T> hull(const T& x, const T& y) -{ - return interval<T>::hull(x, y); -} - -template<class T, class Policies> inline -std::pair<interval<T, Policies>, interval<T, Policies> > -bisect(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return std::pair<I,I>(I::empty(), I::empty()); - const T m = median(x); - return std::pair<I,I>(I(x.lower(), m, true), I(m, x.upper(), true)); -} - - - - - -template<class T, class Policies> inline -T norm(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) { - typedef typename Policies::checking checking; - return checking::nan(); - } - using std::max; - return max (static_cast<T>(-x.lower()), x.upper()); -} - -template<class T, class Policies> inline -interval<T, Policies> abs(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - if (!interval_lib::user::is_neg(x.lower())) return x; - if (!interval_lib::user::is_pos(x.upper())) return -x; - using std::max; - return I(static_cast<T>(0), max (static_cast<T>(-x.lower()), x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> max (const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::max; - return I(max (x.lower(), y.lower()), max (x.upper(), y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> max (const interval<T, Policies>& x, const T& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::max; - return I(max (x.lower(), y), max (x.upper(), y), true); -} - -template<class T, class Policies> inline -interval<T, Policies> max (const T& x, const interval<T, Policies>& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::max; - return I(max (x, y.lower()), max (x, y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> min (const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::min; - return I(min (x.lower(), y.lower()), min (x.upper(), y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> min (const interval<T, Policies>& x, const T& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::min; - return I(min (x.lower(), y), min (x.upper(), y), true); -} - -template<class T, class Policies> inline -interval<T, Policies> min (const T& x, const interval<T, Policies>& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - using std::min; - return I(min (x, y.lower()), min (x, y.upper()), true); -} - -} -} -# 16 "/usr/include/boost/numeric/interval/compare/set.hpp" 2 3 4 - -namespace boost { -namespace numeric { -namespace interval_lib { -namespace compare { -namespace set { - -template<class T, class Policies1, class Policies2> inline -bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return proper_subset(x, y); -} - -template<class T, class Policies> inline -bool operator<(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -template<class T, class Policies1, class Policies2> inline -bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return subset(x, y); -} - -template<class T, class Policies> inline -bool operator<=(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -template<class T, class Policies1, class Policies2> inline -bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return proper_subset(y, x); -} - -template<class T, class Policies> inline -bool operator>(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -template<class T, class Policies1, class Policies2> inline -bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return subset(y, x); -} - -template<class T, class Policies> inline -bool operator>=(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -template<class T, class Policies1, class Policies2> inline -bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return equal(y, x); -} - -template<class T, class Policies> inline -bool operator==(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -template<class T, class Policies1, class Policies2> inline -bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y) -{ - return !equal(y, x); -} - -template<class T, class Policies> inline -bool operator!=(const interval<T, Policies>& , const T& ) -{ - throw comparison_error(); -} - -} -} -} -} -} -# 18 "/usr/include/boost/numeric/interval/compare.hpp" 2 3 4 -# 25 "/usr/include/boost/numeric/interval.hpp" 2 3 4 - - -# 1 "/usr/include/boost/numeric/interval/arith.hpp" 1 3 4 -# 18 "/usr/include/boost/numeric/interval/arith.hpp" 3 4 -# 1 "/usr/include/boost/numeric/interval/detail/division.hpp" 1 3 4 -# 19 "/usr/include/boost/numeric/interval/detail/division.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { -namespace detail { - -template<class T, class Policies> inline -interval<T, Policies> div_non_zero(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - const T& xl = x.lower(); - const T& xu = x.upper(); - const T& yl = y.lower(); - const T& yu = y.upper(); - if (::boost::numeric::interval_lib::user::is_neg(xu)) - if (::boost::numeric::interval_lib::user::is_neg(yu)) - return I(rnd.div_down(xu, yl), rnd.div_up(xl, yu), true); - else - return I(rnd.div_down(xl, yl), rnd.div_up(xu, yu), true); - else if (::boost::numeric::interval_lib::user::is_neg(xl)) - if (::boost::numeric::interval_lib::user::is_neg(yu)) - return I(rnd.div_down(xu, yu), rnd.div_up(xl, yu), true); - else - return I(rnd.div_down(xl, yl), rnd.div_up(xu, yl), true); - else - if (::boost::numeric::interval_lib::user::is_neg(yu)) - return I(rnd.div_down(xu, yu), rnd.div_up(xl, yl), true); - else - return I(rnd.div_down(xl, yu), rnd.div_up(xu, yl), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_non_zero(const T& x, const interval<T, Policies>& y) -{ - - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - const T& yl = y.lower(); - const T& yu = y.upper(); - if (::boost::numeric::interval_lib::user::is_neg(x)) - return I(rnd.div_down(x, yl), rnd.div_up(x, yu), true); - else - return I(rnd.div_down(x, yu), rnd.div_up(x, yl), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_positive(const interval<T, Policies>& x, const T& yu) -{ - - if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && - ::boost::numeric::interval_lib::user::is_zero(x.upper())) - return x; - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - const T& xl = x.lower(); - const T& xu = x.upper(); - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(xu)) - return I(checking::neg_inf(), rnd.div_up(xu, yu), true); - else if (::boost::numeric::interval_lib::user::is_neg(xl)) - return I(checking::neg_inf(), checking::pos_inf(), true); - else - return I(rnd.div_down(xl, yu), checking::pos_inf(), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_positive(const T& x, const T& yu) -{ - - typedef interval<T, Policies> I; - if (::boost::numeric::interval_lib::user::is_zero(x)) - return I(static_cast<T>(0), static_cast<T>(0), true); - typename Policies::rounding rnd; - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(x)) - return I(checking::neg_inf(), rnd.div_up(x, yu), true); - else - return I(rnd.div_down(x, yu), checking::pos_inf(), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_negative(const interval<T, Policies>& x, const T& yl) -{ - - if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && - ::boost::numeric::interval_lib::user::is_zero(x.upper())) - return x; - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - const T& xl = x.lower(); - const T& xu = x.upper(); - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(xu)) - return I(rnd.div_down(xu, yl), checking::pos_inf(), true); - else if (::boost::numeric::interval_lib::user::is_neg(xl)) - return I(checking::neg_inf(), checking::pos_inf(), true); - else - return I(checking::neg_inf(), rnd.div_up(xl, yl), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_negative(const T& x, const T& yl) -{ - - typedef interval<T, Policies> I; - if (::boost::numeric::interval_lib::user::is_zero(x)) - return I(static_cast<T>(0), static_cast<T>(0), true); - typename Policies::rounding rnd; - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(x)) - return I(rnd.div_down(x, yl), checking::pos_inf(), true); - else - return I(checking::neg_inf(), rnd.div_up(x, yl), true); -} - -template<class T, class Policies> inline -interval<T, Policies> div_zero(const interval<T, Policies>& x) -{ - if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && - ::boost::numeric::interval_lib::user::is_zero(x.upper())) - return x; - else return interval<T, Policies>::whole(); -} - -template<class T, class Policies> inline -interval<T, Policies> div_zero(const T& x) -{ - if (::boost::numeric::interval_lib::user::is_zero(x)) - return interval<T, Policies>(static_cast<T>(0), static_cast<T>(0), true); - else return interval<T, Policies>::whole(); -} - -template<class T, class Policies> inline -interval<T, Policies> div_zero_part1(const interval<T, Policies>& x, - const interval<T, Policies>& y, bool& b) -{ - - if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && ::boost::numeric::interval_lib::user::is_zero(x.upper())) - { b = false; return x; } - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - const T& xl = x.lower(); - const T& xu = x.upper(); - const T& yl = y.lower(); - const T& yu = y.upper(); - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(xu)) - { b = true; return I(checking::neg_inf(), rnd.div_up(xu, yu), true); } - else if (::boost::numeric::interval_lib::user::is_neg(xl)) - { b = false; return I(checking::neg_inf(), checking::pos_inf(), true); } - else - { b = true; return I(checking::neg_inf(), rnd.div_up(xl, yl), true); } -} - -template<class T, class Policies> inline -interval<T, Policies> div_zero_part2(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - typedef typename Policies::checking checking; - if (::boost::numeric::interval_lib::user::is_neg(x.upper())) - return I(rnd.div_down(x.upper(), y.lower()), checking::pos_inf(), true); - else - return I(rnd.div_down(x.lower(), y.upper()), checking::pos_inf(), true); -} - -} -} -} -} -# 19 "/usr/include/boost/numeric/interval/arith.hpp" 2 3 4 - - -namespace boost { -namespace numeric { - - - - - -template<class T, class Policies> inline -const interval<T, Policies>& operator+(const interval<T, Policies>& x) -{ - return x; -} - -template<class T, class Policies> inline -interval<T, Policies> operator-(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) - return interval<T, Policies>::empty(); - return interval<T, Policies>(-x.upper(), -x.lower(), true); -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator+=(const interval<T, Policies>& r) -{ - if (interval_lib::detail::test_input(*this, r)) - set_empty(); - else { - typename Policies::rounding rnd; - set(rnd.add_down(low, r.low), rnd.add_up(up, r.up)); - } - return *this; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator+=(const T& r) -{ - if (interval_lib::detail::test_input(*this, r)) - set_empty(); - else { - typename Policies::rounding rnd; - set(rnd.add_down(low, r), rnd.add_up(up, r)); - } - return *this; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator-=(const interval<T, Policies>& r) -{ - if (interval_lib::detail::test_input(*this, r)) - set_empty(); - else { - typename Policies::rounding rnd; - set(rnd.sub_down(low, r.up), rnd.sub_up(up, r.low)); - } - return *this; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator-=(const T& r) -{ - if (interval_lib::detail::test_input(*this, r)) - set_empty(); - else { - typename Policies::rounding rnd; - set(rnd.sub_down(low, r), rnd.sub_up(up, r)); - } - return *this; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator*=(const interval<T, Policies>& r) -{ - return *this = *this * r; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator*=(const T& r) -{ - return *this = r * *this; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator/=(const interval<T, Policies>& r) -{ - return *this = *this / r; -} - -template<class T, class Policies> inline -interval<T, Policies>& interval<T, Policies>::operator/=(const T& r) -{ - return *this = *this / r; -} - -template<class T, class Policies> inline -interval<T, Policies> operator+(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T,Policies>(rnd.add_down(x.lower(), y.lower()), - rnd.add_up (x.upper(), y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator+(const T& x, const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T,Policies>(rnd.add_down(x, y.lower()), - rnd.add_up (x, y.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator+(const interval<T, Policies>& x, const T& y) -{ return y + x; } - -template<class T, class Policies> inline -interval<T, Policies> operator-(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T,Policies>(rnd.sub_down(x.lower(), y.upper()), - rnd.sub_up (x.upper(), y.lower()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator-(const T& x, const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T,Policies>(rnd.sub_down(x, y.upper()), - rnd.sub_up (x, y.lower()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator-(const interval<T, Policies>& x, const T& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - return interval<T,Policies>(rnd.sub_down(x.lower(), y), - rnd.sub_up (x.upper(), y), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator*(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - using std::min; - using std::max; - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - typename Policies::rounding rnd; - const T& xl = x.lower(); - const T& xu = x.upper(); - const T& yl = y.lower(); - const T& yu = y.upper(); - - if (interval_lib::user::is_neg(xl)) - if (interval_lib::user::is_pos(xu)) - if (interval_lib::user::is_neg(yl)) - if (interval_lib::user::is_pos(yu)) - return I(min (rnd.mul_down(xl, yu), rnd.mul_down(xu, yl)), - max (rnd.mul_up (xl, yl), rnd.mul_up (xu, yu)), true); - else - return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yl), true); - else - if (interval_lib::user::is_pos(yu)) - return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yu), true); - else - return I(static_cast<T>(0), static_cast<T>(0), true); - else - if (interval_lib::user::is_neg(yl)) - if (interval_lib::user::is_pos(yu)) - return I(rnd.mul_down(xl, yu), rnd.mul_up(xl, yl), true); - else - return I(rnd.mul_down(xu, yu), rnd.mul_up(xl, yl), true); - else - if (interval_lib::user::is_pos(yu)) - return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yl), true); - else - return I(static_cast<T>(0), static_cast<T>(0), true); - else - if (interval_lib::user::is_pos(xu)) - if (interval_lib::user::is_neg(yl)) - if (interval_lib::user::is_pos(yu)) - return I(rnd.mul_down(xu, yl), rnd.mul_up(xu, yu), true); - else - return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yu), true); - else - if (interval_lib::user::is_pos(yu)) - return I(rnd.mul_down(xl, yl), rnd.mul_up(xu, yu), true); - else - return I(static_cast<T>(0), static_cast<T>(0), true); - else - return I(static_cast<T>(0), static_cast<T>(0), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator*(const T& x, const interval<T, Policies>& y) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x, y)) - return I::empty(); - typename Policies::rounding rnd; - const T& yl = y.lower(); - const T& yu = y.upper(); - - if (interval_lib::user::is_neg(x)) - return I(rnd.mul_down(x, yu), rnd.mul_up(x, yl), true); - else if (interval_lib::user::is_zero(x)) - return I(static_cast<T>(0), static_cast<T>(0), true); - else - return I(rnd.mul_down(x, yl), rnd.mul_up(x, yu), true); -} - -template<class T, class Policies> inline -interval<T, Policies> operator*(const interval<T, Policies>& x, const T& y) -{ return y * x; } - -template<class T, class Policies> inline -interval<T, Policies> operator/(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - if (zero_in(y)) - if (!interval_lib::user::is_zero(y.lower())) - if (!interval_lib::user::is_zero(y.upper())) - return interval_lib::detail::div_zero(x); - else - return interval_lib::detail::div_negative(x, y.lower()); - else - if (!interval_lib::user::is_zero(y.upper())) - return interval_lib::detail::div_positive(x, y.upper()); - else - return interval<T, Policies>::empty(); - else - return interval_lib::detail::div_non_zero(x, y); -} - -template<class T, class Policies> inline -interval<T, Policies> operator/(const T& x, const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - if (zero_in(y)) - if (!interval_lib::user::is_zero(y.lower())) - if (!interval_lib::user::is_zero(y.upper())) - return interval_lib::detail::div_zero<T, Policies>(x); - else - return interval_lib::detail::div_negative<T, Policies>(x, y.lower()); - else - if (!interval_lib::user::is_zero(y.upper())) - return interval_lib::detail::div_positive<T, Policies>(x, y.upper()); - else - return interval<T, Policies>::empty(); - else - return interval_lib::detail::div_non_zero(x, y); -} - -template<class T, class Policies> inline -interval<T, Policies> operator/(const interval<T, Policies>& x, const T& y) -{ - if (interval_lib::detail::test_input(x, y) || interval_lib::user::is_zero(y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - const T& xl = x.lower(); - const T& xu = x.upper(); - if (interval_lib::user::is_neg(y)) - return interval<T, Policies>(rnd.div_down(xu, y), rnd.div_up(xl, y), true); - else - return interval<T, Policies>(rnd.div_down(xl, y), rnd.div_up(xu, y), true); -} - -} -} -# 28 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/arith2.hpp" 1 3 4 -# 25 "/usr/include/boost/numeric/interval/arith2.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cassert" 1 3 4 -# 41 "/usr/include/c++/9.2.0/cassert" 3 4 - -# 42 "/usr/include/c++/9.2.0/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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 44 "/usr/include/c++/9.2.0/cassert" 2 3 -# 26 "/usr/include/boost/numeric/interval/arith2.hpp" 2 3 4 - - -namespace boost { -namespace numeric { - -template<class T, class Policies> inline -interval<T, Policies> fmod(const interval<T, Policies>& x, - const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<interval<T, Policies> >::type I; - T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper(); - T n = rnd.int_down(rnd.div_down(x.lower(), yb)); - return (const I&)x - n * (const I&)y; -} - -template<class T, class Policies> inline -interval<T, Policies> fmod(const interval<T, Policies>& x, const T& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<interval<T, Policies> >::type I; - T n = rnd.int_down(rnd.div_down(x.lower(), y)); - return (const I&)x - n * I(y); -} - -template<class T, class Policies> inline -interval<T, Policies> fmod(const T& x, const interval<T, Policies>& y) -{ - if (interval_lib::detail::test_input(x, y)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<interval<T, Policies> >::type I; - T const &yb = interval_lib::user::is_neg(x) ? y.lower() : y.upper(); - T n = rnd.int_down(rnd.div_down(x, yb)); - return x - n * (const I&)y; -} - -namespace interval_lib { - -template<class T, class Policies> inline -interval<T, Policies> division_part1(const interval<T, Policies>& x, - const interval<T, Policies>& y, bool& b) -{ - typedef interval<T, Policies> I; - b = false; - if (detail::test_input(x, y)) - return I::empty(); - if (zero_in(y)) - if (!user::is_zero(y.lower())) - if (!user::is_zero(y.upper())) - return detail::div_zero_part1(x, y, b); - else - return detail::div_negative(x, y.lower()); - else - if (!user::is_zero(y.upper())) - return detail::div_positive(x, y.upper()); - else - return I::empty(); - else - return detail::div_non_zero(x, y); -} - -template<class T, class Policies> inline -interval<T, Policies> division_part2(const interval<T, Policies>& x, - const interval<T, Policies>& y, bool b = true) -{ - if (!b) return interval<T, Policies>::empty(); - return detail::div_zero_part2(x, y); -} - -template<class T, class Policies> inline -interval<T, Policies> multiplicative_inverse(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (detail::test_input(x)) - return I::empty(); - T one = static_cast<T>(1); - typename Policies::rounding rnd; - if (zero_in(x)) { - typedef typename Policies::checking checking; - if (!user::is_zero(x.lower())) - if (!user::is_zero(x.upper())) - return I::whole(); - else - return I(checking::neg_inf(), rnd.div_up(one, x.lower()), true); - else - if (!user::is_zero(x.upper())) - return I(rnd.div_down(one, x.upper()), checking::pos_inf(), true); - else - return I::empty(); - } else - return I(rnd.div_down(one, x.upper()), rnd.div_up(one, x.lower()), true); -} - -namespace detail { - -template<class T, class Rounding> inline -T pow_dn(const T& x_, int pwr, Rounding& rnd) -{ - T x = x_; - T y = (pwr & 1) ? x_ : static_cast<T>(1); - pwr >>= 1; - while (pwr > 0) { - x = rnd.mul_down(x, x); - if (pwr & 1) y = rnd.mul_down(x, y); - pwr >>= 1; - } - return y; -} - -template<class T, class Rounding> inline -T pow_up(const T& x_, int pwr, Rounding& rnd) -{ - T x = x_; - T y = (pwr & 1) ? x_ : static_cast<T>(1); - pwr >>= 1; - while (pwr > 0) { - x = rnd.mul_up(x, x); - if (pwr & 1) y = rnd.mul_up(x, y); - pwr >>= 1; - } - return y; -} - -} -} - -template<class T, class Policies> inline -interval<T, Policies> pow(const interval<T, Policies>& x, int pwr) -{ - using std::max; - using interval_lib::detail::pow_dn; - using interval_lib::detail::pow_up; - typedef interval<T, Policies> I; - - if (interval_lib::detail::test_input(x)) - return I::empty(); - - if (pwr == 0) - if (interval_lib::user::is_zero(x.lower()) - && interval_lib::user::is_zero(x.upper())) - return I::empty(); - else - return I(static_cast<T>(1)); - else if (pwr < 0) - return interval_lib::multiplicative_inverse(pow(x, -pwr)); - - typename Policies::rounding rnd; - - if (interval_lib::user::is_neg(x.upper())) { - T yl = pow_dn(static_cast<T>(-x.upper()), pwr, rnd); - T yu = pow_up(static_cast<T>(-x.lower()), pwr, rnd); - if (pwr & 1) - return I(-yu, -yl, true); - else - return I(yl, yu, true); - } else if (interval_lib::user::is_neg(x.lower())) { - if (pwr & 1) { - return I(-pow_up(static_cast<T>(-x.lower()), pwr, rnd), pow_up(x.upper(), pwr, rnd), true); - } else { - return I(static_cast<T>(0), pow_up(max (static_cast<T>(-x.lower()), x.upper()), pwr, rnd), true); - } - } else { - return I(pow_dn(x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true); - } -} - -template<class T, class Policies> inline -interval<T, Policies> sqrt(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) || interval_lib::user::is_neg(x.upper())) - return I::empty(); - typename Policies::rounding rnd; - T l = !interval_lib::user::is_pos(x.lower()) ? static_cast<T>(0) : rnd.sqrt_down(x.lower()); - return I(l, rnd.sqrt_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> square(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - const T& xl = x.lower(); - const T& xu = x.upper(); - if (interval_lib::user::is_neg(xu)) - return I(rnd.mul_down(xu, xu), rnd.mul_up(xl, xl), true); - else if (interval_lib::user::is_pos(x.lower())) - return I(rnd.mul_down(xl, xl), rnd.mul_up(xu, xu), true); - else - return I(static_cast<T>(0), (-xl > xu ? rnd.mul_up(xl, xl) : rnd.mul_up(xu, xu)), true); -} - -namespace interval_lib { -namespace detail { - -template< class I > inline -I root_aux(typename I::base_type const &x, int k) -{ - typedef typename I::base_type T; - T tk(k); - I y(static_cast<T>(1), x, true); - for(;;) { - T y0 = median(y); - I yy = intersect(y, y0 - (pow(I(y0, y0, true), k) - x) / (tk * pow(y, k - 1))); - if (equal(y, yy)) return y; - y = yy; - } -} - -template< class I > inline -typename I::base_type root_aux_dn(typename I::base_type const &x, int k) -{ - typedef typename I::base_type T; - typedef typename I::traits_type Policies; - typename Policies::rounding rnd; - T one(1); - if (x > one) return root_aux<I>(x, k).lower(); - if (x == one) return one; - return rnd.div_down(one, root_aux<I>(rnd.div_up(one, x), k).upper()); -} - -template< class I > inline -typename I::base_type root_aux_up(typename I::base_type const &x, int k) -{ - typedef typename I::base_type T; - typedef typename I::traits_type Policies; - typename Policies::rounding rnd; - T one(1); - if (x > one) return root_aux<I>(x, k).upper(); - if (x == one) return one; - return rnd.div_up(one, root_aux<I>(rnd.div_down(one, x), k).lower()); -} - -} -} - -template< class T, class Policies > inline -interval<T, Policies> nth_root(interval<T, Policies> const &x, int k) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) return I::empty(); - (static_cast <bool> (k > 0) ? void (0) : __assert_fail ("k > 0", "/usr/include/boost/numeric/interval/arith2.hpp", 274, __extension__ __PRETTY_FUNCTION__)); - if (k == 1) return x; - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<I>::type R; - if (!interval_lib::user::is_pos(x.upper())) { - if (interval_lib::user::is_zero(x.upper())) { - T zero(0); - if (!(k & 1) || interval_lib::user::is_zero(x.lower())) - return I(zero, zero, true); - else - return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), zero, true); - } else if (!(k & 1)) - return I::empty(); - else { - return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), - -interval_lib::detail::root_aux_dn<R>(-x.upper(), k), true); - } - } - T u = interval_lib::detail::root_aux_up<R>(x.upper(), k); - if (!interval_lib::user::is_pos(x.lower())) - if (!(k & 1) || interval_lib::user::is_zero(x.lower())) - return I(static_cast<T>(0), u, true); - else - return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), u, true); - else - return I(interval_lib::detail::root_aux_dn<R>(x.lower(), k), u, true); -} - -} -} -# 29 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/arith3.hpp" 1 3 4 -# 21 "/usr/include/boost/numeric/interval/arith3.hpp" 3 4 -namespace boost { -namespace numeric { -namespace interval_lib { - -template<class I> inline -I add(const typename I::base_type& x, const typename I::base_type& y) -{ - typedef typename I::traits_type Policies; - if (detail::test_input<typename I::base_type, Policies>(x, y)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.add_down(x, y), rnd.add_up(x, y), true); -} - -template<class I> inline -I sub(const typename I::base_type& x, const typename I::base_type& y) -{ - typedef typename I::traits_type Policies; - if (detail::test_input<typename I::base_type, Policies>(x, y)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true); -} - -template<class I> inline -I mul(const typename I::base_type& x, const typename I::base_type& y) -{ - typedef typename I::traits_type Policies; - if (detail::test_input<typename I::base_type, Policies>(x, y)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true); -} - -template<class I> inline -I div(const typename I::base_type& x, const typename I::base_type& y) -{ - typedef typename I::traits_type Policies; - if (detail::test_input<typename I::base_type, Policies>(x, y) || user::is_zero(y)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.div_down(x, y), rnd.div_up(x, y), true); -} - -} -} -} -# 30 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/interval/transc.hpp" 1 3 4 -# 24 "/usr/include/boost/numeric/interval/transc.hpp" 3 4 -namespace boost { -namespace numeric { - -template<class T, class Policies> inline -interval<T, Policies> exp(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.exp_down(x.lower()), rnd.exp_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> log(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) || - !interval_lib::user::is_pos(x.upper())) - return I::empty(); - typename Policies::rounding rnd; - typedef typename Policies::checking checking; - T l = !interval_lib::user::is_pos(x.lower()) - ? checking::neg_inf() : rnd.log_down(x.lower()); - return I(l, rnd.log_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> cos(const interval<T, Policies>& x) -{ - if (interval_lib::detail::test_input(x)) - return interval<T, Policies>::empty(); - typename Policies::rounding rnd; - typedef interval<T, Policies> I; - typedef typename interval_lib::unprotect<I>::type R; - - - const R pi2 = interval_lib::pi_twice<R>(); - R tmp = fmod((const R&)x, pi2); - if (width(tmp) >= pi2.lower()) - return I(static_cast<T>(-1), static_cast<T>(1), true); - if (tmp.lower() >= interval_lib::constants::pi_upper<T>()) - return -cos(tmp - interval_lib::pi<R>()); - T l = tmp.lower(); - T u = tmp.upper(); - - using std::min; - - if (u <= interval_lib::constants::pi_lower<T>()) - return I(rnd.cos_down(u), rnd.cos_up(l), true); - else if (u <= pi2.lower()) - return I(static_cast<T>(-1), rnd.cos_up(min (rnd.sub_down(pi2.lower(), u), l)), true); - else - return I(static_cast<T>(-1), static_cast<T>(1), true); -} - -template<class T, class Policies> inline -interval<T, Policies> sin(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<I>::type R; - I r = cos((const R&)x - interval_lib::pi_half<R>()); - (void)&rnd; - return r; -} - -template<class T, class Policies> inline -interval<T, Policies> tan(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - typedef typename interval_lib::unprotect<I>::type R; - - - const R pi = interval_lib::pi<R>(); - R tmp = fmod((const R&)x, pi); - const T pi_half_d = interval_lib::constants::pi_half_lower<T>(); - if (tmp.lower() >= pi_half_d) - tmp -= pi; - if (tmp.lower() <= -pi_half_d || tmp.upper() >= pi_half_d) - return I::whole(); - return I(rnd.tan_down(tmp.lower()), rnd.tan_up(tmp.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> asin(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) - || x.upper() < static_cast<T>(-1) || x.lower() > static_cast<T>(1)) - return I::empty(); - typename Policies::rounding rnd; - T l = (x.lower() <= static_cast<T>(-1)) - ? -interval_lib::constants::pi_half_upper<T>() - : rnd.asin_down(x.lower()); - T u = (x.upper() >= static_cast<T>(1) ) - ? interval_lib::constants::pi_half_upper<T>() - : rnd.asin_up (x.upper()); - return I(l, u, true); -} - -template<class T, class Policies> inline -interval<T, Policies> acos(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) - || x.upper() < static_cast<T>(-1) || x.lower() > static_cast<T>(1)) - return I::empty(); - typename Policies::rounding rnd; - T l = (x.upper() >= static_cast<T>(1) ) - ? static_cast<T>(0) - : rnd.acos_down(x.upper()); - T u = (x.lower() <= static_cast<T>(-1)) - ? interval_lib::constants::pi_upper<T>() - : rnd.acos_up (x.lower()); - return I(l, u, true); -} - -template<class T, class Policies> inline -interval<T, Policies> atan(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.atan_down(x.lower()), rnd.atan_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> sinh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.sinh_down(x.lower()), rnd.sinh_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> cosh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - if (interval_lib::user::is_neg(x.upper())) - return I(rnd.cosh_down(x.upper()), rnd.cosh_up(x.lower()), true); - else if (!interval_lib::user::is_neg(x.lower())) - return I(rnd.cosh_down(x.lower()), rnd.cosh_up(x.upper()), true); - else - return I(static_cast<T>(1), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> tanh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.tanh_down(x.lower()), rnd.tanh_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> asinh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x)) - return I::empty(); - typename Policies::rounding rnd; - return I(rnd.asinh_down(x.lower()), rnd.asinh_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> acosh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) || x.upper() < static_cast<T>(1)) - return I::empty(); - typename Policies::rounding rnd; - T l = x.lower() <= static_cast<T>(1) ? static_cast<T>(0) : rnd.acosh_down(x.lower()); - return I(l, rnd.acosh_up(x.upper()), true); -} - -template<class T, class Policies> inline -interval<T, Policies> atanh(const interval<T, Policies>& x) -{ - typedef interval<T, Policies> I; - if (interval_lib::detail::test_input(x) - || x.upper() < static_cast<T>(-1) || x.lower() > static_cast<T>(1)) - return I::empty(); - typename Policies::rounding rnd; - typedef typename Policies::checking checking; - T l = (x.lower() <= static_cast<T>(-1)) - ? checking::neg_inf() : rnd.atanh_down(x.lower()); - T u = (x.upper() >= static_cast<T>(1) ) - ? checking::pos_inf() : rnd.atanh_up (x.upper()); - return I(l, u, true); -} - -} -} -# 31 "/usr/include/boost/numeric/interval.hpp" 2 3 4 -# 4 "/home/nivoliev/Sandbox/Cpp/convex.cpp" 2 -# 1 "/usr/include/boost/multiprecision/cpp_int.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/cpp_int.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/iomanip" 1 3 4 -# 36 "/usr/include/c++/9.2.0/iomanip" 3 4 - -# 37 "/usr/include/c++/9.2.0/iomanip" 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/locale" 1 3 -# 36 "/usr/include/c++/9.2.0/locale" 3 - -# 37 "/usr/include/c++/9.2.0/locale" 3 - - - - -# 1 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - -# 38 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - -# 1 "/usr/include/c++/9.2.0/ctime" 1 3 -# 39 "/usr/include/c++/9.2.0/ctime" 3 - -# 40 "/usr/include/c++/9.2.0/ctime" 3 -# 58 "/usr/include/c++/9.2.0/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; -} -# 40 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 52 "/usr/include/c++/9.2.0/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++/9.2.0/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(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++/9.2.0/x86_64-pc-linux-gnu/bits/time_members.h" 1 3 -# 37 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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); - } - - -} -# 347 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - -namespace __cxx11 { -# 367 "/usr/include/c++/9.2.0/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; -# 388 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - time_get(size_t __refs = 0) - : facet (__refs) { } -# 405 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - dateorder - date_order() const - { return this->do_date_order(); } -# 429 "/usr/include/c++/9.2.0/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); } -# 454 "/usr/include/c++/9.2.0/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); } -# 482 "/usr/include/c++/9.2.0/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); } -# 511 "/usr/include/c++/9.2.0/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); } -# 537 "/usr/include/c++/9.2.0/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); } -# 558 "/usr/include/c++/9.2.0/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); - } -# 585 "/usr/include/c++/9.2.0/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() { } -# 605 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual dateorder - do_date_order() const; -# 623 "/usr/include/c++/9.2.0/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; -# 642 "/usr/include/c++/9.2.0/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; -# 661 "/usr/include/c++/9.2.0/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; -# 680 "/usr/include/c++/9.2.0/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; -# 699 "/usr/include/c++/9.2.0/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; -# 722 "/usr/include/c++/9.2.0/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; - }; - - 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() { } - }; - -} -# 796 "/usr/include/c++/9.2.0/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; -# 817 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - time_put(size_t __refs = 0) - : facet(__refs) { } -# 836 "/usr/include/c++/9.2.0/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; -# 856 "/usr/include/c++/9.2.0/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() - { } -# 883 "/usr/include/c++/9.2.0/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() { } - }; -# 928 "/usr/include/c++/9.2.0/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 { -# 1023 "/usr/include/c++/9.2.0/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; -# 1052 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - moneypunct(size_t __refs = 0) - : facet(__refs), _M_data(0) - { _M_initialize_moneypunct(); } -# 1065 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - moneypunct(__cache_type* __cache, size_t __refs = 0) - : facet(__refs), _M_data(__cache) - { _M_initialize_moneypunct(); } -# 1080 "/usr/include/c++/9.2.0/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); } -# 1094 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - char_type - decimal_point() const - { return this->do_decimal_point(); } -# 1107 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - char_type - thousands_sep() const - { return this->do_thousands_sep(); } -# 1137 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - string - grouping() const - { return this->do_grouping(); } -# 1150 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - string_type - curr_symbol() const - { return this->do_curr_symbol(); } -# 1167 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - string_type - positive_sign() const - { return this->do_positive_sign(); } -# 1184 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - string_type - negative_sign() const - { return this->do_negative_sign(); } -# 1200 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - int - frac_digits() const - { return this->do_frac_digits(); } -# 1236 "/usr/include/c++/9.2.0/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(); -# 1258 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual char_type - do_decimal_point() const - { return _M_data->_M_decimal_point; } -# 1270 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual char_type - do_thousands_sep() const - { return _M_data->_M_thousands_sep; } -# 1283 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual string - do_grouping() const - { return _M_data->_M_grouping; } -# 1296 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual string_type - do_curr_symbol() const - { return _M_data->_M_curr_symbol; } -# 1309 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual string_type - do_positive_sign() const - { return _M_data->_M_positive_sign; } -# 1322 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual string_type - do_negative_sign() const - { return _M_data->_M_negative_sign; } -# 1336 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual int - do_frac_digits() const - { return _M_data->_M_frac_digits; } -# 1350 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual pattern - do_pos_format() const - { return _M_data->_M_pos_format; } -# 1364 "/usr/include/c++/9.2.0/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 { -# 1467 "/usr/include/c++/9.2.0/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; -# 1489 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - money_get(size_t __refs = 0) : facet(__refs) { } -# 1519 "/usr/include/c++/9.2.0/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); } -# 1550 "/usr/include/c++/9.2.0/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() { } -# 1574 "/usr/include/c++/9.2.0/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; -# 1586 "/usr/include/c++/9.2.0/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; -# 1598 "/usr/include/c++/9.2.0/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; -# 1620 "/usr/include/c++/9.2.0/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; -# 1641 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - money_put(size_t __refs = 0) : facet(__refs) { } -# 1661 "/usr/include/c++/9.2.0/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); } -# 1684 "/usr/include/c++/9.2.0/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() { } -# 1719 "/usr/include/c++/9.2.0/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; -# 1743 "/usr/include/c++/9.2.0/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; -# 1755 "/usr/include/c++/9.2.0/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 { -# 1798 "/usr/include/c++/9.2.0/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; -# 1826 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - messages(size_t __refs = 0); -# 1840 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - explicit - messages(__c_locale __cloc, const char* __s, size_t __refs = 0); -# 1853 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - catalog - open(const basic_string<char>& __s, const locale& __loc) const - { return this->do_open(__s, __loc); } -# 1871 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - catalog - open(const basic_string<char>&, const locale&, const char*) const; -# 1889 "/usr/include/c++/9.2.0/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); } -# 1900 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - void - close(catalog __c) const - { return this->do_close(__c); } - - protected: - - virtual - ~messages(); -# 1920 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 3 - virtual catalog - do_open(const basic_string<char>&, const locale&) const; -# 1939 "/usr/include/c++/9.2.0/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++/9.2.0/x86_64-pc-linux-gnu/bits/messages_members.h" 1 3 -# 36 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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) - throw () __attribute__ ((__format_arg__ (1))); - - - -extern char *dgettext (const char *__domainname, const char *__msgid) - throw () __attribute__ ((__format_arg__ (2))); -extern char *__dgettext (const char *__domainname, const char *__msgid) - throw () __attribute__ ((__format_arg__ (2))); - - - -extern char *dcgettext (const char *__domainname, - const char *__msgid, int __category) - throw () __attribute__ ((__format_arg__ (2))); -extern char *__dcgettext (const char *__domainname, - const char *__msgid, int __category) - throw () __attribute__ ((__format_arg__ (2))); - - - - -extern char *ngettext (const char *__msgid1, const char *__msgid2, - unsigned long int __n) - throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); - - - -extern char *dngettext (const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - throw () __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) - throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); - - - - - -extern char *textdomain (const char *__domainname) throw (); - - - -extern char *bindtextdomain (const char *__domainname, - const char *__dirname) throw (); - - - -extern char *bind_textdomain_codeset (const char *__domainname, - const char *__codeset) throw (); -# 121 "/usr/include/libintl.h" 3 4 -} -# 37 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/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; - - - -} -# 2011 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 2 3 - - - - -# 1 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.tcc" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.tcc" 3 - -# 34 "/usr/include/c++/9.2.0/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); - - _M_decimal_point = __mp.decimal_point(); - _M_thousands_sep = __mp.thousands_sep(); - _M_frac_digits = __mp.frac_digits(); - - char* __grouping = 0; - _CharT* __curr_symbol = 0; - _CharT* __positive_sign = 0; - _CharT* __negative_sign = 0; - try - { - const string& __g = __mp.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>& __cs = __mp.curr_symbol(); - _M_curr_symbol_size = __cs.size(); - __curr_symbol = new _CharT[_M_curr_symbol_size]; - __cs.copy(__curr_symbol, _M_curr_symbol_size); - - const basic_string<_CharT>& __ps = __mp.positive_sign(); - _M_positive_sign_size = __ps.size(); - __positive_sign = new _CharT[_M_positive_sign_size]; - __ps.copy(__positive_sign, _M_positive_sign_size); - - const basic_string<_CharT>& __ns = __mp.negative_sign(); - _M_negative_sign_size = __ns.size(); - __negative_sign = new _CharT[_M_negative_sign_size]; - __ns.copy(__negative_sign, _M_negative_sign_size); - - _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_grouping = __grouping; - _M_curr_symbol = __curr_symbol; - _M_positive_sign = __positive_sign; - _M_negative_sign = __negative_sign; - _M_allocated = true; - } - catch(...) - { - delete [] __grouping; - delete [] __curr_symbol; - delete [] __positive_sign; - delete [] __negative_sign; - throw; - } - } - -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++/9.2.0/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; - } - - 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; - } -# 574 "/usr/include/c++/9.2.0/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); - } -# 606 "/usr/include/c++/9.2.0/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); } - -} - - - - - 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) 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': - - const char_type* __days1[7]; - __tp._M_days_abbreviated(__days1); - __beg = _M_extract_name(__beg, __end, __mem, __days1, - 7, __io, __tmperr); - if (!__tmperr) - __tm->tm_wday = __mem; - break; - case 'A': - - const char_type* __days2[7]; - __tp._M_days(__days2); - __beg = _M_extract_name(__beg, __end, __mem, __days2, - 7, __io, __tmperr); - if (!__tmperr) - __tm->tm_wday = __mem; - break; - case 'h': - case 'b': - - const char_type* __months1[12]; - __tp._M_months_abbreviated(__months1); - __beg = _M_extract_name(__beg, __end, __mem, - __months1, 12, __io, __tmperr); - if (!__tmperr) - __tm->tm_mon = __mem; - break; - case 'B': - - const char_type* __months2[12]; - __tp._M_months(__months2); - __beg = _M_extract_name(__beg, __end, __mem, - __months2, 12, __io, __tmperr); - if (!__tmperr) - __tm->tm_mon = __mem; - 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]); - break; - case 'd': - - __beg = _M_extract_num(__beg, __end, __mem, 1, 31, 2, - __io, __tmperr); - if (!__tmperr) - __tm->tm_mday = __mem; - break; - case 'e': - - - if (__ctype.is(ctype_base::space, *__beg)) - __beg = _M_extract_num(++__beg, __end, __mem, 1, 9, - 1, __io, __tmperr); - else - __beg = _M_extract_num(__beg, __end, __mem, 10, 31, - 2, __io, __tmperr); - if (!__tmperr) - __tm->tm_mday = __mem; - break; - case 'D': - - __cs = "%m/%d/%y"; - __ctype.widen(__cs, __cs + 9, __wcs); - __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, - __tm, __wcs); - break; - case 'H': - - __beg = _M_extract_num(__beg, __end, __mem, 0, 23, 2, - __io, __tmperr); - if (!__tmperr) - __tm->tm_hour = __mem; - break; - case 'I': - - __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, - __io, __tmperr); - if (!__tmperr) - __tm->tm_hour = __mem; - break; - case 'm': - - __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, - __io, __tmperr); - if (!__tmperr) - __tm->tm_mon = __mem - 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': - if (__ctype.narrow(*__beg, 0) == '\n') - ++__beg; - else - __tmperr |= ios_base::failbit; - break; - case 'R': - - __cs = "%H:%M"; - __ctype.widen(__cs, __cs + 6, __wcs); - __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, - __tm, __wcs); - break; - case 'S': - - - - __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2, - - - - __io, __tmperr); - if (!__tmperr) - __tm->tm_sec = __mem; - break; - case 't': - if (__ctype.narrow(*__beg, 0) == '\t') - ++__beg; - else - __tmperr |= ios_base::failbit; - break; - case 'T': - - __cs = "%H:%M:%S"; - __ctype.widen(__cs, __cs + 9, __wcs); - __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, - __tm, __wcs); - 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]); - 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]); - break; - case 'y': - case 'C': - - case 'Y': - - - - - __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, - __io, __tmperr); - if (!__tmperr) - __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; - 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; - default: - - __tmperr |= ios_base::failbit; - } - } - else - { - - if (__format[__i] == *__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_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); - - - int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); - - ++__min; - 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'); - const int __valuec = __value * __mult; - if (__valuec > __max || __valuec + __mult < __min) - break; - __mult /= 10; - } - else - break; - } - if (__i == __len) - __member = __value; - - else if (__len == 4 && __i == 2) - __member = __value - 100; - 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); - - int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int) - * __indexlen)); - size_t __nmatches = 0; - size_t __pos = 0; - bool __testvalid = true; - const char_type* __name; - - - - - - if (__beg != __end) - { - const char_type __c = *__beg; - for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) - if (__c == __names[__i1][0] - || __c == __ctype.toupper(__names[__i1][0])) - __matches[__nmatches++] = __i1; - } - - while (__nmatches > 1) - { - - size_t __minlen = __traits_type::length(__names[__matches[0]]); - for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) - __minlen = std::min(__minlen, - __traits_type::length(__names[__matches[__i2]])); - ++__beg; - ++__pos; - if (__pos < __minlen && __beg != __end) - for (size_t __i3 = 0; __i3 < __nmatches;) - { - __name = __names[__matches[__i3]]; - if (!(__name[__pos] == *__beg)) - __matches[__i3] = __matches[--__nmatches]; - else - ++__i3; - } - else - break; - } - - if (__nmatches == 1) - { - - ++__beg; - ++__pos; - __name = __names[__matches[0]]; - const size_t __len = __traits_type::length(__name); - while (__pos < __len && __beg != __end && __name[__pos] == *__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] >= __indexlen - ? __matches[0] - __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); - __beg = _M_extract_via_format(__beg, __end, __io, __err, - __tm, __times[0]); - 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); - __beg = _M_extract_via_format(__beg, __end, __io, __err, - __tm, __dates[0]); - 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; - - __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, - __io, __tmperr); - if (!__tmperr) - __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; - 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; - while (__fmt != __fmtend && - __err == ios_base::goodbit) - { - if (__s == __end) - { - __err = ios_base::eofbit | ios_base::failbit; - break; - } - else if (__ctype.narrow(*__fmt, 0) == '%') - { - 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; - } - __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; - } - } - 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(); - } - - __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __fmt); - 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>& - 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>& - 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&); - - - - -} -# 2016 "/usr/include/c++/9.2.0/bits/locale_facets_nonio.h" 2 3 -# 42 "/usr/include/c++/9.2.0/locale" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/locale_conv.h" 1 3 -# 41 "/usr/include/c++/9.2.0/bits/locale_conv.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 3 -# 1 "/usr/include/c++/9.2.0/tuple" 1 3 -# 32 "/usr/include/c++/9.2.0/tuple" 3 - -# 33 "/usr/include/c++/9.2.0/tuple" 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/array" 1 3 -# 32 "/usr/include/c++/9.2.0/array" 3 - -# 33 "/usr/include/c++/9.2.0/array" 3 -# 43 "/usr/include/c++/9.2.0/array" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - template<typename _Tp, std::size_t _Nm> - struct __array_traits - { - typedef _Tp _Type[_Nm]; - typedef __is_swappable<_Tp> _Is_swappable; - typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; - - static constexpr _Tp& - _S_ref(const _Type& __t, std::size_t __n) noexcept - { return const_cast<_Tp&>(__t[__n]); } - - static constexpr _Tp* - _S_ptr(const _Type& __t) noexcept - { return const_cast<_Tp*>(__t); } - }; - - template<typename _Tp> - struct __array_traits<_Tp, 0> - { - struct _Type { }; - typedef true_type _Is_swappable; - typedef true_type _Is_nothrow_swappable; - - static constexpr _Tp& - _S_ref(const _Type&, std::size_t) noexcept - { return *static_cast<_Tp*>(nullptr); } - - static constexpr _Tp* - _S_ptr(const _Type&) noexcept - { return nullptr; } - }; -# 93 "/usr/include/c++/9.2.0/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; - - - typedef std::__array_traits<_Tp, _Nm> _AT_Type; - typename _AT_Type::_Type _M_elems; - - - - - void - fill(const value_type& __u) - { std::fill_n(begin(), size(), __u); } - - void - swap(array& __other) - noexcept(_AT_Type::_Is_nothrow_swappable::value) - { std::swap_ranges(begin(), end(), __other.begin()); } - - - iterator - begin() noexcept - { return iterator(data()); } - - const_iterator - begin() const noexcept - { return const_iterator(data()); } - - iterator - end() noexcept - { return iterator(data() + _Nm); } - - const_iterator - end() const noexcept - { return const_iterator(data() + _Nm); } - - 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()); } - - const_iterator - cbegin() const noexcept - { return const_iterator(data()); } - - const_iterator - cend() const noexcept - { return const_iterator(data() + _Nm); } - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(end()); } - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(begin()); } - - - constexpr size_type - size() const noexcept { return _Nm; } - - constexpr size_type - max_size() const noexcept { return _Nm; } - - constexpr bool - empty() const noexcept { return size() == 0; } - - - reference - operator[](size_type __n) noexcept - { return _AT_Type::_S_ref(_M_elems, __n); } - - constexpr const_reference - operator[](size_type __n) const noexcept - { return _AT_Type::_S_ref(_M_elems, __n); } - - 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 _AT_Type::_S_ref(_M_elems, __n); - } - - constexpr const_reference - at(size_type __n) const - { - - - return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) - : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") - , - __n, _Nm), - _AT_Type::_S_ref(_M_elems, 0)); - } - - reference - front() noexcept - { return *begin(); } - - constexpr const_reference - front() const noexcept - { return _AT_Type::_S_ref(_M_elems, 0); } - - reference - back() noexcept - { return _Nm ? *(end() - 1) : *end(); } - - constexpr const_reference - back() const noexcept - { - return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) - : _AT_Type::_S_ref(_M_elems, 0); - } - - pointer - data() noexcept - { return _AT_Type::_S_ptr(_M_elems); } - - const_pointer - data() const noexcept - { return _AT_Type::_S_ptr(_M_elems); } - }; -# 250 "/usr/include/c++/9.2.0/array" 3 - template<typename _Tp, std::size_t _Nm> - inline bool - operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) - { return std::equal(__one.begin(), __one.end(), __two.begin()); } - - template<typename _Tp, std::size_t _Nm> - inline bool - operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) - { return !(__one == __two); } - - template<typename _Tp, std::size_t _Nm> - inline bool - operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) - { - return std::lexicographical_compare(__a.begin(), __a.end(), - __b.begin(), __b.end()); - } - - template<typename _Tp, std::size_t _Nm> - inline bool - operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) - { return __two < __one; } - - template<typename _Tp, std::size_t _Nm> - inline bool - operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) - { return !(__one > __two); } - - template<typename _Tp, std::size_t _Nm> - inline bool - operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) - { return !(__one < __two); } - - - template<typename _Tp, std::size_t _Nm> - inline - - - typename enable_if< - std::__array_traits<_Tp, _Nm>::_Is_swappable::value - >::type - - - - swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) - noexcept(noexcept(__one.swap(__two))) - { __one.swap(__two); } - - - template<typename _Tp, std::size_t _Nm> - typename enable_if< - !std::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type - swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; - - - template<std::size_t _Int, typename _Tp, std::size_t _Nm> - constexpr _Tp& - get(array<_Tp, _Nm>& __arr) noexcept - { - static_assert(_Int < _Nm, "array index is within bounds"); - return std::__array_traits<_Tp, _Nm>:: - _S_ref(__arr._M_elems, _Int); - } - - template<std::size_t _Int, typename _Tp, std::size_t _Nm> - constexpr _Tp&& - get(array<_Tp, _Nm>&& __arr) noexcept - { - static_assert(_Int < _Nm, "array index is within bounds"); - return std::move(std::get<_Int>(__arr)); - } - - template<std::size_t _Int, typename _Tp, std::size_t _Nm> - constexpr const _Tp& - get(const array<_Tp, _Nm>& __arr) noexcept - { - static_assert(_Int < _Nm, "array index is within bounds"); - return std::__array_traits<_Tp, _Nm>:: - _S_ref(__arr._M_elems, _Int); - } - - template<std::size_t _Int, typename _Tp, std::size_t _Nm> - constexpr const _Tp&& - get(const array<_Tp, _Nm>&& __arr) noexcept - { - static_assert(_Int < _Nm, "array index is within bounds"); - return std::move(std::get<_Int>(__arr)); - } - - -} - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - template<typename _Tp> - struct tuple_size; - - - template<typename _Tp, std::size_t _Nm> - struct tuple_size<std::array<_Tp, _Nm>> - : public integral_constant<std::size_t, _Nm> { }; - - - template<std::size_t _Int, typename _Tp> - struct tuple_element; - - - template<std::size_t _Int, typename _Tp, std::size_t _Nm> - struct tuple_element<_Int, std::array<_Tp, _Nm>> - { - static_assert(_Int < _Nm, "index is out of bounds"); - typedef _Tp type; - }; - - template<typename _Tp, std::size_t _Nm> - struct __is_tuple_like_impl<std::array<_Tp, _Nm>> : true_type - { }; - - -} -# 40 "/usr/include/c++/9.2.0/tuple" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/uses_allocator.h" 1 3 -# 35 "/usr/include/c++/9.2.0/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; }; - - 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< - is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, - __uses_alloc1<_Alloc>, - __uses_alloc2<_Alloc>>::type - { - - - 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<template<typename...> class _Predicate, - typename _Tp, typename _Alloc, typename... _Args> - struct __is_uses_allocator_predicate - : conditional<uses_allocator<_Tp, _Alloc>::value, - __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, - _Predicate<_Tp, _Args..., _Alloc>>, - _Predicate<_Tp, _Args...>>::type { }; - - template<typename _Tp, typename _Alloc, typename... _Args> - struct __is_uses_allocator_constructible - : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...> - { }; - - - template<typename _Tp, typename _Alloc, typename... _Args> - 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> - 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++/9.2.0/tuple" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/invoke.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/invoke.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/invoke.h" 3 - - - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 52 "/usr/include/c++/9.2.0/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)...); - } - - -} -# 42 "/usr/include/c++/9.2.0/tuple" 2 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 - = typename conditional<__is_final(_Tp), false_type, - __is_empty_non_tuple<_Tp>>::type; - - template<std::size_t _Idx, typename _Head, - bool = __empty_not_final<_Head>::value> - struct _Head_base; - - template<std::size_t _Idx, typename _Head> - struct _Head_base<_Idx, _Head, true> - : public _Head - { - constexpr _Head_base() - : _Head() { } - - constexpr _Head_base(const _Head& __h) - : _Head(__h) { } - - constexpr _Head_base(const _Head_base&) = default; - constexpr _Head_base(_Head_base&&) = default; - - template<typename _UHead> - constexpr _Head_base(_UHead&& __h) - : _Head(std::forward<_UHead>(__h)) { } - - _Head_base(allocator_arg_t, __uses_alloc0) - : _Head() { } - - template<typename _Alloc> - _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) - : _Head(allocator_arg, *__a._M_a) { } - - template<typename _Alloc> - _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) - : _Head(*__a._M_a) { } - - template<typename _UHead> - _Head_base(__uses_alloc0, _UHead&& __uhead) - : _Head(std::forward<_UHead>(__uhead)) { } - - template<typename _Alloc, typename _UHead> - _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) - : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } - - template<typename _Alloc, typename _UHead> - _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) - : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } - - static constexpr _Head& - _M_head(_Head_base& __b) noexcept { return __b; } - - static constexpr const _Head& - _M_head(const _Head_base& __b) noexcept { return __b; } - }; - - template<std::size_t _Idx, typename _Head> - struct _Head_base<_Idx, _Head, false> - { - constexpr _Head_base() - : _M_head_impl() { } - - constexpr _Head_base(const _Head& __h) - : _M_head_impl(__h) { } - - constexpr _Head_base(const _Head_base&) = default; - constexpr _Head_base(_Head_base&&) = default; - - template<typename _UHead> - constexpr _Head_base(_UHead&& __h) - : _M_head_impl(std::forward<_UHead>(__h)) { } - - _Head_base(allocator_arg_t, __uses_alloc0) - : _M_head_impl() { } - - template<typename _Alloc> - _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) - : _M_head_impl(allocator_arg, *__a._M_a) { } - - template<typename _Alloc> - _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) - : _M_head_impl(*__a._M_a) { } - - template<typename _UHead> - _Head_base(__uses_alloc0, _UHead&& __uhead) - : _M_head_impl(std::forward<_UHead>(__uhead)) { } - - template<typename _Alloc, typename _UHead> - _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) - : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) - { } - - template<typename _Alloc, typename _UHead> - _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) - : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } - - static constexpr _Head& - _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } - - static constexpr const _Head& - _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } - - _Head _M_head_impl; - }; -# 176 "/usr/include/c++/9.2.0/tuple" 3 - template<std::size_t _Idx, typename... _Elements> - struct _Tuple_impl; - - - - - - - template<std::size_t _Idx, typename _Head, typename... _Tail> - struct _Tuple_impl<_Idx, _Head, _Tail...> - : public _Tuple_impl<_Idx + 1, _Tail...>, - private _Head_base<_Idx, _Head> - { - template<std::size_t, typename...> friend class _Tuple_impl; - - typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; - typedef _Head_base<_Idx, _Head> _Base; - - static constexpr _Head& - _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } - - static constexpr const _Head& - _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } - - static constexpr _Inherited& - _M_tail(_Tuple_impl& __t) noexcept { return __t; } - - static constexpr const _Inherited& - _M_tail(const _Tuple_impl& __t) noexcept { return __t; } - - constexpr _Tuple_impl() - : _Inherited(), _Base() { } - - explicit - constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) - : _Inherited(__tail...), _Base(__head) { } - - template<typename _UHead, typename... _UTail, typename = typename - enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> - explicit - constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) - : _Inherited(std::forward<_UTail>(__tail)...), - _Base(std::forward<_UHead>(__head)) { } - - constexpr _Tuple_impl(const _Tuple_impl&) = default; - - - - _Tuple_impl& operator=(const _Tuple_impl&) = delete; - - constexpr - _Tuple_impl(_Tuple_impl&& __in) - noexcept(__and_<is_nothrow_move_constructible<_Head>, - is_nothrow_move_constructible<_Inherited>>::value) - : _Inherited(std::move(_M_tail(__in))), - _Base(std::forward<_Head>(_M_head(__in))) { } - - template<typename... _UElements> - constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) - : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), - _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } - - template<typename _UHead, typename... _UTails> - constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) - : _Inherited(std::move - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), - _Base(std::forward<_UHead> - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) - : _Inherited(__tag, __a), - _Base(__tag, __use_alloc<_Head>(__a)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Head& __head, const _Tail&... __tail) - : _Inherited(__tag, __a, __tail...), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } - - template<typename _Alloc, typename _UHead, typename... _UTail, - typename = typename enable_if<sizeof...(_Tail) - == sizeof...(_UTail)>::type> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _UHead&& __head, _UTail&&... __tail) - : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), - _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(__head)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl& __in) - : _Inherited(__tag, __a, _M_tail(__in)), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl&& __in) - : _Inherited(__tag, __a, std::move(_M_tail(__in))), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - std::forward<_Head>(_M_head(__in))) { } - - template<typename _Alloc, typename... _UElements> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl<_Idx, _UElements...>& __in) - : _Inherited(__tag, __a, - _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - _Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } - - template<typename _Alloc, typename _UHead, typename... _UTails> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) - : _Inherited(__tag, __a, std::move - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), - _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead> - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } - - template<typename... _UElements> - void - _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) - { - _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); - _M_tail(*this)._M_assign( - _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); - } - - template<typename _UHead, typename... _UTails> - void - _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) - { - _M_head(*this) = std::forward<_UHead> - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); - _M_tail(*this)._M_assign( - std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); - } - - protected: - void - _M_swap(_Tuple_impl& __in) - { - using std::swap; - swap(_M_head(*this), _M_head(__in)); - _Inherited::_M_swap(_M_tail(__in)); - } - }; - - - template<std::size_t _Idx, typename _Head> - struct _Tuple_impl<_Idx, _Head> - : private _Head_base<_Idx, _Head> - { - template<std::size_t, typename...> friend class _Tuple_impl; - - typedef _Head_base<_Idx, _Head> _Base; - - static constexpr _Head& - _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } - - static constexpr const _Head& - _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } - - constexpr _Tuple_impl() - : _Base() { } - - explicit - constexpr _Tuple_impl(const _Head& __head) - : _Base(__head) { } - - template<typename _UHead> - explicit - constexpr _Tuple_impl(_UHead&& __head) - : _Base(std::forward<_UHead>(__head)) { } - - constexpr _Tuple_impl(const _Tuple_impl&) = default; - - - - _Tuple_impl& operator=(const _Tuple_impl&) = delete; - - constexpr - _Tuple_impl(_Tuple_impl&& __in) - noexcept(is_nothrow_move_constructible<_Head>::value) - : _Base(std::forward<_Head>(_M_head(__in))) { } - - template<typename _UHead> - constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) - : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } - - template<typename _UHead> - constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) - : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) - { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) - : _Base(__tag, __use_alloc<_Head>(__a)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Head& __head) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } - - template<typename _Alloc, typename _UHead> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _UHead&& __head) - : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(__head)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl& __in) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } - - template<typename _Alloc> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl&& __in) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - std::forward<_Head>(_M_head(__in))) { } - - template<typename _Alloc, typename _UHead> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl<_Idx, _UHead>& __in) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } - - template<typename _Alloc, typename _UHead> - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl<_Idx, _UHead>&& __in) - : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) - { } - - template<typename _UHead> - void - _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) - { - _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); - } - - template<typename _UHead> - void - _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) - { - _M_head(*this) - = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); - } - - protected: - void - _M_swap(_Tuple_impl& __in) - { - using std::swap; - swap(_M_head(*this), _M_head(__in)); - } - }; - - - - template<bool, typename... _Elements> - struct _TC - { - template<typename... _UElements> - static constexpr bool _ConstructibleTuple() - { - return __and_<is_constructible<_Elements, const _UElements&>...>::value; - } - - template<typename... _UElements> - static constexpr bool _ImplicitlyConvertibleTuple() - { - return __and_<is_convertible<const _UElements&, _Elements>...>::value; - } - - template<typename... _UElements> - static constexpr bool _MoveConstructibleTuple() - { - return __and_<is_constructible<_Elements, _UElements&&>...>::value; - } - - template<typename... _UElements> - static constexpr bool _ImplicitlyMoveConvertibleTuple() - { - return __and_<is_convertible<_UElements&&, _Elements>...>::value; - } - - template<typename _SrcTuple> - static constexpr bool _NonNestedTuple() - { - return __and_<__not_<is_same<tuple<_Elements...>, - __remove_cvref_t<_SrcTuple>>>, - __not_<is_convertible<_SrcTuple, _Elements...>>, - __not_<is_constructible<_Elements..., _SrcTuple>> - >::value; - } - - template<typename... _UElements> - static constexpr bool _NotSameTuple() - { - return __not_<is_same<tuple<_Elements...>, - __remove_cvref_t<_UElements>...>>::value; - } - }; - - template<typename... _Elements> - struct _TC<false, _Elements...> - { - template<typename... _UElements> - static constexpr bool _ConstructibleTuple() - { - return false; - } - - template<typename... _UElements> - static constexpr bool _ImplicitlyConvertibleTuple() - { - return false; - } - - template<typename... _UElements> - static constexpr bool _MoveConstructibleTuple() - { - return false; - } - - template<typename... _UElements> - static constexpr bool _ImplicitlyMoveConvertibleTuple() - { - return false; - } - - template<typename... _UElements> - static constexpr bool _NonNestedTuple() - { - return true; - } - - template<typename... _UElements> - static constexpr bool _NotSameTuple() - { - return true; - } - }; - - - template<typename... _Elements> - class tuple : public _Tuple_impl<0, _Elements...> - { - typedef _Tuple_impl<0, _Elements...> _Inherited; - - - - template<typename _Dummy> - struct _TC2 - { - static constexpr bool _DefaultConstructibleTuple() - { - return __and_<is_default_constructible<_Elements>...>::value; - } - static constexpr bool _ImplicitlyDefaultConstructibleTuple() - { - return __and_<__is_implicitly_default_constructible<_Elements>...> - ::value; - } - }; - - template<typename... _UElements> - static constexpr - __enable_if_t<sizeof...(_UElements) == sizeof...(_Elements), bool> - __assignable() - { return __and_<is_assignable<_Elements&, _UElements>...>::value; } - - template<typename... _UElements> - static constexpr bool __nothrow_assignable() - { - return - __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value; - } - - public: - template<typename _Dummy = void, - typename enable_if<_TC2<_Dummy>:: - _ImplicitlyDefaultConstructibleTuple(), - bool>::type = true> - constexpr tuple() - : _Inherited() { } - - template<typename _Dummy = void, - typename enable_if<_TC2<_Dummy>:: - _DefaultConstructibleTuple() - && - !_TC2<_Dummy>:: - _ImplicitlyDefaultConstructibleTuple(), - bool>::type = false> - explicit constexpr tuple() - : _Inherited() { } - - - - template<typename _Dummy> using _TCC = - _TC<is_same<_Dummy, void>::value, - _Elements...>; - - template<typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_Elements...>() - && _TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_Elements...>() - && (sizeof...(_Elements) >= 1), - bool>::type=true> - constexpr tuple(const _Elements&... __elements) - : _Inherited(__elements...) { } - - template<typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_Elements...>() - && !_TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_Elements...>() - && (sizeof...(_Elements) >= 1), - bool>::type=false> - explicit constexpr tuple(const _Elements&... __elements) - : _Inherited(__elements...) { } - - - - template<typename... _UElements> using _TMC = - _TC<(sizeof...(_Elements) == sizeof...(_UElements)) - && (_TC<(sizeof...(_UElements)==1), _Elements...>:: - template _NotSameTuple<_UElements...>()), - _Elements...>; - - - - template<typename... _UElements> using _TMCT = - _TC<(sizeof...(_Elements) == sizeof...(_UElements)) - && !is_same<tuple<_Elements...>, - tuple<_UElements...>>::value, - _Elements...>; - - template<typename... _UElements, typename - enable_if< - _TMC<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && _TMC<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && (sizeof...(_Elements) >= 1), - bool>::type=true> - constexpr tuple(_UElements&&... __elements) - : _Inherited(std::forward<_UElements>(__elements)...) { } - - template<typename... _UElements, typename - enable_if< - _TMC<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && !_TMC<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && (sizeof...(_Elements) >= 1), - bool>::type=false> - explicit constexpr tuple(_UElements&&... __elements) - : _Inherited(std::forward<_UElements>(__elements)...) { } - - constexpr tuple(const tuple&) = default; - - constexpr tuple(tuple&&) = default; - - - - template<typename _Dummy> using _TNTC = - _TC<is_same<_Dummy, void>::value && sizeof...(_Elements) == 1, - _Elements...>; - - template<typename... _UElements, typename _Dummy = void, typename - enable_if<_TMCT<_UElements...>::template - _ConstructibleTuple<_UElements...>() - && _TMCT<_UElements...>::template - _ImplicitlyConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<const tuple<_UElements...>&>(), - bool>::type=true> - constexpr tuple(const tuple<_UElements...>& __in) - : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) - { } - - template<typename... _UElements, typename _Dummy = void, typename - enable_if<_TMCT<_UElements...>::template - _ConstructibleTuple<_UElements...>() - && !_TMCT<_UElements...>::template - _ImplicitlyConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<const tuple<_UElements...>&>(), - bool>::type=false> - explicit constexpr tuple(const tuple<_UElements...>& __in) - : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) - { } - - template<typename... _UElements, typename _Dummy = void, typename - enable_if<_TMCT<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && _TMCT<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<tuple<_UElements...>&&>(), - bool>::type=true> - constexpr tuple(tuple<_UElements...>&& __in) - : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } - - template<typename... _UElements, typename _Dummy = void, typename - enable_if<_TMCT<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && !_TMCT<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<tuple<_UElements...>&&>(), - bool>::type=false> - explicit constexpr tuple(tuple<_UElements...>&& __in) - : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } - - - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a) - : _Inherited(__tag, __a) { } - - template<typename _Alloc, typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_Elements...>() - && _TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_Elements...>(), - bool>::type=true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - const _Elements&... __elements) - : _Inherited(__tag, __a, __elements...) { } - - template<typename _Alloc, typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_Elements...>() - && !_TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_Elements...>(), - bool>::type=false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - const _Elements&... __elements) - : _Inherited(__tag, __a, __elements...) { } - - template<typename _Alloc, typename... _UElements, typename - enable_if<_TMC<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && _TMC<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>(), - bool>::type=true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - _UElements&&... __elements) - : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) - { } - - template<typename _Alloc, typename... _UElements, typename - enable_if<_TMC<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && !_TMC<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>(), - bool>::type=false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - _UElements&&... __elements) - : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) - { } - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) - : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) - : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } - - template<typename _Alloc, typename _Dummy = void, - typename... _UElements, typename - enable_if<_TMCT<_UElements...>::template - _ConstructibleTuple<_UElements...>() - && _TMCT<_UElements...>::template - _ImplicitlyConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<const tuple<_UElements...>&>(), - bool>::type=true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - const tuple<_UElements...>& __in) - : _Inherited(__tag, __a, - static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) - { } - - template<typename _Alloc, typename _Dummy = void, - typename... _UElements, typename - enable_if<_TMCT<_UElements...>::template - _ConstructibleTuple<_UElements...>() - && !_TMCT<_UElements...>::template - _ImplicitlyConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<const tuple<_UElements...>&>(), - bool>::type=false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - const tuple<_UElements...>& __in) - : _Inherited(__tag, __a, - static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) - { } - - template<typename _Alloc, typename _Dummy = void, - typename... _UElements, typename - enable_if<_TMCT<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && _TMCT<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<tuple<_UElements...>&&>(), - bool>::type=true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - tuple<_UElements...>&& __in) - : _Inherited(__tag, __a, - static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) - { } - - template<typename _Alloc, typename _Dummy = void, - typename... _UElements, typename - enable_if<_TMCT<_UElements...>::template - _MoveConstructibleTuple<_UElements...>() - && !_TMCT<_UElements...>::template - _ImplicitlyMoveConvertibleTuple<_UElements...>() - && _TNTC<_Dummy>::template - _NonNestedTuple<tuple<_UElements...>&&>(), - bool>::type=false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - tuple<_UElements...>&& __in) - : _Inherited(__tag, __a, - static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) - { } - - - - tuple& - operator=(typename conditional<__assignable<const _Elements&...>(), - const tuple&, - const __nonesuch_no_braces&>::type __in) - noexcept(__nothrow_assignable<const _Elements&...>()) - { - this->_M_assign(__in); - return *this; - } - - tuple& - operator=(typename conditional<__assignable<_Elements...>(), - tuple&&, - __nonesuch_no_braces&&>::type __in) - noexcept(__nothrow_assignable<_Elements...>()) - { - this->_M_assign(std::move(__in)); - return *this; - } - - template<typename... _UElements> - __enable_if_t<__assignable<const _UElements&...>(), tuple&> - operator=(const tuple<_UElements...>& __in) - noexcept(__nothrow_assignable<const _UElements&...>()) - { - this->_M_assign(__in); - return *this; - } - - template<typename... _UElements> - __enable_if_t<__assignable<_UElements...>(), tuple&> - operator=(tuple<_UElements...>&& __in) - noexcept(__nothrow_assignable<_UElements...>()) - { - this->_M_assign(std::move(__in)); - return *this; - } - - - void - swap(tuple& __in) - noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) - { _Inherited::_M_swap(__in); } - }; -# 875 "/usr/include/c++/9.2.0/tuple" 3 - template<> - class tuple<> - { - public: - void swap(tuple&) noexcept { } - - - tuple() = default; - - template<typename _Alloc> - tuple(allocator_arg_t, const _Alloc&) { } - template<typename _Alloc> - tuple(allocator_arg_t, const _Alloc&, const tuple&) { } - }; - - - - template<typename _T1, typename _T2> - class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> - { - typedef _Tuple_impl<0, _T1, _T2> _Inherited; - - template<typename _U1, typename _U2> - static constexpr bool __assignable() - { - return __and_<is_assignable<_T1&, _U1>, - is_assignable<_T2&, _U2>>::value; - } - - template<typename _U1, typename _U2> - static constexpr bool __nothrow_assignable() - { - return __and_<is_nothrow_assignable<_T1&, _U1>, - is_nothrow_assignable<_T2&, _U2>>::value; - } - - public: - template <typename _U1 = _T1, - typename _U2 = _T2, - typename enable_if<__and_< - __is_implicitly_default_constructible<_U1>, - __is_implicitly_default_constructible<_U2>> - ::value, bool>::type = true> - constexpr tuple() - : _Inherited() { } - - template <typename _U1 = _T1, - typename _U2 = _T2, - typename enable_if< - __and_< - is_default_constructible<_U1>, - is_default_constructible<_U2>, - __not_< - __and_<__is_implicitly_default_constructible<_U1>, - __is_implicitly_default_constructible<_U2>>>> - ::value, bool>::type = false> - explicit constexpr tuple() - : _Inherited() { } - - - - template<typename _Dummy> using _TCC = - _TC<is_same<_Dummy, void>::value, _T1, _T2>; - - template<typename _Dummy = void, typename - enable_if<_TCC<_Dummy>::template - _ConstructibleTuple<_T1, _T2>() - && _TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_T1, _T2>(), - bool>::type = true> - constexpr tuple(const _T1& __a1, const _T2& __a2) - : _Inherited(__a1, __a2) { } - - template<typename _Dummy = void, typename - enable_if<_TCC<_Dummy>::template - _ConstructibleTuple<_T1, _T2>() - && !_TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_T1, _T2>(), - bool>::type = false> - explicit constexpr tuple(const _T1& __a1, const _T2& __a2) - : _Inherited(__a1, __a2) { } - - - - using _TMC = _TC<true, _T1, _T2>; - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>() - && !is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value, - bool>::type = true> - constexpr tuple(_U1&& __a1, _U2&& __a2) - : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>() - && !is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value, - bool>::type = false> - explicit constexpr tuple(_U1&& __a1, _U2&& __a2) - : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } - - constexpr tuple(const tuple&) = default; - - constexpr tuple(tuple&&) = default; - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = true> - constexpr tuple(const tuple<_U1, _U2>& __in) - : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit constexpr tuple(const tuple<_U1, _U2>& __in) - : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = true> - constexpr tuple(tuple<_U1, _U2>&& __in) - : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit constexpr tuple(tuple<_U1, _U2>&& __in) - : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = true> - constexpr tuple(const pair<_U1, _U2>& __in) - : _Inherited(__in.first, __in.second) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit constexpr tuple(const pair<_U1, _U2>& __in) - : _Inherited(__in.first, __in.second) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = true> - constexpr tuple(pair<_U1, _U2>&& __in) - : _Inherited(std::forward<_U1>(__in.first), - std::forward<_U2>(__in.second)) { } - - template<typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit constexpr tuple(pair<_U1, _U2>&& __in) - : _Inherited(std::forward<_U1>(__in.first), - std::forward<_U2>(__in.second)) { } - - - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a) - : _Inherited(__tag, __a) { } - - template<typename _Alloc, typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_T1, _T2>() - && _TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_T1, _T2>(), - bool>::type=true> - - tuple(allocator_arg_t __tag, const _Alloc& __a, - const _T1& __a1, const _T2& __a2) - : _Inherited(__tag, __a, __a1, __a2) { } - - template<typename _Alloc, typename _Dummy = void, - typename enable_if< - _TCC<_Dummy>::template - _ConstructibleTuple<_T1, _T2>() - && !_TCC<_Dummy>::template - _ImplicitlyConvertibleTuple<_T1, _T2>(), - bool>::type=false> - - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - const _T1& __a1, const _T2& __a2) - : _Inherited(__tag, __a, __a1, __a2) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = true> - tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) - : _Inherited(__tag, __a, std::forward<_U1>(__a1), - std::forward<_U2>(__a2)) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - _U1&& __a1, _U2&& __a2) - : _Inherited(__tag, __a, std::forward<_U1>(__a1), - std::forward<_U2>(__a2)) { } - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) - : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } - - template<typename _Alloc> - tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) - : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - const tuple<_U1, _U2>& __in) - : _Inherited(__tag, __a, - static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) - { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - const tuple<_U1, _U2>& __in) - : _Inherited(__tag, __a, - static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) - { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = true> - tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) - : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) - { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - tuple<_U1, _U2>&& __in) - : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) - { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = true> - tuple(allocator_arg_t __tag, const _Alloc& __a, - const pair<_U1, _U2>& __in) - : _Inherited(__tag, __a, __in.first, __in.second) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _ConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - const pair<_U1, _U2>& __in) - : _Inherited(__tag, __a, __in.first, __in.second) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && _TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = true> - tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) - : _Inherited(__tag, __a, std::forward<_U1>(__in.first), - std::forward<_U2>(__in.second)) { } - - template<typename _Alloc, typename _U1, typename _U2, typename - enable_if<_TMC::template - _MoveConstructibleTuple<_U1, _U2>() - && !_TMC::template - _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), - bool>::type = false> - explicit tuple(allocator_arg_t __tag, const _Alloc& __a, - pair<_U1, _U2>&& __in) - : _Inherited(__tag, __a, std::forward<_U1>(__in.first), - std::forward<_U2>(__in.second)) { } - - tuple& - operator=(typename conditional<__assignable<const _T1&, const _T2&>(), - const tuple&, - const __nonesuch_no_braces&>::type __in) - noexcept(__nothrow_assignable<const _T1&, const _T2&>()) - { - this->_M_assign(__in); - return *this; - } - - tuple& - operator=(typename conditional<__assignable<_T1, _T2>(), - tuple&&, - __nonesuch_no_braces&&>::type __in) - noexcept(__nothrow_assignable<_T1, _T2>()) - { - this->_M_assign(std::move(__in)); - return *this; - } - - template<typename _U1, typename _U2> - __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> - operator=(const tuple<_U1, _U2>& __in) - noexcept(__nothrow_assignable<const _U1&, const _U2&>()) - { - this->_M_assign(__in); - return *this; - } - - template<typename _U1, typename _U2> - __enable_if_t<__assignable<_U1, _U2>(), tuple&> - operator=(tuple<_U1, _U2>&& __in) - noexcept(__nothrow_assignable<_U1, _U2>()) - { - this->_M_assign(std::move(__in)); - return *this; - } - - template<typename _U1, typename _U2> - __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> - operator=(const pair<_U1, _U2>& __in) - noexcept(__nothrow_assignable<const _U1&, const _U2&>()) - { - this->_M_head(*this) = __in.first; - this->_M_tail(*this)._M_head(*this) = __in.second; - return *this; - } - - template<typename _U1, typename _U2> - __enable_if_t<__assignable<_U1, _U2>(), tuple&> - operator=(pair<_U1, _U2>&& __in) - noexcept(__nothrow_assignable<_U1, _U2>()) - { - this->_M_head(*this) = std::forward<_U1>(__in.first); - this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); - return *this; - } - - void - swap(tuple& __in) - noexcept(__and_<__is_nothrow_swappable<_T1>, - __is_nothrow_swappable<_T2>>::value) - { _Inherited::_M_swap(__in); } - }; - - - - template<typename... _Elements> - struct tuple_size<tuple<_Elements...>> - : public integral_constant<std::size_t, sizeof...(_Elements)> { }; -# 1284 "/usr/include/c++/9.2.0/tuple" 3 - template<std::size_t __i, typename _Head, typename... _Tail> - struct tuple_element<__i, tuple<_Head, _Tail...> > - : tuple_element<__i - 1, tuple<_Tail...> > { }; - - - - - template<typename _Head, typename... _Tail> - struct tuple_element<0, tuple<_Head, _Tail...> > - { - typedef _Head type; - }; - - - - - template<size_t __i> - struct tuple_element<__i, tuple<>> - { - static_assert(__i < tuple_size<tuple<>>::value, - "tuple index is in range"); - }; - - template<std::size_t __i, typename _Head, typename... _Tail> - constexpr _Head& - __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept - { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } - - template<std::size_t __i, typename _Head, typename... _Tail> - constexpr const _Head& - __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept - { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } - - - template<std::size_t __i, typename... _Elements> - constexpr __tuple_element_t<__i, tuple<_Elements...>>& - get(tuple<_Elements...>& __t) noexcept - { return std::__get_helper<__i>(__t); } - - - template<std::size_t __i, typename... _Elements> - constexpr const __tuple_element_t<__i, tuple<_Elements...>>& - get(const tuple<_Elements...>& __t) noexcept - { return std::__get_helper<__i>(__t); } - - - template<std::size_t __i, typename... _Elements> - constexpr __tuple_element_t<__i, tuple<_Elements...>>&& - get(tuple<_Elements...>&& __t) noexcept - { - typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; - return std::forward<__element_type&&>(std::get<__i>(__t)); - } - - - template<std::size_t __i, typename... _Elements> - constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& - get(const tuple<_Elements...>&& __t) noexcept - { - typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; - return std::forward<const __element_type&&>(std::get<__i>(__t)); - } - - - - - - template<typename _Head, size_t __i, typename... _Tail> - constexpr _Head& - __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept - { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } - - template<typename _Head, size_t __i, typename... _Tail> - constexpr const _Head& - __get_helper2(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept - { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } - - - template <typename _Tp, typename... _Types> - constexpr _Tp& - get(tuple<_Types...>& __t) noexcept - { return std::__get_helper2<_Tp>(__t); } - - - template <typename _Tp, typename... _Types> - constexpr _Tp&& - get(tuple<_Types...>&& __t) noexcept - { return std::forward<_Tp&&>(std::__get_helper2<_Tp>(__t)); } - - - template <typename _Tp, typename... _Types> - constexpr const _Tp& - get(const tuple<_Types...>& __t) noexcept - { return std::__get_helper2<_Tp>(__t); } - - - - template <typename _Tp, typename... _Types> - constexpr const _Tp&& - get(const tuple<_Types...>&& __t) noexcept - { return std::forward<const _Tp&&>(std::__get_helper2<_Tp>(__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); - } - - 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<size_t, typename, typename, size_t> - struct __make_tuple_impl; - - template<size_t _Idx, typename _Tuple, typename... _Tp, size_t _Nm> - struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> - : __make_tuple_impl<_Idx + 1, - tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, - _Tuple, _Nm> - { }; - - template<std::size_t _Nm, typename _Tuple, typename... _Tp> - struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> - { - typedef tuple<_Tp...> __type; - }; - - template<typename _Tuple> - struct __do_make_tuple - : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> - { }; - - - 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 std::_Index_tuple<> __type; - }; - - template<typename _Tp, typename... _Tpls> - struct __make_1st_indices<_Tp, _Tpls...> - { - typedef typename std::_Build_index_tuple<std::tuple_size< - typename std::remove_reference<_Tp>::type>::value>::__type __type; - }; - - - - - template<typename _Ret, typename _Indices, typename... _Tpls> - struct __tuple_concater; - - template<typename _Ret, std::size_t... _Is, typename _Tp, typename... _Tpls> - struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> - { - template<typename... _Us> - static constexpr _Ret - _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) - { - typedef typename __make_1st_indices<_Tpls...>::__type __idx; - typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; - return __next::_S_do(std::forward<_Tpls>(__tps)..., - std::forward<_Us>(__us)..., - std::get<_Is>(std::forward<_Tp>(__tp))...); - } - }; - - template<typename _Ret> - struct __tuple_concater<_Ret, std::_Index_tuple<>> - { - template<typename... _Us> - static constexpr _Ret - _S_do(_Us&&... __us) - { - return _Ret(std::forward<_Us>(__us)...); - } - }; - - - 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); } - - - 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; } - }; - - - - constexpr _Swallow_assign ignore{}; - - - template<typename... _Types, typename _Alloc> - struct uses_allocator<tuple<_Types...>, _Alloc> : true_type { }; - - - template<class _T1, class _T2> - template<typename... _Args1, typename... _Args2> - inline - pair<_T1, _T2>:: - pair(piecewise_construct_t, - tuple<_Args1...> __first, tuple<_Args2...> __second) - : pair(__first, __second, - typename _Build_index_tuple<sizeof...(_Args1)>::__type(), - typename _Build_index_tuple<sizeof...(_Args2)>::__type()) - { } - - template<class _T1, class _T2> - template<typename... _Args1, std::size_t... _Indexes1, - typename... _Args2, std::size_t... _Indexes2> - inline - pair<_T1, _T2>:: - pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, - _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) - : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), - second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) - { } -# 1718 "/usr/include/c++/9.2.0/tuple" 3 - -} -# 38 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 2 3 - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - template<typename> class auto_ptr; -#pragma GCC diagnostic pop - - - - template<typename _Tp> - struct default_delete - { - - constexpr default_delete() noexcept = default; - - - - - - - template<typename _Up, typename = typename - enable_if<is_convertible<_Up*, _Tp*>::value>::type> - default_delete(const default_delete<_Up>&) noexcept { } - - - void - operator()(_Tp* __ptr) const - { - static_assert(!is_void<_Tp>::value, - "can't delete pointer to incomplete type"); - static_assert(sizeof(_Tp)>0, - "can't delete pointer to incomplete type"); - delete __ptr; - } - }; - - - - - template<typename _Tp> - struct default_delete<_Tp[]> - { - public: - - constexpr default_delete() noexcept = default; -# 104 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 3 - template<typename _Up, typename = typename - enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type> - 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)) { } - - pointer& _M_ptr() { return std::get<0>(_M_t); } - pointer _M_ptr() const { return std::get<0>(_M_t); } - _Dp& _M_deleter() { return std::get<1>(_M_t); } - const _Dp& _M_deleter() const { return std::get<1>(_M_t); } - - private: - tuple<pointer, _Dp> _M_t; - }; - - - 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_impl<_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) - { } -# 214 "/usr/include/c++/9.2.0/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) { } -# 226 "/usr/include/c++/9.2.0/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&& __u) noexcept - : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } - - - - - - - - template<typename _Up, typename _Ep, typename = _Require< - __safe_conversion_up<_Up, _Ep>, - typename conditional<is_reference<_Dp>::value, - is_same<_Ep, _Dp>, - is_convertible<_Ep, _Dp>>::type>> - 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(); - } -# 296 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 3 - unique_ptr& - operator=(unique_ptr&& __u) noexcept - { - reset(__u.release()); - get_deleter() = std::forward<deleter_type>(__u.get_deleter()); - return *this; - } -# 311 "/usr/include/c++/9.2.0/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 - { - ; - 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 - { - pointer __p = get(); - _M_t._M_ptr() = pointer(); - return __p; - } - - - - - - - - void - reset(pointer __p = pointer()) noexcept - { - static_assert(__is_invocable<deleter_type&, pointer>::value, - "unique_ptr's deleter must be invocable with a pointer"); - using std::swap; - swap(_M_t._M_ptr(), __p); - if (__p != pointer()) - get_deleter()(std::move(__p)); - } - - - void - swap(unique_ptr& __u) noexcept - { - using std::swap; - swap(_M_t, __u._M_t); - } - - - unique_ptr(const unique_ptr&) = delete; - unique_ptr& operator=(const unique_ptr&) = delete; - }; - - - - - - template<typename _Tp, typename _Dp> - class unique_ptr<_Tp[], _Dp> - { - template <typename _Up> - using _DeleterConstraint = - typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; - - __uniq_ptr_impl<_Tp, _Dp> _M_t; - - template<typename _Up> - using __remove_cv = typename remove_cv<_Up>::type; - - - template<typename _Up> - using __is_derived_Tp - = __and_< is_base_of<_Tp, _Up>, - __not_<is_same<__remove_cv<_Tp>, __remove_cv<_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() - { } -# 479 "/usr/include/c++/9.2.0/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) - { } -# 497 "/usr/include/c++/9.2.0/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) { } -# 511 "/usr/include/c++/9.2.0/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&& __u) noexcept - : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } - - - 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>, - typename conditional<is_reference<_Dp>::value, - is_same<_Ep, _Dp>, - is_convertible<_Ep, _Dp>>::type>> - 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(); - } -# 563 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 3 - unique_ptr& - operator=(unique_ptr&& __u) noexcept - { - reset(__u.release()); - get_deleter() = std::forward<deleter_type>(__u.get_deleter()); - return *this; - } -# 578 "/usr/include/c++/9.2.0/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 - { - ; - 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 - { - pointer __p = get(); - _M_t._M_ptr() = pointer(); - return __p; - } - - - - - - - - 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 - { - pointer __ptr = __p; - using std::swap; - swap(_M_t._M_ptr(), __ptr); - if (__ptr != nullptr) - get_deleter()(__ptr); - } - - void reset(nullptr_t = nullptr) noexcept - { - reset(pointer()); - } - - - void - swap(unique_ptr& __u) noexcept - { - using std::swap; - swap(_M_t, __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> - 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> - inline bool - operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept - { return !__x; } - - template<typename _Tp, typename _Dp> - inline bool - operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept - { return !__x; } - - template<typename _Tp, typename _Dp, - typename _Up, typename _Ep> - 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> - inline bool - operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept - { return (bool)__x; } - - template<typename _Tp, typename _Dp> - inline bool - operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept - { return (bool)__x; } - - template<typename _Tp, typename _Dp, - typename _Up, typename _Ep> - 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> - 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> - 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> - inline bool - operator<=(const unique_ptr<_Tp, _Dp>& __x, - const unique_ptr<_Up, _Ep>& __y) - { return !(__y < __x); } - - template<typename _Tp, typename _Dp> - inline bool - operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) - { return !(nullptr < __x); } - - template<typename _Tp, typename _Dp> - inline bool - operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) - { return !(__x < nullptr); } - - template<typename _Tp, typename _Dp, - typename _Up, typename _Ep> - inline bool - operator>(const unique_ptr<_Tp, _Dp>& __x, - const unique_ptr<_Up, _Ep>& __y) - { return (__y < __x); } - - template<typename _Tp, typename _Dp> - 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> - 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> - inline bool - operator>=(const unique_ptr<_Tp, _Dp>& __x, - const unique_ptr<_Up, _Ep>& __y) - { return !(__x < __y); } - - template<typename _Tp, typename _Dp> - inline bool - operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) - { return !(__x < nullptr); } - - template<typename _Tp, typename _Dp> - inline bool - operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) - { return !(nullptr < __x); } - - - template<typename _Tp, typename _Dp> - struct hash<unique_ptr<_Tp, _Dp>> - : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>, - private __poison_hash<typename unique_ptr<_Tp, _Dp>::pointer> - { - size_t - operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept - { - typedef unique_ptr<_Tp, _Dp> _UP; - return std::hash<typename _UP::pointer>()(__u.get()); - } - }; - - - - - - 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, typename... _Args> - inline typename _MakeUniq<_Tp>::__single_object - make_unique(_Args&&... __args) - { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } - - - template<typename _Tp> - inline typename _MakeUniq<_Tp>::__array - make_unique(size_t __num) - { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]()); } - - - template<typename _Tp, typename... _Args> - inline typename _MakeUniq<_Tp>::__invalid_type - make_unique(_Args&&...) = delete; -# 879 "/usr/include/c++/9.2.0/bits/unique_ptr.h" 3 - -} -# 42 "/usr/include/c++/9.2.0/bits/locale_conv.h" 2 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 - && (__outstr.size() - __outchars) < __maxlen); - - if (__result == codecvt_base::error) - { - __count = __next - __first; - return false; - } - - - - if (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 == (__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 == (__last - __first)); - } -# 226 "/usr/include/c++/9.2.0/bits/locale_conv.h" 3 -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) - { - if (!_M_cvt) - __throw_logic_error("wstring_convert"); - } -# 264 "/usr/include/c++/9.2.0/bits/locale_conv.h" 3 - wstring_convert(_Codecvt* __pcvt, state_type __state) - : _M_cvt(__pcvt), _M_state(__state), _M_with_cvtstate(true) - { - if (!_M_cvt) - __throw_logic_error("wstring_convert"); - } - - - - - - - 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) - { - if (!_M_cvt) - __throw_logic_error("wstring_convert"); - } - - ~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: - unique_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) { } -# 405 "/usr/include/c++/9.2.0/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), _M_state(__state) - { - if (!_M_cvt) - __throw_logic_error("wbuffer_convert"); - - _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; - unique_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; - }; - - - - - - -} -# 44 "/usr/include/c++/9.2.0/locale" 2 3 -# 44 "/usr/include/c++/9.2.0/iomanip" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/quoted_string.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/quoted_string.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/quoted_string.h" 3 - - - - -# 1 "/usr/include/c++/9.2.0/sstream" 1 3 -# 36 "/usr/include/c++/9.2.0/sstream" 3 - -# 37 "/usr/include/c++/9.2.0/sstream" 3 - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -namespace __cxx11 { -# 64 "/usr/include/c++/9.2.0/sstream" 3 - template<typename _CharT, typename _Traits, typename _Alloc> - class basic_stringbuf : public basic_streambuf<_CharT, _Traits> - { - struct __xfer_bufptrs; - 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: -# 99 "/usr/include/c++/9.2.0/sstream" 3 - basic_stringbuf() - : __streambuf_type(), _M_mode(ios_base::in | ios_base::out), _M_string() - { } -# 110 "/usr/include/c++/9.2.0/sstream" 3 - explicit - basic_stringbuf(ios_base::openmode __mode) - : __streambuf_type(), _M_mode(__mode), _M_string() - { } -# 123 "/usr/include/c++/9.2.0/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); } - - - - 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) - { - __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); - } -# 177 "/usr/include/c++/9.2.0/sstream" 3 - __string_type - str() const - { - __string_type __ret(_M_string.get_allocator()); - if (this->pptr()) - { - - if (this->pptr() > this->egptr()) - __ret.assign(this->pbase(), this->pptr()); - else - __ret.assign(this->pbase(), this->egptr()); - } - else - __ret = _M_string; - return __ret; - } -# 201 "/usr/include/c++/9.2.0/sstream" 3 - void - str(const __string_type& __s) - { - - - _M_string.assign(__s.data(), __s.size()); - _M_stringbuf_init(_M_mode); - } - - 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()); -# 254 "/usr/include/c++/9.2.0/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() - { - const bool __testin = _M_mode & ios_base::in; - if (this->pptr() && this->pptr() > this->egptr()) - { - if (__testin) - this->setg(this->eback(), this->gptr(), this->pptr()); - else - this->setg(this->pptr(), this->pptr(), this->pptr()); - } - } - - - - void - _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); - - private: - - - - - 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 (__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]; - }; -# 368 "/usr/include/c++/9.2.0/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)) - { } - - }; -# 391 "/usr/include/c++/9.2.0/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: -# 425 "/usr/include/c++/9.2.0/sstream" 3 - basic_istringstream() - : __istream_type(), _M_stringbuf(ios_base::in) - { this->init(&_M_stringbuf); } -# 441 "/usr/include/c++/9.2.0/sstream" 3 - explicit - basic_istringstream(ios_base::openmode __mode) - : __istream_type(), _M_stringbuf(__mode | ios_base::in) - { this->init(&_M_stringbuf); } -# 459 "/usr/include/c++/9.2.0/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); } - - - - 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); - } -# 510 "/usr/include/c++/9.2.0/sstream" 3 - __stringbuf_type* - rdbuf() const - { return const_cast<__stringbuf_type*>(&_M_stringbuf); } - - - - - - __string_type - str() const - { return _M_stringbuf.str(); } - - - - - - - - void - str(const __string_type& __s) - { _M_stringbuf.str(__s); } - }; -# 549 "/usr/include/c++/9.2.0/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: -# 583 "/usr/include/c++/9.2.0/sstream" 3 - basic_ostringstream() - : __ostream_type(), _M_stringbuf(ios_base::out) - { this->init(&_M_stringbuf); } -# 599 "/usr/include/c++/9.2.0/sstream" 3 - explicit - basic_ostringstream(ios_base::openmode __mode) - : __ostream_type(), _M_stringbuf(__mode | ios_base::out) - { this->init(&_M_stringbuf); } -# 617 "/usr/include/c++/9.2.0/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); } - - - - 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); - } -# 668 "/usr/include/c++/9.2.0/sstream" 3 - __stringbuf_type* - rdbuf() const - { return const_cast<__stringbuf_type*>(&_M_stringbuf); } - - - - - - __string_type - str() const - { return _M_stringbuf.str(); } - - - - - - - - void - str(const __string_type& __s) - { _M_stringbuf.str(__s); } - }; -# 707 "/usr/include/c++/9.2.0/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: -# 741 "/usr/include/c++/9.2.0/sstream" 3 - basic_stringstream() - : __iostream_type(), _M_stringbuf(ios_base::out | ios_base::in) - { this->init(&_M_stringbuf); } -# 755 "/usr/include/c++/9.2.0/sstream" 3 - explicit - basic_stringstream(ios_base::openmode __m) - : __iostream_type(), _M_stringbuf(__m) - { this->init(&_M_stringbuf); } -# 771 "/usr/include/c++/9.2.0/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); } - - - - 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); - } -# 822 "/usr/include/c++/9.2.0/sstream" 3 - __stringbuf_type* - rdbuf() const - { return const_cast<__stringbuf_type*>(&_M_stringbuf); } - - - - - - __string_type - str() const - { return _M_stringbuf.str(); } - - - - - - - - void - str(const __string_type& __s) - { _M_stringbuf.str(__s); } - }; - - - - template <class _CharT, class _Traits, class _Allocator> - inline void - swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, - basic_stringbuf<_CharT, _Traits, _Allocator>& __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++/9.2.0/bits/sstream.tcc" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/sstream.tcc" 3 - -# 38 "/usr/include/c++/9.2.0/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 ((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++/9.2.0/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>; - - - - -} -# 880 "/usr/include/c++/9.2.0/sstream" 2 3 -# 39 "/usr/include/c++/9.2.0/bits/quoted_string.h" 2 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; - }; -# 91 "/usr/include/c++/9.2.0/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; - } - } - - -} -# 46 "/usr/include/c++/9.2.0/iomanip" 2 3 - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - struct _Resetiosflags { ios_base::fmtflags _M_mask; }; -# 65 "/usr/include/c++/9.2.0/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; }; -# 95 "/usr/include/c++/9.2.0/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; }; -# 126 "/usr/include/c++/9.2.0/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; }; -# 163 "/usr/include/c++/9.2.0/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; }; -# 194 "/usr/include/c++/9.2.0/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; }; -# 224 "/usr/include/c++/9.2.0/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; }; -# 257 "/usr/include/c++/9.2.0/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; }; -# 304 "/usr/include/c++/9.2.0/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; - }; -# 356 "/usr/include/c++/9.2.0/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; - }; -# 411 "/usr/include/c++/9.2.0/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; - } -# 459 "/usr/include/c++/9.2.0/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); - } -# 508 "/usr/include/c++/9.2.0/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); - - - - -} -# 11 "/usr/include/boost/multiprecision/cpp_int.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 -# 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; -} -# 12 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/number.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/number.hpp" 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/max.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/max.hpp" 3 4 -# 1 "/usr/include/boost/mpl/min_max.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/min_max.hpp" 3 4 -# 1 "/usr/include/boost/mpl/less.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/less.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/aux_/comparison_op.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 -# 17 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 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 -# 18 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 2 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; - - -} -# 18 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 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 -# 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4 -# 20 "/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 -}}} -# 19 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/numeric_cast.hpp" 1 3 4 -# 30 "/usr/include/boost/mpl/numeric_cast.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< typename SourceTag, typename TargetTag > struct numeric_cast -{ - template< typename N > struct apply; -}; - -}} -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/apply_wrap.hpp" 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/apply_wrap.hpp" 2 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 -# 20 "/usr/include/boost/mpl/has_xxx.hpp" 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 -# 22 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 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_/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 -# 45 "/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 -# 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 -# 46 "/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 -# 19 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4 -# 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 -# 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4 -# 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 -# 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4 -# 47 "/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 -# 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4 -# 48 "/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 -# 17 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4 -# 18 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 - - -# 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 -# 20 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 21 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 -# 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4 -# 18 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 -# 19 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 - -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 21 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 -# 41 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4 -# 17 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4 -# 18 "/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 -# 20 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 -# 42 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 -# 22 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 -# 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4 -# 20 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 21 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 -# 37 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4 -# 18 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4 -# 19 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 -# 38 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 -# 23 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 -# 48 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4 -# 49 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 -# 21 "/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 -# 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 -# 20 "/usr/include/boost/preprocessor/tuple/rem.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp" 1 3 4 -# 21 "/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 -# 24 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 -# 22 "/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/overload_resolution.hpp" 1 3 4 -# 36 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 -# 21 "/usr/include/boost/mpl/has_xxx.hpp" 2 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_/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 -}}} -# 23 "/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 - - -# 1 "/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp" 1 3 4 -# 29 "/usr/include/boost/mpl/apply_wrap.hpp" 2 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/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 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/if.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/if.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4 -# 21 "/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> { }; } - -}} -# 24 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/tag.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/tag.hpp" 3 4 -# 1 "/usr/include/boost/mpl/eval_if.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/eval_if.hpp" 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> { }; } - -}} -# 18 "/usr/include/boost/mpl/tag.hpp" 2 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> { }; } - -}} -# 19 "/usr/include/boost/mpl/tag.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/has_tag.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/has_tag.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { -template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_tag { 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::tag>* = 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; }; -}}} -# 20 "/usr/include/boost/mpl/tag.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -namespace aux { -template< typename T > struct tag_impl -{ - typedef typename T::tag type; -}; -} - -template< typename T, typename Default = void_ > struct tag - - : if_< - aux::has_tag<T> - , aux::tag_impl<T> - , Default - >::type -{ -# 48 "/usr/include/boost/mpl/tag.hpp" 3 4 -}; - -}} -# 25 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/config/forwarding.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 2 3 4 - -namespace boost { namespace mpl { namespace aux { - -template< - typename F - , typename Tag1 - , typename Tag2 - > -struct cast1st_impl -{ - template< typename N1, typename N2 > struct apply - - : apply_wrap2< - F - , typename apply_wrap1< numeric_cast<Tag1,Tag2>,N1 >::type - , N2 - > - { -# 46 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 3 4 - }; -}; - -template< - typename F - , typename Tag1 - , typename Tag2 - > -struct cast2nd_impl -{ - template< typename N1, typename N2 > struct apply - - : apply_wrap2< - F - , N1 - , typename apply_wrap1< numeric_cast<Tag2,Tag1>,N2 >::type - > - { -# 72 "/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp" 3 4 - }; -}; - -}}} -# 26 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/mpl/aux_/msvc_eti_base.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/aux_/msvc_eti_base.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { -# 62 "/usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" 3 4 -}}} -# 18 "/usr/include/boost/mpl/aux_/msvc_eti_base.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { namespace aux { -# 55 "/usr/include/boost/mpl/aux_/msvc_eti_base.hpp" 3 4 -template< typename T > struct msvc_eti_base - : T -{ - - msvc_eti_base(); - - typedef T type; -}; - - - -template<> struct msvc_eti_base<int> -{ - typedef msvc_eti_base type; - typedef msvc_eti_base first; - typedef msvc_eti_base second; - typedef msvc_eti_base tag; - enum { value = 0 }; -}; - -}}} -# 30 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/less.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct less_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct less_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct less_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct less_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct less_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct less - - : less_impl< - typename less_tag<N1>::type - , typename less_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct less_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N2::value > N1::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/less.hpp" 2 3 4 -# 18 "/usr/include/boost/mpl/min_max.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename N1 = na - , typename N2 = na - > -struct min - : if_< less<N1,N2>,N1,N2 > -{ -}; - -template< - typename N1 = na - , typename N2 = na - > -struct max - : if_< less<N1,N2>,N2,N1 > -{ -}; - -template<> struct min< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : min< T1 , T2 > { }; }; template< typename Tag > struct lambda< min< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef min< na , na > result_; typedef min< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< min< T1 , T2 > > : int_<2> { }; template<> struct template_arity< min< na , na > > : int_<-1> { }; } -template<> struct max< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : max< T1 , T2 > { }; }; template< typename Tag > struct lambda< max< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef max< na , na > result_; typedef max< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< max< T1 , T2 > > : int_<2> { }; template<> struct template_arity< max< na , na > > : int_<-1> { }; } - -}} -# 18 "/usr/include/boost/mpl/max.hpp" 2 3 4 -# 12 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/plus.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/plus.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/integral_c.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/integral_c.hpp" 3 4 -# 1 "/usr/include/boost/mpl/integral_c_fwd.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/integral_c_fwd.hpp" 3 4 -namespace mpl_ { - - - - - -template< typename T, T N > struct integral_c; - - -} -namespace boost { namespace mpl { using ::mpl_::integral_c; } } -# 18 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4 -# 32 "/usr/include/boost/mpl/integral_c.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 -# 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 -namespace mpl_ { - -template< typename T, T N > -struct integral_c -{ - static const T value = N; - - - - - - typedef integral_c type; - - typedef T value_type; - typedef integral_c_tag tag; -# 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 - typedef integral_c< T, static_cast<T>((value + 1)) > next; - typedef integral_c< T, static_cast<T>((value - 1)) > prior; - - - - - - - constexpr operator T() const { return static_cast<T>(this->value); } -}; - - -template< typename T, T N > -T const integral_c< T, N >::value; - - -} -# 33 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4 - - - - -namespace mpl_ { - -template< bool C > -struct integral_c<bool, C> -{ - static const bool value = C; - typedef integral_c_tag tag; - typedef integral_c type; - typedef bool value_type; - operator bool() const { return this->value; } -}; -} -# 18 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/largest_int.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/largest_int.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - -template< typename T > struct integral_rank; - -template<> struct integral_rank<bool> : int_<1> {}; -template<> struct integral_rank<signed char> : int_<2> {}; -template<> struct integral_rank<char> : int_<3> {}; -template<> struct integral_rank<unsigned char> : int_<4> {}; - -template<> struct integral_rank<wchar_t> : int_<5> {}; - -template<> struct integral_rank<short> : int_<6> {}; -template<> struct integral_rank<unsigned short> : int_<7> {}; -template<> struct integral_rank<int> : int_<8> {}; -template<> struct integral_rank<unsigned int> : int_<9> {}; -template<> struct integral_rank<long> : int_<10> {}; -template<> struct integral_rank<unsigned long> : int_<11> {}; - - -template<> struct integral_rank<long_long_type> : int_<12> {}; -template<> struct integral_rank<ulong_long_type>: int_<13> {}; - - -template< typename T1, typename T2 > struct largest_int - - : if_c< - ( integral_rank<T1>::value >= integral_rank<T2>::value ) - , T1 - , T2 - > -{ - - - - - - -}; - -}}} -# 19 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 2 3 4 - - - - - - - -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/aux_/arithmetic_op.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/plus.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct plus_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct plus_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct plus_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct plus_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct plus_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - , typename N3 = na, typename N4 = na, typename N5 = na - > -struct plus - : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3, typename N4 - > -struct plus< N1,N2,N3,N4,na > - - : plus< plus< plus< N1,N2 >, N3>, N4> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3 - > -struct plus< N1,N2,N3,na,na > - - : plus< plus< N1,N2 >, N3> -{ - - - - - -}; - -template< - typename N1, typename N2 - > -struct plus< N1,N2,na,na,na > - : plus_impl< - typename plus_tag<N1>::type - , typename plus_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - - - - - -}; - -template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { -template<> -struct plus_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : integral_c< - typename aux::largest_int< - typename N1::value_type - , typename N2::value_type - >::type - , ( N1::value - + N2::value - ) - > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 35 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/plus.hpp" 2 3 4 -# 13 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/or.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/or.hpp" 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 -# 43 "/usr/include/boost/mpl/or.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/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 -# 14 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/find_if.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/find_if.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/find_if_pred.hpp" 1 3 4 -# 14 "/usr/include/boost/mpl/aux_/find_if_pred.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/iter_apply.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/aux_/iter_apply.hpp" 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 -# 24 "/usr/include/boost/mpl/apply.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 -# 28 "/usr/include/boost/mpl/assert.hpp" 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 -# 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 -# 23 "/usr/include/boost/mpl/quote.hpp" 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 -# 18 "/usr/include/boost/mpl/aux_/iter_apply.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/deref.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/deref.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/msvc_type.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/msvc_type.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { -# 48 "/usr/include/boost/mpl/aux_/msvc_type.hpp" 3 4 -template< typename T > struct msvc_type -{ - typedef typename T::type type; -}; - -template<> struct msvc_type<int> -{ - typedef int type; -}; - - - -}}} -# 18 "/usr/include/boost/mpl/deref.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Iterator = na - > -struct deref -{ - - typedef typename Iterator::type type; - - - - -}; - -template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/aux_/iter_apply.hpp" 2 3 4 - -namespace boost { namespace mpl { namespace aux { - -template< - typename F - , typename Iterator - > -struct iter_apply1 - : apply1< F,typename deref<Iterator>::type > -{ -}; - -template< - typename F - , typename Iterator1 - , typename Iterator2 - > -struct iter_apply2 - : apply2< - F - , typename deref<Iterator1>::type - , typename deref<Iterator2>::type - > -{ -}; - -}}} -# 15 "/usr/include/boost/mpl/aux_/find_if_pred.hpp" 2 3 4 - - -namespace boost { namespace mpl { namespace aux { - -template< typename Predicate > -struct find_if_pred -{ - template< typename Iterator > - struct apply - { - typedef not_< aux::iter_apply1<Predicate,Iterator> > type; - }; -}; - -}}} -# 18 "/usr/include/boost/mpl/find_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/arg.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/find_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/iter_fold_if.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/iter_fold_if.hpp" 3 4 -# 1 "/usr/include/boost/mpl/begin_end.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/begin_end.hpp" 3 4 -# 1 "/usr/include/boost/mpl/begin_end_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/begin_end_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct begin_impl; -template< typename Tag > struct end_impl; - -template< typename Sequence > struct begin; -template< typename Sequence > struct end; - -}} -# 18 "/usr/include/boost/mpl/begin_end.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/sequence_tag_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/sequence_tag_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -struct nested_begin_end_tag; -struct non_sequence_tag; - -template< typename Sequence > struct sequence_tag; - -}} -# 19 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 2 3 4 - - -# 1 "/usr/include/boost/mpl/aux_/has_begin.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/has_begin.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { -template< typename T, typename fallback_ = boost::mpl::bool_<true> > struct has_begin { 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::begin>* = 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; }; -}}} -# 22 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/aux_/traits_lambda_spec.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 2 3 4 - - -namespace boost { namespace mpl { - - -namespace aux { - -template< typename Sequence > -struct begin_type -{ - typedef typename Sequence::begin type; -}; -template< typename Sequence > -struct end_type -{ - typedef typename Sequence::end type; -}; - -} - - - - - -template< typename Tag > -struct begin_impl -{ - template< typename Sequence > struct apply - { - typedef typename eval_if<aux::has_begin<Sequence, true_>, - aux::begin_type<Sequence>, void_>::type type; - }; -}; - -template< typename Tag > -struct end_impl -{ - template< typename Sequence > struct apply - { - typedef typename eval_if<aux::has_begin<Sequence, true_>, - aux::end_type<Sequence>, void_>::type type; - }; -}; -# 82 "/usr/include/boost/mpl/aux_/begin_end_impl.hpp" 3 4 -template<> struct begin_impl<nested_begin_end_tag> { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; -template<> struct end_impl<nested_begin_end_tag> { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; }; - - - - -template<> struct begin_impl<non_sequence_tag> { template< typename Sequence > struct apply { typedef void_ type; }; }; -template<> struct end_impl<non_sequence_tag> { template< typename Sequence > struct apply { typedef void_ type; }; }; -template<> struct begin_impl<na> { template< typename Sequence > struct apply { typedef void_ type; }; }; -template<> struct end_impl<na> { template< typename Sequence > struct apply { typedef void_ type; }; }; - - - - - - - -}} -# 19 "/usr/include/boost/mpl/begin_end.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/sequence_tag.hpp" 1 3 4 -# 26 "/usr/include/boost/mpl/sequence_tag.hpp" 3 4 -namespace boost { namespace mpl { -# 78 "/usr/include/boost/mpl/sequence_tag.hpp" 3 4 -namespace aux { - -template< bool has_tag_, bool has_begin_ > -struct sequence_tag_impl -{ - - - template< typename Sequence > struct result2_; -}; -# 98 "/usr/include/boost/mpl/sequence_tag.hpp" 3 4 -template<> struct sequence_tag_impl<true,true> { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; -template<> struct sequence_tag_impl<true,false> { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; -template<> struct sequence_tag_impl<false,true> { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; }; -template<> struct sequence_tag_impl<false,false> { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; }; - - - -} - -template< - typename Sequence = na - > -struct sequence_tag - : aux::sequence_tag_impl< - ::boost::mpl::aux::has_tag<Sequence>::value - , ::boost::mpl::aux::has_begin<Sequence>::value - >::template result2_<Sequence> -{ -}; - - - -template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/begin_end.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - - - - -template< - typename Sequence = na - > -struct begin -{ - typedef typename sequence_tag<Sequence>::type tag_; - typedef typename begin_impl< tag_ > - ::template apply< Sequence >::type type; - - -}; - -template< - typename Sequence = na - > -struct end -{ - typedef typename sequence_tag<Sequence>::type tag_; - typedef typename end_impl< tag_ > - ::template apply< Sequence >::type type; - - -}; - -template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; } -template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/logical.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/logical.hpp" 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 -# 19 "/usr/include/boost/mpl/logical.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/iter_fold_if.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; - }; -}; - - - -}} -# 21 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 - - -# 1 "/usr/include/boost/mpl/pair.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/pair.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T1 = na - , typename T2 = na - > -struct pair -{ - typedef pair type; - typedef T1 first; - typedef T2 second; - - -}; - -template< - typename P = na - > -struct first -{ - - typedef typename P::first type; - - - - -}; - -template< - typename P = na - > -struct second -{ - - typedef typename P::second type; - - - - -}; - - -template<> struct pair< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pair< T1 , T2 > { }; }; template< typename Tag > struct lambda< pair< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef pair< na , na > result_; typedef pair< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< pair< T1 , T2 > > : int_<2> { }; template<> struct template_arity< pair< na , na > > : int_<-1> { }; } -template<> struct first< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : first< T1 > { }; }; template< typename Tag > struct lambda< first< na > , Tag , int_<-1> > { typedef false_ is_le; typedef first< na > result_; typedef first< na > type; }; namespace aux { template< typename T1 > struct template_arity< first< T1 > > : int_<1> { }; template<> struct template_arity< first< na > > : int_<-1> { }; } -template<> struct second< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : second< T1 > { }; }; template< typename Tag > struct lambda< second< na > , Tag , int_<-1> > { typedef false_ is_le; typedef second< na > result_; typedef second< na > type; }; namespace aux { template< typename T1 > struct template_arity< second< T1 > > : int_<1> { }; template<> struct template_arity< second< na > > : int_<-1> { }; } - -}} -# 24 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 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> { }; } - -}} -# 20 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 2 3 4 - - -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 2 3 4 -# 32 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.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/iter_fold_if_impl.hpp" 1 3 4 -# 13 "/usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - -template< typename Iterator, typename State > -struct iter_fold_if_null_step -{ - typedef State state; - typedef Iterator iterator; -}; - -template< bool > -struct iter_fold_if_step_impl -{ - template< - typename Iterator - , typename State - , typename StateOp - , typename IteratorOp - > - struct result_ - { - typedef typename apply2< StateOp,State,Iterator >::type state; - typedef typename IteratorOp::type iterator; - }; -}; - -template<> -struct iter_fold_if_step_impl<false> -{ - template< - typename Iterator - , typename State - , typename StateOp - , typename IteratorOp - > - struct result_ - { - typedef State state; - typedef Iterator iterator; - }; -}; - -template< - typename Iterator - , typename State - , typename ForwardOp - , typename Predicate - > -struct iter_fold_if_forward_step -{ - typedef typename apply2< Predicate,State,Iterator >::type not_last; - typedef typename iter_fold_if_step_impl< - not_last::value - >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; - - typedef typename impl_::state state; - typedef typename impl_::iterator iterator; -}; - -template< - typename Iterator - , typename State - , typename BackwardOp - , typename Predicate - > -struct iter_fold_if_backward_step -{ - typedef typename apply2< Predicate,State,Iterator >::type not_last; - typedef typename iter_fold_if_step_impl< - not_last::value - >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; - - typedef typename impl_::state state; - typedef typename impl_::iterator iterator; -}; - -template< - typename Iterator - , typename State - , typename ForwardOp - , typename ForwardPredicate - , typename BackwardOp - , typename BackwardPredicate - > -struct iter_fold_if_impl -{ - private: - typedef iter_fold_if_null_step< Iterator,State > forward_step0; - typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; - typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; - typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; - typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - - - typedef typename if_< - typename forward_step4::not_last - , iter_fold_if_impl< - typename forward_step4::iterator - , typename forward_step4::state - , ForwardOp - , ForwardPredicate - , BackwardOp - , BackwardPredicate - > - , iter_fold_if_null_step< - typename forward_step4::iterator - , typename forward_step4::state - > - >::type backward_step4; - - typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; - typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; - typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; - typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; - - - public: - typedef typename backward_step0::state state; - typedef typename backward_step4::iterator iterator; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 33 "/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 2 3 4 -# 26 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4 -# 24 "/usr/include/boost/type_traits/is_same.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; - -} -# 25 "/usr/include/boost/type_traits/is_same.hpp" 2 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 {}; - - - - - - - -} -# 32 "/usr/include/boost/mpl/iter_fold_if.hpp" 2 3 4 - -namespace boost { namespace mpl { - -namespace aux { - -template< typename Predicate, typename LastIterator > -struct iter_fold_if_pred -{ - template< typename State, typename Iterator > struct apply - - : and_< - not_< is_same<Iterator,LastIterator> > - , apply1<Predicate,Iterator> - > - { - - - - - - - - }; -}; - -} - -template< - typename Sequence = na - , typename State = na - , typename ForwardOp = na - , typename ForwardPredicate = na - , typename BackwardOp = na - , typename BackwardPredicate = na - > -struct iter_fold_if -{ - - typedef typename begin<Sequence>::type first_; - typedef typename end<Sequence>::type last_; - - typedef typename eval_if< - is_na<BackwardPredicate> - , if_< is_na<BackwardOp>, always<false_>, always<true_> > - , identity<BackwardPredicate> - >::type backward_pred_; - - - - struct result_ : - - - - aux::iter_fold_if_impl< - first_ - , State - , ForwardOp - , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > - , BackwardOp - , backward_pred_ - > - - { }; - - - - -public: - - typedef pair< - typename result_::state - , typename result_::iterator - > type; - - - - - - -}; - -template<> struct iter_fold_if< na , na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct apply : iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > { }; }; template< typename Tag > struct lambda< iter_fold_if< na , na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold_if< na , na , na , na , na , na > result_; typedef iter_fold_if< na , na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > > : int_<6> { }; template<> struct template_arity< iter_fold_if< na , na , na , na , na , na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/find_if.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - - - -template< - typename Sequence = na - , typename Predicate = na - > -struct find_if -{ - typedef typename iter_fold_if< - Sequence - , void - , mpl::arg<1> - , protect< aux::find_if_pred<Predicate> > - >::type result_; - - typedef typename second<result_>::type type; - - -}; - -template<> struct find_if< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find_if< T1 , T2 > { }; }; template< typename Tag > struct lambda< find_if< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find_if< na , na > result_; typedef find_if< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find_if< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find_if< na , na > > : int_<-1> { }; } - -}} -# 15 "/usr/include/boost/multiprecision/number.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 16 "/usr/include/boost/multiprecision/number.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; - - - -} -# 17 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/is_signed.hpp" 1 3 4 -# 13 "/usr/include/boost/type_traits/is_signed.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{}; - - - - -} -# 14 "/usr/include/boost/type_traits/is_signed.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; - - - -} -# 15 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4 -# 14 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 -# 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4 -# 16 "/usr/include/boost/type_traits/intrinsics.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 -# 17 "/usr/include/boost/type_traits/intrinsics.hpp" 2 3 4 -# 15 "/usr/include/boost/type_traits/is_enum.hpp" 2 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)> {}; - - - -} -# 16 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/syslimits.h" 1 3 4 - - - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 194 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/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 -# 183 "/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 -# 184 "/usr/include/limits.h" 2 3 4 - - - -# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 -# 188 "/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 -# 192 "/usr/include/limits.h" 2 3 4 -# 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 2 3 4 -# 8 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/syslimits.h" 2 3 4 -# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 2 3 4 -# 43 "/usr/include/c++/9.2.0/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{}; - - - - - - - -} -# 18 "/usr/include/boost/multiprecision/number.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++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/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{}; - - -} -# 19 "/usr/include/boost/multiprecision/number.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{}; - - - template<> struct is_floating_point<__float128> : public true_type{}; - - -} -# 20 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 - -# 1 "/usr/include/boost/type_traits/is_complex.hpp" 1 3 4 -# 12 "/usr/include/boost/type_traits/is_complex.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/complex" 1 3 4 -# 39 "/usr/include/c++/9.2.0/complex" 3 4 - -# 40 "/usr/include/c++/9.2.0/complex" 3 - - - - -# 1 "/usr/include/c++/9.2.0/cmath" 1 3 -# 39 "/usr/include/c++/9.2.0/cmath" 3 - -# 40 "/usr/include/c++/9.2.0/cmath" 3 -# 45 "/usr/include/c++/9.2.0/complex" 2 3 - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 63 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> class complex; - template<> class complex<float>; - template<> class complex<double>; - template<> class complex<long double>; - - - template<typename _Tp> _Tp abs(const complex<_Tp>&); - - template<typename _Tp> _Tp arg(const complex<_Tp>&); - - template<typename _Tp> _Tp norm(const complex<_Tp>&); - - - template<typename _Tp> - complex<_Tp> conj(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0); - - - - template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> log(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int); - - template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&); - - template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, - const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&); - - template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&); -# 122 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - struct complex - { - - typedef _Tp value_type; - - - - constexpr complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) - : _M_real(__r), _M_imag(__i) { } - - - - constexpr complex(const complex&) = default; - - - - template<typename _Up> - constexpr complex(const complex<_Up>& __z) - : _M_real(__z.real()), _M_imag(__z.imag()) { } - - - - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr _Tp - real() const { return _M_real; } - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr _Tp - imag() const { return _M_imag; } -# 173 "/usr/include/c++/9.2.0/complex" 3 - void - real(_Tp __val) { _M_real = __val; } - - void - imag(_Tp __val) { _M_imag = __val; } - - - complex<_Tp>& operator=(const _Tp&); - - - - complex<_Tp>& - operator+=(const _Tp& __t) - { - _M_real += __t; - return *this; - } - - - - complex<_Tp>& - operator-=(const _Tp& __t) - { - _M_real -= __t; - return *this; - } - - - complex<_Tp>& operator*=(const _Tp&); - - complex<_Tp>& operator/=(const _Tp&); - - - - complex& operator=(const complex&) = default; - - - - template<typename _Up> - complex<_Tp>& operator=(const complex<_Up>&); - - template<typename _Up> - complex<_Tp>& operator+=(const complex<_Up>&); - - template<typename _Up> - complex<_Tp>& operator-=(const complex<_Up>&); - - template<typename _Up> - complex<_Tp>& operator*=(const complex<_Up>&); - - template<typename _Up> - complex<_Tp>& operator/=(const complex<_Up>&); - - constexpr complex __rep() const - { return *this; } - - private: - _Tp _M_real; - _Tp _M_imag; - }; - - template<typename _Tp> - complex<_Tp>& - complex<_Tp>::operator=(const _Tp& __t) - { - _M_real = __t; - _M_imag = _Tp(); - return *this; - } - - - template<typename _Tp> - complex<_Tp>& - complex<_Tp>::operator*=(const _Tp& __t) - { - _M_real *= __t; - _M_imag *= __t; - return *this; - } - - - template<typename _Tp> - complex<_Tp>& - complex<_Tp>::operator/=(const _Tp& __t) - { - _M_real /= __t; - _M_imag /= __t; - return *this; - } - - template<typename _Tp> - template<typename _Up> - complex<_Tp>& - complex<_Tp>::operator=(const complex<_Up>& __z) - { - _M_real = __z.real(); - _M_imag = __z.imag(); - return *this; - } - - - template<typename _Tp> - template<typename _Up> - complex<_Tp>& - complex<_Tp>::operator+=(const complex<_Up>& __z) - { - _M_real += __z.real(); - _M_imag += __z.imag(); - return *this; - } - - - template<typename _Tp> - template<typename _Up> - complex<_Tp>& - complex<_Tp>::operator-=(const complex<_Up>& __z) - { - _M_real -= __z.real(); - _M_imag -= __z.imag(); - return *this; - } - - - - template<typename _Tp> - template<typename _Up> - complex<_Tp>& - complex<_Tp>::operator*=(const complex<_Up>& __z) - { - const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); - _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); - _M_real = __r; - return *this; - } - - - - template<typename _Tp> - template<typename _Up> - complex<_Tp>& - complex<_Tp>::operator/=(const complex<_Up>& __z) - { - const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); - const _Tp __n = std::norm(__z); - _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; - _M_real = __r / __n; - return *this; - } - - - - - template<typename _Tp> - inline complex<_Tp> - operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __x; - __r += __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator+(const complex<_Tp>& __x, const _Tp& __y) - { - complex<_Tp> __r = __x; - __r += __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator+(const _Tp& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __y; - __r += __x; - return __r; - } - - - - - template<typename _Tp> - inline complex<_Tp> - operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __x; - __r -= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator-(const complex<_Tp>& __x, const _Tp& __y) - { - complex<_Tp> __r = __x; - __r -= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator-(const _Tp& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = -__y; - __r += __x; - return __r; - } - - - - - template<typename _Tp> - inline complex<_Tp> - operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __x; - __r *= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator*(const complex<_Tp>& __x, const _Tp& __y) - { - complex<_Tp> __r = __x; - __r *= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator*(const _Tp& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __y; - __r *= __x; - return __r; - } - - - - - template<typename _Tp> - inline complex<_Tp> - operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __x; - __r /= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator/(const complex<_Tp>& __x, const _Tp& __y) - { - complex<_Tp> __r = __x; - __r /= __y; - return __r; - } - - template<typename _Tp> - inline complex<_Tp> - operator/(const _Tp& __x, const complex<_Tp>& __y) - { - complex<_Tp> __r = __x; - __r /= __y; - return __r; - } - - - - template<typename _Tp> - inline complex<_Tp> - operator+(const complex<_Tp>& __x) - { return __x; } - - - template<typename _Tp> - inline complex<_Tp> - operator-(const complex<_Tp>& __x) - { return complex<_Tp>(-__x.real(), -__x.imag()); } - - - - template<typename _Tp> - inline constexpr bool - operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __x.real() == __y.real() && __x.imag() == __y.imag(); } - - template<typename _Tp> - inline constexpr bool - operator==(const complex<_Tp>& __x, const _Tp& __y) - { return __x.real() == __y && __x.imag() == _Tp(); } - - template<typename _Tp> - inline constexpr bool - operator==(const _Tp& __x, const complex<_Tp>& __y) - { return __x == __y.real() && _Tp() == __y.imag(); } - - - - - template<typename _Tp> - inline constexpr bool - operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __x.real() != __y.real() || __x.imag() != __y.imag(); } - - template<typename _Tp> - inline constexpr bool - operator!=(const complex<_Tp>& __x, const _Tp& __y) - { return __x.real() != __y || __x.imag() != _Tp(); } - - template<typename _Tp> - inline constexpr bool - operator!=(const _Tp& __x, const complex<_Tp>& __y) - { return __x != __y.real() || _Tp() != __y.imag(); } - - - - template<typename _Tp, typename _CharT, class _Traits> - basic_istream<_CharT, _Traits>& - operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) - { - bool __fail = true; - _CharT __ch; - if (__is >> __ch) - { - if (_Traits::eq(__ch, __is.widen('('))) - { - _Tp __u; - if (__is >> __u >> __ch) - { - const _CharT __rparen = __is.widen(')'); - if (_Traits::eq(__ch, __rparen)) - { - __x = __u; - __fail = false; - } - else if (_Traits::eq(__ch, __is.widen(','))) - { - _Tp __v; - if (__is >> __v >> __ch) - { - if (_Traits::eq(__ch, __rparen)) - { - __x = complex<_Tp>(__u, __v); - __fail = false; - } - else - __is.putback(__ch); - } - } - else - __is.putback(__ch); - } - } - else - { - __is.putback(__ch); - _Tp __u; - if (__is >> __u) - { - __x = __u; - __fail = false; - } - } - } - if (__fail) - __is.setstate(ios_base::failbit); - return __is; - } - - - template<typename _Tp, typename _CharT, class _Traits> - basic_ostream<_CharT, _Traits>& - operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) - { - basic_ostringstream<_CharT, _Traits> __s; - __s.flags(__os.flags()); - __s.imbue(__os.getloc()); - __s.precision(__os.precision()); - __s << '(' << __x.real() << ',' << __x.imag() << ')'; - return __os << __s.str(); - } - - - - template<typename _Tp> - constexpr _Tp - real(const complex<_Tp>& __z) - { return __z.real(); } - - template<typename _Tp> - constexpr _Tp - imag(const complex<_Tp>& __z) - { return __z.imag(); } -# 592 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline _Tp - __complex_abs(const complex<_Tp>& __z) - { - _Tp __x = __z.real(); - _Tp __y = __z.imag(); - const _Tp __s = std::max(abs(__x), abs(__y)); - if (__s == _Tp()) - return __s; - __x /= __s; - __y /= __s; - return __s * sqrt(__x * __x + __y * __y); - } - - - inline float - __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } - - inline double - __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } - - inline long double - __complex_abs(const __complex__ long double& __z) - { return __builtin_cabsl(__z); } - - template<typename _Tp> - inline _Tp - abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } -# 628 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline _Tp - __complex_arg(const complex<_Tp>& __z) - { return atan2(__z.imag(), __z.real()); } - - - inline float - __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } - - inline double - __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } - - inline long double - __complex_arg(const __complex__ long double& __z) - { return __builtin_cargl(__z); } - - template<typename _Tp> - inline _Tp - arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } -# 658 "/usr/include/c++/9.2.0/complex" 3 - template<bool> - struct _Norm_helper - { - template<typename _Tp> - static inline _Tp _S_do_it(const complex<_Tp>& __z) - { - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return __x * __x + __y * __y; - } - }; - - template<> - struct _Norm_helper<true> - { - template<typename _Tp> - static inline _Tp _S_do_it(const complex<_Tp>& __z) - { - - - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return __x * __x + __y * __y; - } - }; - - template<typename _Tp> - inline _Tp - norm(const complex<_Tp>& __z) - { - return _Norm_helper<__is_floating<_Tp>::__value - && !0>::_S_do_it(__z); - } - - template<typename _Tp> - inline complex<_Tp> - polar(const _Tp& __rho, const _Tp& __theta) - { - ; - return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); - } - - template<typename _Tp> - inline complex<_Tp> - conj(const complex<_Tp>& __z) - { return complex<_Tp>(__z.real(), -__z.imag()); } - - - - - template<typename _Tp> - inline complex<_Tp> - __complex_cos(const complex<_Tp>& __z) - { - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); - } - - - inline __complex__ float - __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } - - inline __complex__ double - __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } - - inline __complex__ long double - __complex_cos(const __complex__ long double& __z) - { return __builtin_ccosl(__z); } - - template<typename _Tp> - inline complex<_Tp> - cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } - - - - - - - - template<typename _Tp> - inline complex<_Tp> - __complex_cosh(const complex<_Tp>& __z) - { - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); - } - - - inline __complex__ float - __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } - - inline __complex__ double - __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } - - inline __complex__ long double - __complex_cosh(const __complex__ long double& __z) - { return __builtin_ccoshl(__z); } - - template<typename _Tp> - inline complex<_Tp> - cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } - - - - - - - - template<typename _Tp> - inline complex<_Tp> - __complex_exp(const complex<_Tp>& __z) - { return std::polar<_Tp>(exp(__z.real()), __z.imag()); } - - - inline __complex__ float - __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } - - inline __complex__ double - __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } - - inline __complex__ long double - __complex_exp(const __complex__ long double& __z) - { return __builtin_cexpl(__z); } - - template<typename _Tp> - inline complex<_Tp> - exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } -# 795 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline complex<_Tp> - __complex_log(const complex<_Tp>& __z) - { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } - - - inline __complex__ float - __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } - - inline __complex__ double - __complex_log(__complex__ double __z) { return __builtin_clog(__z); } - - inline __complex__ long double - __complex_log(const __complex__ long double& __z) - { return __builtin_clogl(__z); } - - template<typename _Tp> - inline complex<_Tp> - log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } - - - - - - - template<typename _Tp> - inline complex<_Tp> - log10(const complex<_Tp>& __z) - { return std::log(__z) / log(_Tp(10.0)); } - - - template<typename _Tp> - inline complex<_Tp> - __complex_sin(const complex<_Tp>& __z) - { - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); - } - - - inline __complex__ float - __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } - - inline __complex__ double - __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } - - inline __complex__ long double - __complex_sin(const __complex__ long double& __z) - { return __builtin_csinl(__z); } - - template<typename _Tp> - inline complex<_Tp> - sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } - - - - - - - - template<typename _Tp> - inline complex<_Tp> - __complex_sinh(const complex<_Tp>& __z) - { - const _Tp __x = __z.real(); - const _Tp __y = __z.imag(); - return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); - } - - - inline __complex__ float - __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } - - inline __complex__ double - __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } - - inline __complex__ long double - __complex_sinh(const __complex__ long double& __z) - { return __builtin_csinhl(__z); } - - template<typename _Tp> - inline complex<_Tp> - sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } -# 887 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - complex<_Tp> - __complex_sqrt(const complex<_Tp>& __z) - { - _Tp __x = __z.real(); - _Tp __y = __z.imag(); - - if (__x == _Tp()) - { - _Tp __t = sqrt(abs(__y) / 2); - return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); - } - else - { - _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); - _Tp __u = __t / 2; - return __x > _Tp() - ? complex<_Tp>(__u, __y / __t) - : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); - } - } - - - inline __complex__ float - __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } - - inline __complex__ double - __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } - - inline __complex__ long double - __complex_sqrt(const __complex__ long double& __z) - { return __builtin_csqrtl(__z); } - - template<typename _Tp> - inline complex<_Tp> - sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } -# 931 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline complex<_Tp> - __complex_tan(const complex<_Tp>& __z) - { return std::sin(__z) / std::cos(__z); } - - - inline __complex__ float - __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } - - inline __complex__ double - __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } - - inline __complex__ long double - __complex_tan(const __complex__ long double& __z) - { return __builtin_ctanl(__z); } - - template<typename _Tp> - inline complex<_Tp> - tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } -# 959 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline complex<_Tp> - __complex_tanh(const complex<_Tp>& __z) - { return std::sinh(__z) / std::cosh(__z); } - - - inline __complex__ float - __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } - - inline __complex__ double - __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } - - inline __complex__ long double - __complex_tanh(const __complex__ long double& __z) - { return __builtin_ctanhl(__z); } - - template<typename _Tp> - inline complex<_Tp> - tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } -# 988 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - complex<_Tp> - __complex_pow_unsigned(complex<_Tp> __x, unsigned __n) - { - complex<_Tp> __y = __n % 2 ? __x : complex<_Tp>(1); - - while (__n >>= 1) - { - __x *= __x; - if (__n % 2) - __y *= __x; - } - - return __y; - } - - - - - - - - template<typename _Tp> - inline complex<_Tp> - pow(const complex<_Tp>& __z, int __n) - { - return __n < 0 - ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -(unsigned)__n) - : std::__complex_pow_unsigned(__z, __n); - } - - template<typename _Tp> - complex<_Tp> - pow(const complex<_Tp>& __x, const _Tp& __y) - { - - - - - if (__x.imag() == _Tp() && __x.real() > _Tp()) - return pow(__x.real(), __y); - - complex<_Tp> __t = std::log(__x); - return std::polar<_Tp>(exp(__y * __t.real()), __y * __t.imag()); - } - - template<typename _Tp> - inline complex<_Tp> - __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } - - - inline __complex__ float - __complex_pow(__complex__ float __x, __complex__ float __y) - { return __builtin_cpowf(__x, __y); } - - inline __complex__ double - __complex_pow(__complex__ double __x, __complex__ double __y) - { return __builtin_cpow(__x, __y); } - - inline __complex__ long double - __complex_pow(const __complex__ long double& __x, - const __complex__ long double& __y) - { return __builtin_cpowl(__x, __y); } - - template<typename _Tp> - inline complex<_Tp> - pow(const complex<_Tp>& __x, const complex<_Tp>& __y) - { return __complex_pow(__x.__rep(), __y.__rep()); } - - - - - - - - template<typename _Tp> - inline complex<_Tp> - pow(const _Tp& __x, const complex<_Tp>& __y) - { - return __x > _Tp() ? std::polar<_Tp>(pow(__x, __y.real()), - __y.imag() * log(__x)) - : std::pow(complex<_Tp>(__x), __y); - } - - - - template<> - struct complex<float> - { - typedef float value_type; - typedef __complex__ float _ComplexT; - - constexpr complex(_ComplexT __z) : _M_value(__z) { } - - constexpr complex(float __r = 0.0f, float __i = 0.0f) - - : _M_value{ __r, __i } { } - - - - - - - - explicit constexpr complex(const complex<double>&); - explicit constexpr complex(const complex<long double>&); - - - - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr float - real() const { return __real__ _M_value; } - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr float - imag() const { return __imag__ _M_value; } -# 1122 "/usr/include/c++/9.2.0/complex" 3 - void - real(float __val) { __real__ _M_value = __val; } - - void - imag(float __val) { __imag__ _M_value = __val; } - - complex& - operator=(float __f) - { - _M_value = __f; - return *this; - } - - complex& - operator+=(float __f) - { - _M_value += __f; - return *this; - } - - complex& - operator-=(float __f) - { - _M_value -= __f; - return *this; - } - - complex& - operator*=(float __f) - { - _M_value *= __f; - return *this; - } - - complex& - operator/=(float __f) - { - _M_value /= __f; - return *this; - } - - - - - constexpr complex& operator=(const complex&) = default; - - - template<typename _Tp> - complex& - operator=(const complex<_Tp>& __z) - { - __real__ _M_value = __z.real(); - __imag__ _M_value = __z.imag(); - return *this; - } - - template<typename _Tp> - complex& - operator+=(const complex<_Tp>& __z) - { - _M_value += __z.__rep(); - return *this; - } - - template<class _Tp> - complex& - operator-=(const complex<_Tp>& __z) - { - _M_value -= __z.__rep(); - return *this; - } - - template<class _Tp> - complex& - operator*=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value *= __t; - return *this; - } - - template<class _Tp> - complex& - operator/=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value /= __t; - return *this; - } - - constexpr _ComplexT __rep() const { return _M_value; } - - private: - _ComplexT _M_value; - }; - - - - template<> - struct complex<double> - { - typedef double value_type; - typedef __complex__ double _ComplexT; - - constexpr complex(_ComplexT __z) : _M_value(__z) { } - - constexpr complex(double __r = 0.0, double __i = 0.0) - - : _M_value{ __r, __i } { } - - - - - - - - constexpr complex(const complex<float>& __z) - : _M_value(__z.__rep()) { } - - explicit constexpr complex(const complex<long double>&); - - - - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr double - real() const { return __real__ _M_value; } - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr double - imag() const { return __imag__ _M_value; } -# 1269 "/usr/include/c++/9.2.0/complex" 3 - void - real(double __val) { __real__ _M_value = __val; } - - void - imag(double __val) { __imag__ _M_value = __val; } - - complex& - operator=(double __d) - { - _M_value = __d; - return *this; - } - - complex& - operator+=(double __d) - { - _M_value += __d; - return *this; - } - - complex& - operator-=(double __d) - { - _M_value -= __d; - return *this; - } - - complex& - operator*=(double __d) - { - _M_value *= __d; - return *this; - } - - complex& - operator/=(double __d) - { - _M_value /= __d; - return *this; - } - - - - constexpr complex& operator=(const complex&) = default; - - - template<typename _Tp> - complex& - operator=(const complex<_Tp>& __z) - { - _M_value = __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator+=(const complex<_Tp>& __z) - { - _M_value += __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator-=(const complex<_Tp>& __z) - { - _M_value -= __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator*=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value *= __t; - return *this; - } - - template<typename _Tp> - complex& - operator/=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value /= __t; - return *this; - } - - constexpr _ComplexT __rep() const { return _M_value; } - - private: - _ComplexT _M_value; - }; - - - - template<> - struct complex<long double> - { - typedef long double value_type; - typedef __complex__ long double _ComplexT; - - constexpr complex(_ComplexT __z) : _M_value(__z) { } - - constexpr complex(long double __r = 0.0L, - long double __i = 0.0L) - - : _M_value{ __r, __i } { } - - - - - - - - constexpr complex(const complex<float>& __z) - : _M_value(__z.__rep()) { } - - constexpr complex(const complex<double>& __z) - : _M_value(__z.__rep()) { } - - - - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr long double - real() const { return __real__ _M_value; } - - __attribute ((__abi_tag__ ("cxx11"))) - constexpr long double - imag() const { return __imag__ _M_value; } -# 1416 "/usr/include/c++/9.2.0/complex" 3 - void - real(long double __val) { __real__ _M_value = __val; } - - void - imag(long double __val) { __imag__ _M_value = __val; } - - complex& - operator=(long double __r) - { - _M_value = __r; - return *this; - } - - complex& - operator+=(long double __r) - { - _M_value += __r; - return *this; - } - - complex& - operator-=(long double __r) - { - _M_value -= __r; - return *this; - } - - complex& - operator*=(long double __r) - { - _M_value *= __r; - return *this; - } - - complex& - operator/=(long double __r) - { - _M_value /= __r; - return *this; - } - - - - constexpr complex& operator=(const complex&) = default; - - - template<typename _Tp> - complex& - operator=(const complex<_Tp>& __z) - { - _M_value = __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator+=(const complex<_Tp>& __z) - { - _M_value += __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator-=(const complex<_Tp>& __z) - { - _M_value -= __z.__rep(); - return *this; - } - - template<typename _Tp> - complex& - operator*=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value *= __t; - return *this; - } - - template<typename _Tp> - complex& - operator/=(const complex<_Tp>& __z) - { - const _ComplexT __t = __z.__rep(); - _M_value /= __t; - return *this; - } - - constexpr _ComplexT __rep() const { return _M_value; } - - private: - _ComplexT _M_value; - }; - - - - inline constexpr - complex<float>::complex(const complex<double>& __z) - : _M_value(__z.__rep()) { } - - inline constexpr - complex<float>::complex(const complex<long double>& __z) - : _M_value(__z.__rep()) { } - - inline constexpr - complex<double>::complex(const complex<long double>& __z) - : _M_value(__z.__rep()) { } - - - - - - extern template istream& operator>>(istream&, complex<float>&); - extern template ostream& operator<<(ostream&, const complex<float>&); - extern template istream& operator>>(istream&, complex<double>&); - extern template ostream& operator<<(ostream&, const complex<double>&); - extern template istream& operator>>(istream&, complex<long double>&); - extern template ostream& operator<<(ostream&, const complex<long double>&); - - - extern template wistream& operator>>(wistream&, complex<float>&); - extern template wostream& operator<<(wostream&, const complex<float>&); - extern template wistream& operator>>(wistream&, complex<double>&); - extern template wostream& operator<<(wostream&, const complex<double>&); - extern template wistream& operator>>(wistream&, complex<long double>&); - extern template wostream& operator<<(wostream&, const complex<long double>&); - - - - - - -} - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - - - - template<typename _Tp, typename _Up> - struct __promote_2<std::complex<_Tp>, _Up> - { - public: - typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type; - }; - - template<typename _Tp, typename _Up> - struct __promote_2<_Tp, std::complex<_Up> > - { - public: - typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type; - }; - - template<typename _Tp, typename _Up> - struct __promote_2<std::complex<_Tp>, std::complex<_Up> > - { - public: - typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type; - }; - - -} - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - template<typename _Tp> std::complex<_Tp> acos(const std::complex<_Tp>&); - template<typename _Tp> std::complex<_Tp> asin(const std::complex<_Tp>&); - template<typename _Tp> std::complex<_Tp> atan(const std::complex<_Tp>&); - - template<typename _Tp> std::complex<_Tp> acosh(const std::complex<_Tp>&); - template<typename _Tp> std::complex<_Tp> asinh(const std::complex<_Tp>&); - template<typename _Tp> std::complex<_Tp> atanh(const std::complex<_Tp>&); - - template<typename _Tp> _Tp fabs(const std::complex<_Tp>&); - - template<typename _Tp> - inline std::complex<_Tp> - __complex_acos(const std::complex<_Tp>& __z) - { - const std::complex<_Tp> __t = std::asin(__z); - const _Tp __pi_2 = 1.5707963267948966192313216916397514L; - return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag()); - } - - - inline __complex__ float - __complex_acos(__complex__ float __z) - { return __builtin_cacosf(__z); } - - inline __complex__ double - __complex_acos(__complex__ double __z) - { return __builtin_cacos(__z); } - - inline __complex__ long double - __complex_acos(const __complex__ long double& __z) - { return __builtin_cacosl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - acos(const std::complex<_Tp>& __z) - { return __complex_acos(__z.__rep()); } -# 1632 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline std::complex<_Tp> - __complex_asin(const std::complex<_Tp>& __z) - { - std::complex<_Tp> __t(-__z.imag(), __z.real()); - __t = std::asinh(__t); - return std::complex<_Tp>(__t.imag(), -__t.real()); - } - - - inline __complex__ float - __complex_asin(__complex__ float __z) - { return __builtin_casinf(__z); } - - inline __complex__ double - __complex_asin(__complex__ double __z) - { return __builtin_casin(__z); } - - inline __complex__ long double - __complex_asin(const __complex__ long double& __z) - { return __builtin_casinl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - asin(const std::complex<_Tp>& __z) - { return __complex_asin(__z.__rep()); } -# 1668 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - std::complex<_Tp> - __complex_atan(const std::complex<_Tp>& __z) - { - const _Tp __r2 = __z.real() * __z.real(); - const _Tp __x = _Tp(1.0) - __r2 - __z.imag() * __z.imag(); - - _Tp __num = __z.imag() + _Tp(1.0); - _Tp __den = __z.imag() - _Tp(1.0); - - __num = __r2 + __num * __num; - __den = __r2 + __den * __den; - - return std::complex<_Tp>(_Tp(0.5) * atan2(_Tp(2.0) * __z.real(), __x), - _Tp(0.25) * log(__num / __den)); - } - - - inline __complex__ float - __complex_atan(__complex__ float __z) - { return __builtin_catanf(__z); } - - inline __complex__ double - __complex_atan(__complex__ double __z) - { return __builtin_catan(__z); } - - inline __complex__ long double - __complex_atan(const __complex__ long double& __z) - { return __builtin_catanl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - atan(const std::complex<_Tp>& __z) - { return __complex_atan(__z.__rep()); } -# 1712 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - std::complex<_Tp> - __complex_acosh(const std::complex<_Tp>& __z) - { - - return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) - + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); - } - - - inline __complex__ float - __complex_acosh(__complex__ float __z) - { return __builtin_cacoshf(__z); } - - inline __complex__ double - __complex_acosh(__complex__ double __z) - { return __builtin_cacosh(__z); } - - inline __complex__ long double - __complex_acosh(const __complex__ long double& __z) - { return __builtin_cacoshl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - acosh(const std::complex<_Tp>& __z) - { return __complex_acosh(__z.__rep()); } -# 1748 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - std::complex<_Tp> - __complex_asinh(const std::complex<_Tp>& __z) - { - std::complex<_Tp> __t((__z.real() - __z.imag()) - * (__z.real() + __z.imag()) + _Tp(1.0), - _Tp(2.0) * __z.real() * __z.imag()); - __t = std::sqrt(__t); - - return std::log(__t + __z); - } - - - inline __complex__ float - __complex_asinh(__complex__ float __z) - { return __builtin_casinhf(__z); } - - inline __complex__ double - __complex_asinh(__complex__ double __z) - { return __builtin_casinh(__z); } - - inline __complex__ long double - __complex_asinh(const __complex__ long double& __z) - { return __builtin_casinhl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - asinh(const std::complex<_Tp>& __z) - { return __complex_asinh(__z.__rep()); } -# 1787 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - std::complex<_Tp> - __complex_atanh(const std::complex<_Tp>& __z) - { - const _Tp __i2 = __z.imag() * __z.imag(); - const _Tp __x = _Tp(1.0) - __i2 - __z.real() * __z.real(); - - _Tp __num = _Tp(1.0) + __z.real(); - _Tp __den = _Tp(1.0) - __z.real(); - - __num = __i2 + __num * __num; - __den = __i2 + __den * __den; - - return std::complex<_Tp>(_Tp(0.25) * (log(__num) - log(__den)), - _Tp(0.5) * atan2(_Tp(2.0) * __z.imag(), __x)); - } - - - inline __complex__ float - __complex_atanh(__complex__ float __z) - { return __builtin_catanhf(__z); } - - inline __complex__ double - __complex_atanh(__complex__ double __z) - { return __builtin_catanh(__z); } - - inline __complex__ long double - __complex_atanh(const __complex__ long double& __z) - { return __builtin_catanhl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - atanh(const std::complex<_Tp>& __z) - { return __complex_atanh(__z.__rep()); } -# 1831 "/usr/include/c++/9.2.0/complex" 3 - template<typename _Tp> - inline _Tp - - - - fabs(const std::complex<_Tp>& __z) - { return std::abs(__z); } - - - template<typename _Tp> - inline typename __gnu_cxx::__promote<_Tp>::__type - arg(_Tp __x) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - - return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) - : __type(); - - - - } - - template<typename _Tp> - constexpr inline typename __gnu_cxx::__promote<_Tp>::__type - imag(_Tp) - { return _Tp(); } - - template<typename _Tp> - inline typename __gnu_cxx::__promote<_Tp>::__type - norm(_Tp __x) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return __type(__x) * __type(__x); - } - - template<typename _Tp> - constexpr inline typename __gnu_cxx::__promote<_Tp>::__type - real(_Tp __x) - { return __x; } - - template<typename _Tp, typename _Up> - inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type> - pow(const std::complex<_Tp>& __x, const _Up& __y) - { - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; - return std::pow(std::complex<__type>(__x), __type(__y)); - } - - template<typename _Tp, typename _Up> - inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type> - pow(const _Tp& __x, const std::complex<_Up>& __y) - { - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; - return std::pow(__type(__x), std::complex<__type>(__y)); - } - - template<typename _Tp, typename _Up> - inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type> - pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y) - { - typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; - return std::pow(std::complex<__type>(__x), - std::complex<__type>(__y)); - } - - - - template<typename _Tp> - std::complex<_Tp> proj(const std::complex<_Tp>&); - - template<typename _Tp> - std::complex<_Tp> - __complex_proj(const std::complex<_Tp>& __z) - { - const _Tp __den = (__z.real() * __z.real() - + __z.imag() * __z.imag() + _Tp(1.0)); - - return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den, - (_Tp(2.0) * __z.imag()) / __den); - } - - - inline __complex__ float - __complex_proj(__complex__ float __z) - { return __builtin_cprojf(__z); } - - inline __complex__ double - __complex_proj(__complex__ double __z) - { return __builtin_cproj(__z); } - - inline __complex__ long double - __complex_proj(const __complex__ long double& __z) - { return __builtin_cprojl(__z); } - - template<typename _Tp> - inline std::complex<_Tp> - proj(const std::complex<_Tp>& __z) - { return __complex_proj(__z.__rep()); } - - - - - - - - template<typename _Tp> - inline std::complex<typename __gnu_cxx::__promote<_Tp>::__type> - proj(_Tp __x) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return std::proj(std::complex<__type>(__x)); - } - - template<typename _Tp> - inline - std::complex<typename __gnu_cxx::__promote<_Tp>::__type> - conj(_Tp __x) - { - typedef typename __gnu_cxx::__promote<_Tp>::__type __type; - return std::complex<__type>(__x, -__type()); - } - - - -inline namespace literals { -inline namespace complex_literals { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wliteral-suffix" - - - constexpr std::complex<float> - operator""if(long double __num) - { return std::complex<float>{0.0F, static_cast<float>(__num)}; } - - constexpr std::complex<float> - operator""if(unsigned long long __num) - { return std::complex<float>{0.0F, static_cast<float>(__num)}; } - - constexpr std::complex<double> - operator""i(long double __num) - { return std::complex<double>{0.0, static_cast<double>(__num)}; } - - constexpr std::complex<double> - operator""i(unsigned long long __num) - { return std::complex<double>{0.0, static_cast<double>(__num)}; } - - constexpr std::complex<long double> - operator""il(long double __num) - { return std::complex<long double>{0.0L, __num}; } - - constexpr std::complex<long double> - operator""il(unsigned long long __num) - { return std::complex<long double>{0.0L, static_cast<long double>(__num)}; } - -#pragma GCC diagnostic pop -} -} - - - - -} -# 13 "/usr/include/boost/type_traits/is_complex.hpp" 2 3 4 - - -namespace boost { - - template <class T> struct is_complex : public false_type {}; - template <class T> struct is_complex<const T > : public is_complex<T>{}; - template <class T> struct is_complex<volatile const T > : public is_complex<T>{}; - template <class T> struct is_complex<volatile T > : public is_complex<T>{}; - template <class T> struct is_complex<std::complex<T> > : public true_type{}; - -} -# 22 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/make_unsigned.hpp" 1 3 4 -# 12 "/usr/include/boost/type_traits/make_unsigned.hpp" 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; - - - -} -# 13 "/usr/include/boost/type_traits/make_unsigned.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/type_traits/make_unsigned.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{}; - - - -} -# 21 "/usr/include/boost/type_traits/make_unsigned.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; - - - -} -# 22 "/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 -# 1 "/usr/include/boost/static_assert.hpp" 1 3 4 -# 24 "/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; - - - -} -# 23 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/throw_exception.hpp" 1 3 4 -# 36 "/usr/include/boost/throw_exception.hpp" 3 4 -# 1 "/usr/include/boost/exception/exception.hpp" 1 3 4 -# 15 "/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; } } - - - - -# 21 "/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) - { - } -# 245 "/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); - } - - template <class T> - struct - __attribute__((__visibility__("default"))) - wrapexcept: - public exception_detail::clone_impl<typename exception_detail::enable_error_info_return_type<T>::type> - { - typedef exception_detail::clone_impl<typename exception_detail::enable_error_info_return_type<T>::type> base_type; - public: - explicit - wrapexcept( typename exception_detail::enable_error_info_return_type<T>::type const & x ): - base_type( x ) - { - } - - ~wrapexcept() noexcept - { - } - }; - - namespace - exception_detail - { - template <class T> - struct - remove_error_info_injector - { - typedef T type; - }; - - template <class T> - struct - remove_error_info_injector< error_info_injector<T> > - { - typedef T type; - }; - - template <class T> - inline - wrapexcept<typename remove_error_info_injector<T>::type> - enable_both( T const & x ) - { - return wrapexcept<typename remove_error_info_injector<T>::type>( enable_error_info( x ) ); - } - } - } -# 37 "/usr/include/boost/throw_exception.hpp" 2 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 -} - -} - -} -# 39 "/usr/include/boost/throw_exception.hpp" 2 3 4 -# 47 "/usr/include/boost/throw_exception.hpp" 3 4 - -# 48 "/usr/include/boost/throw_exception.hpp" 3 - - - - - -namespace boost -{ - - - - - - -inline void throw_exception_assert_compatibility( std::exception const & ) { } - -template<class E> __attribute__ ((__noreturn__)) inline void throw_exception( E const & e ) -{ - - - throw_exception_assert_compatibility(e); - - - throw exception_detail::enable_both( e ); - - - -} - - - - - namespace - exception_detail - { - template <class E> - __attribute__ ((__noreturn__)) - void - throw_exception_( E const & x, char const * current_function, char const * file, int line ) - { - boost::throw_exception( - set_info( - set_info( - set_info( - enable_error_info(x), - throw_function(current_function)), - throw_file(file)), - throw_line(line))); - } - } - -} -# 24 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/precision.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/precision.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/traits/is_variable_precision.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/traits/is_variable_precision.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/detail/number_base.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 -# 1 "/usr/include/boost/utility/enable_if.hpp" 1 3 4 -# 15 "/usr/include/boost/utility/enable_if.hpp" 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> {}; - -} -# 16 "/usr/include/boost/utility/enable_if.hpp" 2 3 4 -# 11 "/usr/include/boost/multiprecision/detail/number_base.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4 -# 17 "/usr/include/boost/type_traits/is_convertible.hpp" 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/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; - - - -} -# 15 "/usr/include/boost/type_traits/is_complete.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4 -# 19 "/usr/include/boost/type_traits/is_function.hpp" 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 {}; -# 35 "/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp" 3 4 - template <class Ret, class...Args > - struct is_function<Ret (Args...)> : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)> : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)volatile > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)volatile > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const volatile > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const volatile > : public true_type {}; - - - - template <class Ret, class...Args > - struct is_function<Ret (Args...)& > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)& > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const & > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const & > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)volatile & > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)volatile & > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const volatile & > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const volatile & > : public true_type {}; - - - - template <class Ret, class...Args > - struct is_function<Ret (Args...)&& > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)&& > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const && > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const && > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)volatile && > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)volatile && > : public true_type {}; - - template <class Ret, class...Args > - struct is_function<Ret (Args...)const volatile && > : public true_type {}; - template <class Ret, class ...Args > - struct is_function<Ret(Args..., ...)const volatile && > : public true_type {}; -# 590 "/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 -# 16 "/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/type_traits/is_array.hpp" 1 3 4 -# 20 "/usr/include/boost/type_traits/is_array.hpp" 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{}; - - - - - -} -# 20 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4 -# 15 "/usr/include/boost/type_traits/is_arithmetic.hpp" 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 -} -# 12 "/usr/include/boost/multiprecision/detail/number_base.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 -# 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 -} -# 19 "/usr/include/boost/type_traits/is_constructible.hpp" 2 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 -} -# 13 "/usr/include/boost/multiprecision/detail/number_base.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/decay.hpp" 1 3 4 -# 14 "/usr/include/boost/type_traits/decay.hpp" 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 -# 14 "/usr/include/boost/type_traits/add_pointer.hpp" 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 - - - -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; - - - -} -# 14 "/usr/include/boost/multiprecision/detail/number_base.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/lexical_cast.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast.hpp" 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 -extern "C" { - - -extern void __assert_fail (const char *__assertion, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 26 "/usr/include/boost/range/iterator_range_core.hpp" 2 3 4 -# 1 "/usr/include/boost/iterator/iterator_traits.hpp" 1 3 4 -# 10 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/iterator" 1 3 4 -# 58 "/usr/include/c++/9.2.0/iterator" 3 4 - -# 59 "/usr/include/c++/9.2.0/iterator" 3 - - - - - - - -# 1 "/usr/include/c++/9.2.0/bits/stream_iterator.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/stream_iterator.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/stream_iterator.h" 3 - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - - 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() - : _M_stream(0), _M_value(), _M_ok(false) {} - - - istream_iterator(istream_type& __s) - : _M_stream(std::__addressof(__s)) - { _M_read(); } - - istream_iterator(const istream_iterator& __obj) - : _M_stream(__obj._M_stream), _M_value(__obj._M_value), - _M_ok(__obj._M_ok) - { } - - - istream_iterator& operator=(const istream_iterator&) = default; - - - const _Tp& - operator*() const - { - - - ; - return _M_value; - } - - const _Tp* - operator->() const { return std::__addressof((operator*())); } - - istream_iterator& - operator++() - { - - - ; - _M_read(); - return *this; - } - - istream_iterator - operator++(int) - { - - - ; - istream_iterator __tmp = *this; - _M_read(); - return __tmp; - } - - bool - _M_equal(const istream_iterator& __x) const - { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } - - private: - void - _M_read() - { - _M_ok = (_M_stream && *_M_stream) ? true : false; - if (_M_ok) - { - *_M_stream >> _M_value; - _M_ok = *_M_stream ? true : false; - } - } - }; - - - template<typename _Tp, typename _CharT, typename _Traits, typename _Dist> - inline bool - operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, - const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) - { return __x._M_equal(__y); } - - - template <class _Tp, class _CharT, class _Traits, class _Dist> - inline bool - operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, - const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) - { return !__x._M_equal(__y); } -# 156 "/usr/include/c++/9.2.0/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) - : _M_stream(std::__addressof(__s)), _M_string(0) {} -# 188 "/usr/include/c++/9.2.0/bits/stream_iterator.h" 3 - ostream_iterator(ostream_type& __s, const _CharT* __c) - : _M_stream(&__s), _M_string(__c) { } - - - ostream_iterator(const ostream_iterator& __obj) - : _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; - } - - ostream_iterator& - operator*() - { return *this; } - - ostream_iterator& - operator++() - { return *this; } - - ostream_iterator& - operator++(int) - { return *this; } - }; - - - - -} -# 67 "/usr/include/c++/9.2.0/iterator" 2 3 -# 11 "/usr/include/boost/iterator/iterator_traits.hpp" 2 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; - -} -# 27 "/usr/include/boost/range/iterator_range_core.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 -# 15 "/usr/include/boost/iterator/interoperable.hpp" 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_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/placeholders.hpp" 1 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 -# 25 "/usr/include/boost/iterator/detail/facade_iterator_category.hpp" 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_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 > - struct is_member_function_pointer<Ret ( C::*)(Args...)> : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret (C::*)(Args..., ...)> : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)volatile > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile > : public true_type {}; - - - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)& > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)& > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const & > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)volatile & > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile & > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & > : public true_type {}; - - - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...) && > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...) && > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const && > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)volatile && > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && > : public true_type {}; - - template <class Ret, class C, class...Args > - struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile && > : public true_type {}; - template <class Ret, class C, class ...Args > - struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && > : public true_type {}; -# 670 "/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/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/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 -# 18 "/usr/include/boost/type_traits/is_scalar.hpp" 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/apply.hpp" 1 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 -# 28 "/usr/include/boost/range/iterator_range_core.hpp" 2 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{}; - - - - - -} -# 34 "/usr/include/boost/range/iterator_range_core.hpp" 2 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 - { - }; - - - -} -# 25 "/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; - } -# 75 "/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 -# 24 "/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 - - -# 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-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 34 "/usr/include/string.h" 2 3 4 -# 42 "/usr/include/string.h" 3 4 -extern void *memcpy (void *__restrict __dest, const void *__restrict __src, - size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern void *memmove (void *__dest, const void *__src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - - -extern void *memccpy (void *__restrict __dest, const void *__restrict __src, - int __c, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); - - -extern int memcmp (const void *__s1, const void *__s2, size_t __n) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - - -extern "C++" -{ -extern void *memchr (void *__s, int __c, size_t __n) - throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern const void *memchr (const void *__s, int __c, size_t __n) - throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 88 "/usr/include/string.h" 3 4 -} -# 98 "/usr/include/string.h" 3 4 -extern "C++" void *rawmemchr (void *__s, int __c) - throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern "C++" const void *rawmemchr (const void *__s, int __c) - throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - - - - -extern "C++" void *memrchr (void *__s, int __c, size_t __n) - throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) - throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 121 "/usr/include/string.h" 3 4 -extern char *strcpy (char *__restrict __dest, const char *__restrict __src) - throw () __attribute__ ((__nonnull__ (1, 2))); - -extern char *strncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern char *strcat (char *__restrict __dest, const char *__restrict __src) - throw () __attribute__ ((__nonnull__ (1, 2))); - -extern char *strncat (char *__restrict __dest, const char *__restrict __src, - size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern int strcmp (const char *__s1, const char *__s2) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - -extern int strncmp (const char *__s1, const char *__s2, size_t __n) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int strcoll (const char *__s1, const char *__s2) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - -extern size_t strxfrm (char *__restrict __dest, - const char *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (2))); - - - - - - -extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); - - -extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, - locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); - - - - - -extern char *strdup (const char *__s) - throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); - - - - - - -extern char *strndup (const char *__string, size_t __n) - throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); -# 203 "/usr/include/string.h" 3 4 -extern "C++" -{ -extern char *strchr (char *__s, int __c) - throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern const char *strchr (const char *__s, int __c) - throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 223 "/usr/include/string.h" 3 4 -} - - - - - - -extern "C++" -{ -extern char *strrchr (char *__s, int __c) - throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern const char *strrchr (const char *__s, int __c) - throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 250 "/usr/include/string.h" 3 4 -} -# 260 "/usr/include/string.h" 3 4 -extern "C++" char *strchrnul (char *__s, int __c) - throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern "C++" const char *strchrnul (const char *__s, int __c) - throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 272 "/usr/include/string.h" 3 4 -extern size_t strcspn (const char *__s, const char *__reject) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern size_t strspn (const char *__s, const char *__accept) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern "C++" -{ -extern char *strpbrk (char *__s, const char *__accept) - throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -extern const char *strpbrk (const char *__s, const char *__accept) - throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 300 "/usr/include/string.h" 3 4 -} - - - - - - -extern "C++" -{ -extern char *strstr (char *__haystack, const char *__needle) - throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -extern const char *strstr (const char *__haystack, const char *__needle) - throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 327 "/usr/include/string.h" 3 4 -} - - - - - - - -extern char *strtok (char *__restrict __s, const char *__restrict __delim) - throw () __attribute__ ((__nonnull__ (2))); - - - -extern char *__strtok_r (char *__restrict __s, - const char *__restrict __delim, - char **__restrict __save_ptr) - throw () __attribute__ ((__nonnull__ (2, 3))); - -extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, - char **__restrict __save_ptr) - throw () __attribute__ ((__nonnull__ (2, 3))); - - - - - -extern "C++" char *strcasestr (char *__haystack, const char *__needle) - throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -extern "C++" const char *strcasestr (const char *__haystack, - const char *__needle) - throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 368 "/usr/include/string.h" 3 4 -extern void *memmem (const void *__haystack, size_t __haystacklen, - const void *__needle, size_t __needlelen) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); - - - -extern void *__mempcpy (void *__restrict __dest, - const void *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); -extern void *mempcpy (void *__restrict __dest, - const void *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern size_t strlen (const char *__s) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - -extern size_t strnlen (const char *__string, size_t __maxlen) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - -extern char *strerror (int __errnum) throw (); -# 420 "/usr/include/string.h" 3 4 -extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) - throw () __attribute__ ((__nonnull__ (2))) ; - - - - - -extern char *strerror_l (int __errnum, locale_t __l) throw (); - - - -# 1 "/usr/include/strings.h" 1 3 4 -# 23 "/usr/include/strings.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/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) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern void bcopy (const void *__src, void *__dest, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - -extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); - - - -extern "C++" -{ -extern char *index (char *__s, int __c) - throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern const char *index (const char *__s, int __c) - throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 66 "/usr/include/strings.h" 3 4 -} - - - - - - - -extern "C++" -{ -extern char *rindex (char *__s, int __c) - throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -extern const char *rindex (const char *__s, int __c) - throw () __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) throw () __attribute__ ((__const__)); - - - - - -extern int ffsl (long int __l) throw () __attribute__ ((__const__)); -__extension__ extern int ffsll (long long int __ll) - throw () __attribute__ ((__const__)); - - - -extern int strcasecmp (const char *__s1, const char *__s2) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - - - - - -extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); - - - -extern int strncasecmp_l (const char *__s1, const char *__s2, - size_t __n, locale_t __loc) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); - - -} -# 432 "/usr/include/string.h" 2 3 4 - - - -extern void explicit_bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); - - - -extern char *strsep (char **__restrict __stringp, - const char *__restrict __delim) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern char *strsignal (int __sig) throw (); - - -extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) - throw () __attribute__ ((__nonnull__ (1, 2))); -extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - -extern char *__stpncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); -extern char *stpncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - throw () __attribute__ ((__nonnull__ (1, 2))); - - - - -extern int strverscmp (const char *__s1, const char *__s2) - throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); - - -extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); - - - - - - - -extern "C++" char *basename (char *__filename) - throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); -extern "C++" const char *basename (const char *__filename) - throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); -# 498 "/usr/include/string.h" 3 4 -} -# 19 "/usr/include/boost/range/detail/implementation_help.hpp" 2 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); - } - - } - -} -# 25 "/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 -{ - static void failed() { ((Model*)0)->~Model(); } -}; - -struct failed {}; - -template <class Model> -struct requirement<failed ************ Model::************> -{ - static void failed() { ((Model*)0)->~Model(); } -}; - - - -template <class Model> -struct constraint -{ - static void failed() { ((Model*)0)->constraints(); } -}; - -template <class Model> -struct requirement_<void(*)(Model)> - : boost::conditional< - concepts::not_satisfied<Model>::value - , constraint<Model> - , requirement<failed ************ Model::************> - >::type -{}; -# 75 "/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 -{ - ~usage_requirements() { ((Model*)0)->~Model(); } -}; -# 34 "/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 -# 21 "/usr/include/boost/preprocessor/repetition/for.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 22 "/usr/include/boost/preprocessor/repetition/for.hpp" 2 3 4 -# 44 "/usr/include/boost/preprocessor/repetition/for.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/repetition/detail/for.hpp" 1 3 4 -# 45 "/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 -# 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 -# 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 -# 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) - { - 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 -# 29 "/usr/include/boost/range/size_type.hpp" 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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __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 -# 15 "/usr/include/boost/utility.hpp" 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 -# 23 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 24 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 2 3 4 -# 18 "/usr/include/boost/utility/base_from_member.hpp" 2 3 4 -# 58 "/usr/include/boost/utility/base_from_member.hpp" 3 4 -namespace boost -{ - -namespace detail -{ -# 72 "/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 > -{}; -# 100 "/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> > -{}; - - -} -# 123 "/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)... ) - {} -# 150 "/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 ) - {} - -}; - -} -# 16 "/usr/include/boost/utility.hpp" 2 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 -# 16 "/usr/include/boost/preprocessor/control/deduce_d.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 17 "/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 -# 19 "/usr/include/boost/preprocessor/seq/fold_left.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 -# 20 "/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 -# 17 "/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 -# 19 "/usr/include/boost/preprocessor/comparison/less_equal.hpp" 3 4 -# 1 "/usr/include/boost/preprocessor/logical/not.hpp" 1 3 4 -# 20 "/usr/include/boost/preprocessor/comparison/less_equal.hpp" 2 3 4 -# 20 "/usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 2 3 4 -# 18 "/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/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); - } -}; - -} -# 22 "/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 -{ -# 35 "/usr/include/boost/range/rbegin.hpp" 3 4 -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 -{ -# 35 "/usr/include/boost/range/rend.hpp" 3 4 -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 -# 13 "/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; - } - } - - 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; - } - } - } - - 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 ); - } -# 758 "/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)); - } -# 788 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 - 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 ); - } - } -# 843 "/usr/include/boost/range/iterator_range_core.hpp" 3 4 - 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 ); - } -# 871 "/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 ) ); - } - -} -# 31 "/usr/include/boost/lexical_cast.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/bad_lexical_cast.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/bad_lexical_cast.hpp" 3 4 - - - - - - - -namespace boost -{ - - class __attribute__((__visibility__("default"))) bad_lexical_cast : - - - - - public std::bad_cast - - - - - - - - { - public: - bad_lexical_cast() noexcept - - : source(&typeid(void)), target(&typeid(void)) - - {} - - virtual const char *what() const noexcept { - return "bad lexical cast: " - "source type value could not be interpreted as target"; - } - - virtual ~bad_lexical_cast() noexcept - {} - - - bad_lexical_cast( - const std::type_info &source_type_arg, - const std::type_info &target_type_arg) noexcept - : source(&source_type_arg), target(&target_type_arg) - {} - - const std::type_info &source_type() const noexcept { - return *source; - } - - const std::type_info &target_type() const noexcept { - return *target; - } - - private: - const std::type_info *source; - const std::type_info *target; - - }; - - namespace conversion { namespace detail { - - - - - - - template <class S, class T> - inline void throw_bad_cast() { - boost::throw_exception(bad_lexical_cast(typeid(S), typeid(T))); - } - - }} - - -} -# 32 "/usr/include/boost/lexical_cast.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 3 4 - - - - - - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wuninitialized" -#pragma GCC diagnostic ignored "-Wsign-conversion" - - - - - -# 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; - - - - -} -# 38 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/lexical_cast/detail/is_character.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/is_character.hpp" 3 4 - - - - - - -namespace boost { - - namespace detail - { - - template < typename T > - struct is_character - { - typedef typename boost::integral_constant< - bool, - boost::is_same< T, char >::value || - - boost::is_same< T, wchar_t >::value || - - - boost::is_same< T, char16_t >::value || - - - boost::is_same< T, char32_t >::value || - - boost::is_same< T, unsigned char >::value || - boost::is_same< T, signed char >::value - > type; - - static const bool value = (type::value); - }; - } -} -# 43 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 3 4 - -# 33 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 3 4 -# 1 "/usr/include/boost/type_traits/is_base_of.hpp" 1 3 4 -# 16 "/usr/include/boost/type_traits/is_base_of.hpp" 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{}; - -} -# 34 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/is_float.hpp" 1 3 4 -# 14 "/usr/include/boost/type_traits/is_float.hpp" 3 4 -namespace boost { - - - template <class T> struct is_float : public is_floating_point<T> {}; -} -# 35 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 2 3 4 - -# 1 "/usr/include/boost/numeric/conversion/cast.hpp" 1 3 4 -# 32 "/usr/include/boost/numeric/conversion/cast.hpp" 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 {}; - -} -# 33 "/usr/include/boost/numeric/conversion/cast.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/converter.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/converter.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/conversion_traits.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/conversion_traits.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 3 4 -# 1 "/usr/include/boost/mpl/equal_to.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/equal_to.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/equal_to.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct equal_to_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct equal_to_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct equal_to_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct equal_to_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct equal_to_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct equal_to - - : equal_to_impl< - typename equal_to_tag<N1>::type - , typename equal_to_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct equal_to_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N1::value == N2::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/equal_to.hpp" 2 3 4 -# 18 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 2 3 4 - - - - - -namespace boost { namespace numeric { namespace convdetail -{ - template< class T1, class T2> - struct equal_to - { - - - enum { x = ( T1::value == T2::value ) }; - - static const bool value = x; - - typedef mpl::bool_<value> type; -# 48 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 3 4 - }; -# 59 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 3 4 - template<class Value, - class Case0Val, - class Case1Val, - class Case2Val, - class Case0Type, - class Case1Type, - class Case2Type, - class DefaultType - > - struct ct_switch4 - { - typedef mpl::identity<Case0Type> Case0TypeQ ; - typedef mpl::identity<Case1Type> Case1TypeQ ; - - typedef equal_to<Value,Case0Val> is_case0 ; - typedef equal_to<Value,Case1Val> is_case1 ; - typedef equal_to<Value,Case2Val> is_case2 ; - - typedef mpl::if_<is_case2,Case2Type,DefaultType> choose_2_3Q ; - typedef mpl::eval_if<is_case1,Case1TypeQ,choose_2_3Q> choose_1_2_3Q ; - - typedef typename - mpl::eval_if<is_case0,Case0TypeQ,choose_1_2_3Q>::type - type ; - } ; -# 97 "/usr/include/boost/numeric/conversion/detail/meta.hpp" 3 4 - template<class expr0, class expr1, class TT, class TF, class FT, class FF> - struct for_both - { - typedef mpl::identity<TF> TF_Q ; - typedef mpl::identity<TT> TT_Q ; - - typedef typename mpl::not_<expr0>::type not_expr0 ; - typedef typename mpl::not_<expr1>::type not_expr1 ; - - typedef typename mpl::and_<expr0,expr1>::type caseTT ; - typedef typename mpl::and_<expr0,not_expr1>::type caseTF ; - typedef typename mpl::and_<not_expr0,expr1>::type caseFT ; - - typedef mpl::if_<caseFT,FT,FF> choose_FT_FF_Q ; - typedef mpl::eval_if<caseTF,TF_Q,choose_FT_FF_Q> choose_TF_FT_FF_Q ; - - typedef typename mpl::eval_if<caseTT,TT_Q,choose_TF_FT_FF_Q>::type type ; - } ; - -} } } -# 18 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 1 3 4 -# 16 "/usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp" 3 4 -namespace boost { namespace numeric -{ - enum int_float_mixture_enum - { - integral_to_integral - ,integral_to_float - ,float_to_integral - ,float_to_float - } ; - -} } -# 17 "/usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 2 3 4 - - - - -namespace boost { namespace numeric { namespace convdetail -{ - - typedef mpl::integral_c<int_float_mixture_enum, integral_to_integral> int2int_c ; - typedef mpl::integral_c<int_float_mixture_enum, integral_to_float> int2float_c ; - typedef mpl::integral_c<int_float_mixture_enum, float_to_integral> float2int_c ; - typedef mpl::integral_c<int_float_mixture_enum, float_to_float> float2float_c ; - - - - - - - - template<class T,class S> - struct get_int_float_mixture - { - typedef mpl::bool_< ::std::numeric_limits<S>::is_integer > S_int ; - typedef mpl::bool_< ::std::numeric_limits<T>::is_integer > T_int ; - - typedef typename - for_both<S_int, T_int, int2int_c, int2float_c, float2int_c, float2float_c>::type - type ; - } ; -# 55 "/usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 3 4 - template<class IntFloatMixture, class Int2Int, class Int2Float, class Float2Int, class Float2Float> - struct for_int_float_mixture - { - typedef typename - ct_switch4<IntFloatMixture - ,int2int_c, int2float_c, float2int_c - ,Int2Int , Int2Float , Float2Int , Float2Float - >::type - type ; - } ; - -} } } -# 19 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/sign_mixture.hpp" 1 3 4 -# 16 "/usr/include/boost/numeric/conversion/detail/sign_mixture.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/sign_mixture_enum.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/sign_mixture_enum.hpp" 3 4 -namespace boost { namespace numeric -{ - enum sign_mixture_enum - { - unsigned_to_unsigned - ,signed_to_signed - ,signed_to_unsigned - ,unsigned_to_signed - } ; - -} } -# 17 "/usr/include/boost/numeric/conversion/detail/sign_mixture.hpp" 2 3 4 - - - - -namespace boost { namespace numeric { namespace convdetail -{ - - typedef mpl::integral_c<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ; - typedef mpl::integral_c<sign_mixture_enum, signed_to_signed> sig2sig_c ; - typedef mpl::integral_c<sign_mixture_enum, signed_to_unsigned> sig2unsig_c ; - typedef mpl::integral_c<sign_mixture_enum, unsigned_to_signed> unsig2sig_c ; - - - - - - - - template<class T,class S> - struct get_sign_mixture - { - typedef mpl::bool_< ::std::numeric_limits<S>::is_signed > S_signed ; - typedef mpl::bool_< ::std::numeric_limits<T>::is_signed > T_signed ; - - typedef typename - for_both<S_signed, T_signed, sig2sig_c, sig2unsig_c, unsig2sig_c, unsig2unsig_c>::type - type ; - } ; -# 55 "/usr/include/boost/numeric/conversion/detail/sign_mixture.hpp" 3 4 - template<class SignMixture, class Sig2Sig, class Sig2Unsig, class Unsig2Sig, class Unsig2Unsig> - struct for_sign_mixture - { - typedef typename - ct_switch4<SignMixture - , sig2sig_c, sig2unsig_c, unsig2sig_c - , Sig2Sig , Sig2Unsig , Unsig2Sig , Unsig2Unsig - >::type - type ; - } ; - -} } } -# 20 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 1 3 4 -# 15 "/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" 3 4 -namespace boost { namespace numeric -{ - enum udt_builtin_mixture_enum - { - builtin_to_builtin - ,builtin_to_udt - ,udt_to_builtin - ,udt_to_udt - } ; - -} } -# 16 "/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 2 3 4 - - - - -namespace boost { namespace numeric { namespace convdetail -{ - - typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ; - typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt> builtin2udt_c ; - typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin> udt2builtin_c ; - typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt> udt2udt_c ; -# 37 "/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 3 4 - template<class UdtMixture, class BuiltIn2BuiltIn, class BuiltIn2Udt, class Udt2BuiltIn, class Udt2Udt> - struct for_udt_builtin_mixture - { - typedef typename - ct_switch4<UdtMixture - , builtin2builtin_c, builtin2udt_c, udt2builtin_c - , BuiltIn2BuiltIn , BuiltIn2Udt , Udt2BuiltIn , Udt2Udt - >::type - type ; - } ; - - - - - - - - template<class T,class S> - struct get_udt_builtin_mixture - { - typedef is_arithmetic<S> S_builtin ; - typedef is_arithmetic<T> T_builtin ; - - typedef typename - for_both<S_builtin, T_builtin, builtin2builtin_c, builtin2udt_c, udt2builtin_c, udt2udt_c>::type - type ; - } ; - -} } } -# 21 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/is_subranged.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/conversion/detail/is_subranged.hpp" 3 4 -# 1 "/usr/include/boost/mpl/multiplies.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/multiplies.hpp" 3 4 -# 1 "/usr/include/boost/mpl/times.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/times.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 1 3 4 -# 26 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/aux_/arithmetic_op.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/times.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct times_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct times_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct times_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct times_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct times_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - , typename N3 = na, typename N4 = na, typename N5 = na - > -struct times - : times< times< times< times< N1,N2 >, N3>, N4>, N5> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3, typename N4 - > -struct times< N1,N2,N3,N4,na > - - : times< times< times< N1,N2 >, N3>, N4> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3 - > -struct times< N1,N2,N3,na,na > - - : times< times< N1,N2 >, N3> -{ - - - - - -}; - -template< - typename N1, typename N2 - > -struct times< N1,N2,na,na,na > - : times_impl< - typename times_tag<N1>::type - , typename times_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - - - - - -}; - -template<> struct times< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : times< T1 , T2 > { }; }; template< typename Tag > struct lambda< times< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef times< na , na > result_; typedef times< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< times< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< times< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { -template<> -struct times_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : integral_c< - typename aux::largest_int< - typename N1::value_type - , typename N2::value_type - >::type - , ( N1::value - * N2::value - ) - > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 35 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/times.hpp" 2 3 4 -# 18 "/usr/include/boost/mpl/multiplies.hpp" 2 3 4 -# 26 "/usr/include/boost/mpl/multiplies.hpp" 3 4 -namespace boost { namespace mpl { - - - - - - - -template< - typename N1 = na , typename N2 = na , typename N3 = na , typename N4 = na , typename N5 = na - > -struct multiplies - : times< N1 , N2 , N3 , N4 , N5 > -{ - - - - - -}; - -template<> struct multiplies< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : multiplies< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< multiplies< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef multiplies< na , na , na , na , na > result_; typedef multiplies< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< multiplies< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< multiplies< na , na , na , na , na > > : int_<-1> { }; } - - - -}} -# 18 "/usr/include/boost/numeric/conversion/detail/is_subranged.hpp" 2 3 4 -# 28 "/usr/include/boost/numeric/conversion/detail/is_subranged.hpp" 3 4 -namespace boost { namespace numeric { namespace convdetail -{ - - - - - - template<class T,class S> - struct subranged_Sig2Unsig - { - - - typedef mpl::true_ type ; - } ; - - - template<class T,class S> - struct subranged_Unsig2Sig - { -# 62 "/usr/include/boost/numeric/conversion/detail/is_subranged.hpp" 3 4 - typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ; - typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ; - - - typedef typename T_digits::next u_T_digits ; - - typedef mpl::int_<2> Two ; - - typedef typename mpl::multiplies<S_digits,Two>::type S_digits_times_2 ; - - typedef typename mpl::less<u_T_digits,S_digits_times_2>::type type ; - } ; - - - template<class T,class S> - struct subranged_SameSign - { - - - typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ; - typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ; - - typedef typename mpl::less<T_digits,S_digits>::type type ; - } ; - - - template<class T,class S> - struct subranged_Int2Float - { - typedef mpl::false_ type ; - } ; - - - template<class T,class S> - struct subranged_Float2Int - { - typedef mpl::true_ type ; - } ; - - - template<class T,class S> - struct subranged_Float2Float - { - - - - typedef mpl::int_< ::std::numeric_limits<S>::digits > S_mantisa ; - typedef mpl::int_< ::std::numeric_limits<T>::digits > T_mantisa ; - - typedef mpl::int_< ::std::numeric_limits<S>::max_exponent > S_exponent ; - typedef mpl::int_< ::std::numeric_limits<T>::max_exponent > T_exponent ; - - typedef typename mpl::less<T_exponent,S_exponent>::type T_smaller_exponent ; - - typedef typename mpl::equal_to<T_exponent,S_exponent>::type equal_exponents ; - - typedef mpl::less<T_mantisa,S_mantisa> T_smaller_mantisa ; - - typedef mpl::eval_if<equal_exponents,T_smaller_mantisa,mpl::false_> not_bigger_exponent_case ; - - typedef typename - mpl::eval_if<T_smaller_exponent,mpl::true_,not_bigger_exponent_case>::type - type ; - } ; - - - template<class T,class S> - struct subranged_Udt2BuiltIn - { - typedef mpl::true_ type ; - } ; - - - template<class T,class S> - struct subranged_BuiltIn2Udt - { - typedef mpl::false_ type ; - } ; - - - template<class T,class S> - struct subranged_Udt2Udt - { - typedef mpl::false_ type ; - } ; - - - - - - template<class T,class S> - struct get_subranged_Int2Int - { - typedef subranged_SameSign<T,S> Sig2Sig ; - typedef subranged_Sig2Unsig<T,S> Sig2Unsig ; - typedef subranged_Unsig2Sig<T,S> Unsig2Sig ; - typedef Sig2Sig Unsig2Unsig ; - - typedef typename get_sign_mixture<T,S>::type sign_mixture ; - - typedef typename - for_sign_mixture<sign_mixture, Sig2Sig, Sig2Unsig, Unsig2Sig, Unsig2Unsig>::type - type ; - } ; - - template<class T,class S> - struct get_subranged_BuiltIn2BuiltIn - { - typedef get_subranged_Int2Int<T,S> Int2IntQ ; - - typedef subranged_Int2Float <T,S> Int2Float ; - typedef subranged_Float2Int <T,S> Float2Int ; - typedef subranged_Float2Float<T,S> Float2Float ; - - typedef mpl::identity<Int2Float > Int2FloatQ ; - typedef mpl::identity<Float2Int > Float2IntQ ; - typedef mpl::identity<Float2Float> Float2FloatQ ; - - typedef typename get_int_float_mixture<T,S>::type int_float_mixture ; - - typedef for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ> for_ ; - - typedef typename for_::type selected ; - - typedef typename selected::type type ; - } ; - - template<class T,class S> - struct get_subranged - { - typedef get_subranged_BuiltIn2BuiltIn<T,S> BuiltIn2BuiltInQ ; - - typedef subranged_BuiltIn2Udt<T,S> BuiltIn2Udt ; - typedef subranged_Udt2BuiltIn<T,S> Udt2BuiltIn ; - typedef subranged_Udt2Udt<T,S> Udt2Udt ; - - typedef mpl::identity<BuiltIn2Udt> BuiltIn2UdtQ ; - typedef mpl::identity<Udt2BuiltIn> Udt2BuiltInQ ; - typedef mpl::identity<Udt2Udt > Udt2UdtQ ; - - typedef typename get_udt_builtin_mixture<T,S>::type udt_builtin_mixture ; - - typedef typename - for_udt_builtin_mixture<udt_builtin_mixture, BuiltIn2BuiltInQ, BuiltIn2UdtQ, Udt2BuiltInQ, Udt2UdtQ>::type - selected ; - - typedef typename selected::type selected2 ; - - typedef typename selected2::type type ; - } ; - - - - - - template<class T, class S> - struct get_is_subranged - { - typedef get_subranged<T,S> non_trivial_case ; - typedef mpl::identity<mpl::false_> trivial_case ; - - typedef is_same<T,S> is_trivial ; - - typedef typename mpl::if_<is_trivial,trivial_case,non_trivial_case>::type selected ; - - typedef typename selected::type type ; - } ; - -} } } -# 22 "/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 3 4 - -namespace boost { namespace numeric { namespace convdetail -{ - - - - - - template<class T,class S> - struct non_trivial_traits_impl - { - typedef typename get_int_float_mixture <T,S>::type int_float_mixture ; - typedef typename get_sign_mixture <T,S>::type sign_mixture ; - typedef typename get_udt_builtin_mixture <T,S>::type udt_builtin_mixture ; - - typedef typename get_is_subranged<T,S>::type subranged ; - - typedef mpl::false_ trivial ; - - typedef T target_type ; - typedef S source_type ; - typedef T result_type ; - - typedef typename mpl::if_< is_arithmetic<S>, S, S const&>::type argument_type ; - - typedef typename mpl::if_<subranged,S,T>::type supertype ; - typedef typename mpl::if_<subranged,T,S>::type subtype ; - } ; - - - - - - - template<class N> - struct trivial_traits_impl - { - typedef typename get_int_float_mixture <N,N>::type int_float_mixture ; - typedef typename get_sign_mixture <N,N>::type sign_mixture ; - typedef typename get_udt_builtin_mixture<N,N>::type udt_builtin_mixture ; - - typedef mpl::false_ subranged ; - typedef mpl::true_ trivial ; - - typedef N target_type ; - typedef N source_type ; - typedef N const& result_type ; - typedef N const& argument_type ; - - typedef N supertype ; - typedef N subtype ; - - } ; - - - - - template<class T, class S> - struct get_conversion_traits - { - typedef typename remove_cv<T>::type target_type ; - typedef typename remove_cv<S>::type source_type ; - - typedef typename is_same<target_type,source_type>::type is_trivial ; - - typedef trivial_traits_impl <target_type> trivial_imp ; - typedef non_trivial_traits_impl<target_type,source_type> non_trivial_imp ; - - typedef typename mpl::if_<is_trivial,trivial_imp,non_trivial_imp>::type type ; - } ; - -} } } -# 14 "/usr/include/boost/numeric/conversion/conversion_traits.hpp" 2 3 4 - - - -namespace boost { namespace numeric -{ - -template<class T, class S> -struct conversion_traits - : convdetail::get_conversion_traits<T,S>::type -{ -} ; - -} } -# 14 "/usr/include/boost/numeric/conversion/converter.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/converter_policies.hpp" 1 3 4 -# 19 "/usr/include/boost/numeric/conversion/converter_policies.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/functional" 1 3 4 -# 46 "/usr/include/c++/9.2.0/functional" 3 4 - -# 47 "/usr/include/c++/9.2.0/functional" 3 -# 58 "/usr/include/c++/9.2.0/functional" 3 -# 1 "/usr/include/c++/9.2.0/bits/refwrap.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/refwrap.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/refwrap.h" 3 -# 43 "/usr/include/c++/9.2.0/bits/refwrap.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - template<typename _Res, typename... _ArgTypes> - struct _Maybe_unary_or_binary_function { }; - - - 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> { }; - - 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)>; - }; -# 97 "/usr/include/c++/9.2.0/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; }; -# 111 "/usr/include/c++/9.2.0/bits/refwrap.h" 3 - 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 > - struct _Weak_result_type_impl<_Res(_ArgTypes...) > - { typedef _Res result_type; }; - - - template<typename _Res, typename... _ArgTypes > - struct _Weak_result_type_impl<_Res(_ArgTypes......) > - { typedef _Res result_type; }; - - - template<typename _Res, typename... _ArgTypes > - struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) > - { typedef _Res result_type; }; - - - template<typename _Res, typename... _ArgTypes > - struct - _Weak_result_type_impl<_Res(*)(_ArgTypes......) > - { 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> - { }; - - - template<typename _Res, typename _T1 > - struct _Reference_wrapper_base<_Res(_T1) > - : 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 > - struct _Reference_wrapper_base<_Res(_T1, _T2) > - : 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 > - struct _Reference_wrapper_base<_Res(*)(_T1) > - : unary_function<_T1, _Res> - { }; - - - template<typename _Res, typename _T1, typename _T2 > - struct _Reference_wrapper_base<_Res(*)(_T1, _T2) > - : 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; - }; - - - - - - - - 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 result_of<_Tp&(_Args&&...)>::type - operator()(_Args&&... __args) const - { - - - - return std::__invoke(get(), std::forward<_Args>(__args)...); - } - }; - - - - - - - - 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() }; } - - - - -} -# 59 "/usr/include/c++/9.2.0/functional" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/std_function.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/std_function.h" 3 -# 47 "/usr/include/c++/9.2.0/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() { return &_M_pod_data[0]; } - const void* _M_access() const { return &_M_pod_data[0]; } - - template<typename _Tp> - _Tp& - _M_access() - { return *static_cast<_Tp*>(_M_access()); } - - template<typename _Tp> - const _Tp& - _M_access() const - { 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 _Tp> - struct _Simple_type_wrapper - { - _Simple_type_wrapper(_Tp __value) : __value(__value) { } - - _Tp __value; - }; - - template<typename _Tp> - struct __is_location_invariant<_Simple_type_wrapper<_Tp> > - : __is_location_invariant<_Tp> - { }; - - 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)); - - typedef integral_constant<bool, __stored_locally> _Local_storage; - - - static _Functor* - _M_get_pointer(const _Any_data& __source) - { - if (__stored_locally) - { - const _Functor& __f = __source._M_access<_Functor>(); - return const_cast<_Functor*>(std::__addressof(__f)); - } - else - return __source._M_access<_Functor*>(); - } - - - - static void - _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) - { - ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); - } - - - - static void - _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) - { - __dest._M_access<_Functor*>() = - new _Functor(*__source._M_access<const _Functor*>()); - } - - - - 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_clone(__dest, __source, _Local_storage()); - break; - - case __destroy_functor: - _M_destroy(__dest, _Local_storage()); - break; - } - return false; - } - - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f) - { _M_init_functor(__functor, std::move(__f), _Local_storage()); } - - template<typename _Signature> - static bool - _M_not_empty_function(const function<_Signature>& __f) - { return static_cast<bool>(__f); } - - template<typename _Tp> - static bool - _M_not_empty_function(_Tp* __fp) - { return __fp != nullptr; } - - template<typename _Class, typename _Tp> - static bool - _M_not_empty_function(_Tp _Class::* __mp) - { return __mp != nullptr; } - - template<typename _Tp> - static bool - _M_not_empty_function(const _Tp&) - { return true; } - - private: - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) - { ::new (__functor._M_access()) _Functor(std::move(__f)); } - - static void - _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) - { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } - }; - - _Function_base() : _M_manager(nullptr) { } - - ~_Function_base() - { - if (_M_manager) - _M_manager(_M_functor, _M_functor, __destroy_functor); - } - - bool _M_empty() const { return !_M_manager; } - - typedef bool (*_Manager_type)(_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> - { - typedef _Function_base::_Base_manager<_Functor> _Base; - - public: - static _Res - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - return (*_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template<typename _Functor, typename... _ArgTypes> - class _Function_handler<void(_ArgTypes...), _Functor> - : public _Function_base::_Base_manager<_Functor> - { - typedef _Function_base::_Base_manager<_Functor> _Base; - - public: - static void - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - (*_Base::_M_get_pointer(__functor))( - std::forward<_ArgTypes>(__args)...); - } - }; - - template<typename _Class, typename _Member, typename _Res, - typename... _ArgTypes> - class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> - : public _Function_handler<void(_ArgTypes...), _Member _Class::*> - { - typedef _Function_handler<void(_ArgTypes...), _Member _Class::*> - _Base; - - public: - static _Res - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - return std::__invoke(_Base::_M_get_pointer(__functor)->__value, - std::forward<_ArgTypes>(__args)...); - } - }; - - template<typename _Class, typename _Member, typename... _ArgTypes> - class _Function_handler<void(_ArgTypes...), _Member _Class::*> - : public _Function_base::_Base_manager< - _Simple_type_wrapper< _Member _Class::* > > - { - typedef _Member _Class::* _Functor; - typedef _Simple_type_wrapper<_Functor> _Wrapper; - typedef _Function_base::_Base_manager<_Wrapper> _Base; - - 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)->__value; - break; - - default: - _Base::_M_manager(__dest, __source, __op); - } - return false; - } - - static void - _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) - { - std::__invoke(_Base::_M_get_pointer(__functor)->__value, - std::forward<_ArgTypes>(__args)...); - } - }; - - template<typename _From, typename _To> - using __check_func_return_type - = __or_<is_void<_To>, is_same<_From, _To>, is_convertible<_From, _To>>; - - - - - - - - template<typename _Res, typename... _ArgTypes> - class function<_Res(_ArgTypes...)> - : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, - private _Function_base - { - template<typename _Func, - typename _Res2 = typename result_of<_Func&(_ArgTypes...)>::type> - struct _Callable : __check_func_return_type<_Res2, _Res> { }; - - - - template<typename _Tp> - struct _Callable<function, _Tp> : false_type { }; - - template<typename _Cond, typename _Tp> - using _Requires = typename enable_if<_Cond::value, _Tp>::type; - - public: - typedef _Res result_type; - - - - - - - - function() noexcept - : _Function_base() { } - - - - - - function(nullptr_t) noexcept - : _Function_base() { } -# 416 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - function(const function& __x); -# 425 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - function(function&& __x) noexcept : _Function_base() - { - __x.swap(*this); - } -# 446 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - template<typename _Functor, - typename = _Requires<__not_<is_same<_Functor, function>>, void>, - typename = _Requires<_Callable<_Functor>, void>> - function(_Functor); -# 463 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - function& - operator=(const function& __x) - { - function(__x).swap(*this); - return *this; - } -# 481 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - function& - operator=(function&& __x) noexcept - { - function(std::move(__x)).swap(*this); - return *this; - } -# 495 "/usr/include/c++/9.2.0/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; - } -# 523 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - template<typename _Functor> - _Requires<_Callable<typename decay<_Functor>::type>, function&> - operator=(_Functor&& __f) - { - 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; - } -# 549 "/usr/include/c++/9.2.0/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); - } -# 566 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - explicit operator bool() const noexcept - { return !_M_empty(); } -# 579 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - _Res operator()(_ArgTypes... __args) const; -# 592 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - const type_info& target_type() const noexcept; -# 605 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - template<typename _Functor> _Functor* target() noexcept; - - template<typename _Functor> const _Functor* target() const noexcept; - - - - private: - using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); - _Invoker_type _M_invoker; - }; -# 654 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - template<typename _Res, typename... _ArgTypes> - function<_Res(_ArgTypes...)>:: - 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; - } - } - - template<typename _Res, typename... _ArgTypes> - template<typename _Functor, typename, typename> - function<_Res(_ArgTypes...)>:: - function(_Functor __f) - : _Function_base() - { - typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; - - if (_My_handler::_M_not_empty_function(__f)) - { - _My_handler::_M_init_functor(_M_functor, std::move(__f)); - _M_invoker = &_My_handler::_M_invoke; - _M_manager = &_My_handler::_M_manager; - } - } - - template<typename _Res, typename... _ArgTypes> - _Res - function<_Res(_ArgTypes...)>:: - operator()(_ArgTypes... __args) const - { - if (_M_empty()) - __throw_bad_function_call(); - return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); - } - - - template<typename _Res, typename... _ArgTypes> - const type_info& - function<_Res(_ArgTypes...)>:: - target_type() const noexcept - { - if (_M_manager) - { - _Any_data __typeinfo_result; - _M_manager(__typeinfo_result, _M_functor, __get_type_info); - return *__typeinfo_result._M_access<const type_info*>(); - } - else - return typeid(void); - } - - template<typename _Res, typename... _ArgTypes> - template<typename _Functor> - _Functor* - function<_Res(_ArgTypes...)>:: - target() noexcept - { - const function* __const_this = this; - const _Functor* __func = __const_this->template target<_Functor>(); - return const_cast<_Functor*>(__func); - } - - template<typename _Res, typename... _ArgTypes> - template<typename _Functor> - const _Functor* - function<_Res(_ArgTypes...)>:: - target() const noexcept - { - if (typeid(_Functor) == target_type() && _M_manager) - { - _Any_data __ptr; - _M_manager(__ptr, _M_functor, __get_functor_ptr); - return __ptr._M_access<const _Functor*>(); - } - else - return nullptr; - } -# 746 "/usr/include/c++/9.2.0/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); } -# 764 "/usr/include/c++/9.2.0/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); } -# 785 "/usr/include/c++/9.2.0/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); } -# 804 "/usr/include/c++/9.2.0/bits/std_function.h" 3 - -} -# 60 "/usr/include/c++/9.2.0/functional" 2 3 -# 68 "/usr/include/c++/9.2.0/functional" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 86 "/usr/include/c++/9.2.0/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; - }; -# 158 "/usr/include/c++/9.2.0/functional" 3 - template<typename _Tp, typename _Class> - inline _Mem_fn<_Tp _Class::*> - mem_fn(_Tp _Class::* __pm) noexcept - { - return _Mem_fn<_Tp _Class::*>(__pm); - } -# 173 "/usr/include/c++/9.2.0/functional" 3 - template<typename _Tp> - struct is_bind_expression - : public false_type { }; -# 184 "/usr/include/c++/9.2.0/functional" 3 - template<typename _Tp> - struct is_placeholder - : public integral_constant<int, 0> - { }; -# 199 "/usr/include/c++/9.2.0/functional" 3 - template<int _Num> struct _Placeholder { }; - - - - - - namespace placeholders - { - - - - - extern const _Placeholder<1> _1; - extern const _Placeholder<2> _2; - extern const _Placeholder<3> _3; - extern const _Placeholder<4> _4; - extern const _Placeholder<5> _5; - extern const _Placeholder<6> _6; - extern const _Placeholder<7> _7; - extern const _Placeholder<8> _8; - extern const _Placeholder<9> _9; - extern const _Placeholder<10> _10; - extern const _Placeholder<11> _11; - extern const _Placeholder<12> _12; - extern const _Placeholder<13> _13; - extern const _Placeholder<14> _14; - extern const _Placeholder<15> _15; - extern const _Placeholder<16> _16; - extern const _Placeholder<17> _17; - extern const _Placeholder<18> _18; - extern const _Placeholder<19> _19; - extern const _Placeholder<20> _20; - extern const _Placeholder<21> _21; - extern const _Placeholder<22> _22; - extern const _Placeholder<23> _23; - extern const _Placeholder<24> _24; - extern const _Placeholder<25> _25; - extern const _Placeholder<26> _26; - extern const _Placeholder<27> _27; - extern const _Placeholder<28> _28; - extern 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; -# 275 "/usr/include/c++/9.2.0/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)); } - - - template<typename _Signature> - struct _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&& __b) - : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) - { } - - - 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()); - } -# 505 "/usr/include/c++/9.2.0/functional" 3 - template<typename... _Args, - typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>> - - _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>> - - _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> - struct _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> - using __enable_if_void - = typename enable_if<is_void<_Res>{}>::type; - - template<typename _Res> - using __disable_if_void - = typename enable_if<!is_void<_Res>{}, _Result>::type; - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __disable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) - { - return std::__invoke(_M_f, _Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __enable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) - { - std::__invoke(_M_f, _Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __disable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const - { - return std::__invoke(_M_f, _Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __enable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const - { - std::__invoke(_M_f, _Mu<_Bound_args>() - (std::get<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __disable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile - { - return std::__invoke(_M_f, _Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __enable_if_void<_Res> - __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile - { - std::__invoke(_M_f, _Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __disable_if_void<_Res> - __call(tuple<_Args...>&& __args, - _Index_tuple<_Indexes...>) const volatile - { - return std::__invoke(_M_f, _Mu<_Bound_args>() - (__volget<_Indexes>(_M_bound_args), __args)...); - } - - - template<typename _Res, typename... _Args, std::size_t... _Indexes> - __enable_if_void<_Res> - __call(tuple<_Args...>&& __args, - _Index_tuple<_Indexes...>) const volatile - { - std::__invoke(_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&& __b) - : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) - { } - - - 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> - - result_type - operator()(_Args&&... __args) volatile - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - - - template<typename... _Args> - - result_type - operator()(_Args&&... __args) const volatile - { - return this->__call<_Result>( - std::forward_as_tuple(std::forward<_Args>(__args)...), - _Bound_indexes()); - } - }; - - - - - - - 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)...); - } -# 941 "/usr/include/c++/9.2.0/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> - _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; -# 973 "/usr/include/c++/9.2.0/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> { }; -# 1293 "/usr/include/c++/9.2.0/functional" 3 - -} -# 20 "/usr/include/boost/numeric/conversion/converter_policies.hpp" 2 3 4 - - - - - - -namespace boost { namespace numeric -{ - -template<class S> -struct Trunc -{ - typedef S source_type ; - - typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ; - - static source_type nearbyint ( argument_type s ) - { - - using std::floor ; - using std::ceil ; - - - return s < static_cast<S>(0) ? ceil(s) : floor(s) ; - } - - typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; -} ; - - - -template<class S> -struct Floor -{ - typedef S source_type ; - - typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ; - - static source_type nearbyint ( argument_type s ) - { - - using std::floor ; - - - return floor(s) ; - } - - typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; -} ; - -template<class S> -struct Ceil -{ - typedef S source_type ; - - typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ; - - static source_type nearbyint ( argument_type s ) - { - - using std::ceil ; - - - return ceil(s) ; - } - - typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; -} ; - -template<class S> -struct RoundEven -{ - typedef S source_type ; - - typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ; - - static source_type nearbyint ( argument_type s ) - { - - - - using std::floor ; - using std::ceil ; - - - - S prev = floor(s); - S next = ceil(s); - - S rt = (s - prev) - (next - s); - - S const zero(0.0); - S const two(2.0); - - if ( rt < zero ) - return prev; - else if ( rt > zero ) - return next; - else - { - bool is_prev_even = two * floor(prev / two) == prev ; - return ( is_prev_even ? prev : next ) ; - } - } - - typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; -} ; - - -enum range_check_result -{ - cInRange = 0 , - cNegOverflow = 1 , - cPosOverflow = 2 -} ; - -class bad_numeric_cast : public std::bad_cast -{ - public: - - virtual const char * what() const noexcept - { return "bad numeric conversion: overflow"; } -}; - -class negative_overflow : public bad_numeric_cast -{ - public: - - virtual const char * what() const noexcept - { return "bad numeric conversion: negative overflow"; } -}; -class positive_overflow : public bad_numeric_cast -{ - public: - - virtual const char * what() const noexcept - { return "bad numeric conversion: positive overflow"; } -}; - -struct def_overflow_handler -{ - void operator() ( range_check_result r ) - { - - if ( r == cNegOverflow ) - throw negative_overflow() ; - else if ( r == cPosOverflow ) - throw positive_overflow() ; - - - - - - - } -} ; - -struct silent_overflow_handler -{ - void operator() ( range_check_result ) {} -} ; - -template<class Traits> -struct raw_converter -{ - typedef typename Traits::result_type result_type ; - typedef typename Traits::argument_type argument_type ; - - static result_type low_level_convert ( argument_type s ) { return static_cast<result_type>(s) ; } -} ; - -struct UseInternalRangeChecker {} ; - -} } -# 15 "/usr/include/boost/numeric/conversion/converter.hpp" 2 3 4 - -# 1 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/bounds.hpp" 1 3 4 -# 13 "/usr/include/boost/numeric/conversion/bounds.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/bounds.hpp" 1 3 4 -# 17 "/usr/include/boost/numeric/conversion/detail/bounds.hpp" 3 4 -namespace boost { namespace numeric { namespace boundsdetail -{ - template<class N> - class Integral - { - typedef std::numeric_limits<N> limits ; - - public : - - static N lowest () { return limits::min (); } - static N highest () { return limits::max (); } - static N smallest() { return static_cast<N>(1); } - } ; - - template<class N> - class Float - { - typedef std::numeric_limits<N> limits ; - - public : - - static N lowest () { return static_cast<N>(-limits::max ()) ; } - static N highest () { return limits::max (); } - static N smallest() { return limits::min (); } - } ; - - template<class N> - struct get_impl - { - typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ; - - typedef Integral<N> impl_int ; - typedef Float <N> impl_float ; - - typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ; - } ; - -} } } -# 14 "/usr/include/boost/numeric/conversion/bounds.hpp" 2 3 4 - -namespace boost { namespace numeric -{ - -template<class N> -struct bounds : boundsdetail::get_impl<N>::type -{} ; - -} } -# 18 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 2 3 4 - - - - - -namespace boost { namespace numeric { namespace convdetail -{ - - typedef mpl::integral_c<std::float_round_style, std::round_toward_zero> round2zero_c ; - typedef mpl::integral_c<std::float_round_style, std::round_to_nearest> round2nearest_c ; - typedef mpl::integral_c<std::float_round_style, std::round_toward_infinity> round2inf_c ; - typedef mpl::integral_c<std::float_round_style, std::round_toward_neg_infinity> round2neg_inf_c ; -# 40 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class RoundStyle,class RoundToZero,class RoundToNearest,class RoundToInf,class RoundToNegInf> - struct for_round_style - { - typedef ct_switch4<RoundStyle - , round2zero_c, round2nearest_c, round2inf_c - , RoundToZero , RoundToNearest , RoundToInf , RoundToNegInf - > selector ; - - typedef typename selector::type type ; - } ; -# 81 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - struct non_applicable { typedef mpl::false_ do_apply ; } ; - struct applicable { typedef mpl::true_ do_apply ; } ; -# 96 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits> - struct LT_LoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast<S>(bounds<T>::lowest()) ? cNegOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct LT_Zero : applicable - { - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast<S>(0) ? cNegOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct LE_PrevLoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s <= static_cast<S>(bounds<T>::lowest()) - static_cast<S>(1.0) - ? cNegOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct LT_HalfPrevLoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast<S>(bounds<T>::lowest()) - static_cast<S>(0.5) - ? cNegOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct GT_HiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s > static_cast<S>(bounds<T>::highest()) - ? cPosOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct GE_SuccHiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(1.0) - ? cPosOverflow : cInRange ; - } - } ; - - - - template<class Traits> - struct GT_HalfSuccHiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(0.5) - ? cPosOverflow : cInRange ; - } - } ; -# 215 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class PredA, class PredB> - struct applyBoth - { - typedef typename PredA::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - range_check_result r = PredA::apply(s) ; - if ( r == cInRange ) - r = PredB::apply(s); - return r ; - } - } ; - - template<class PredA, class PredB> - struct combine - { - typedef applyBoth<PredA,PredB> Both ; - typedef void NNone ; - - typedef typename PredA::do_apply do_applyA ; - typedef typename PredB::do_apply do_applyB ; - - typedef typename for_both<do_applyA, do_applyB, Both, PredA, PredB, NNone>::type type ; - } ; -# 262 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits> - struct dummy_range_checker - { - typedef typename Traits::argument_type argument_type ; - - static range_check_result out_of_range ( argument_type ) { return cInRange ; } - static void validate_range ( argument_type ) {} - } ; -# 279 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits, class IsNegOverflow, class IsPosOverflow, class OverflowHandler> - struct generic_range_checker - { - typedef OverflowHandler overflow_handler ; - - typedef typename Traits::argument_type argument_type ; - - static range_check_result out_of_range ( argument_type s ) - { - typedef typename combine<IsNegOverflow,IsPosOverflow>::type Predicate ; - - return Predicate::apply(s); - } - - static void validate_range ( argument_type s ) - { OverflowHandler()( out_of_range(s) ) ; } - } ; -# 305 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits,class OverflowHandler> - struct GetRC_Sig2Sig_or_Unsig2Unsig - { - typedef dummy_range_checker<Traits> Dummy ; - - typedef LT_LoT<Traits> Pred1 ; - typedef GT_HiT<Traits> Pred2 ; - - typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ; - - typedef typename Traits::subranged subranged ; - - typedef typename mpl::if_<subranged,Normal,Dummy>::type type ; - } ; - - template<class Traits, class OverflowHandler> - struct GetRC_Sig2Unsig - { - typedef LT_Zero<Traits> Pred1 ; - typedef GT_HiT <Traits> Pred2 ; - - typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ChoiceA ; - - typedef generic_range_checker<Traits,Pred1,non_applicable,OverflowHandler> ChoiceB ; - - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - - typedef typename subranged_Unsig2Sig<S,T>::type oposite_subranged ; - - typedef typename mpl::not_<oposite_subranged>::type positively_subranged ; - - typedef typename mpl::if_<positively_subranged,ChoiceA,ChoiceB>::type type ; - } ; - - template<class Traits, class OverflowHandler> - struct GetRC_Unsig2Sig - { - typedef GT_HiT<Traits> Pred1 ; - - typedef generic_range_checker<Traits,non_applicable,Pred1,OverflowHandler> type ; - } ; - - template<class Traits,class OverflowHandler> - struct GetRC_Int2Int - { - typedef GetRC_Sig2Sig_or_Unsig2Unsig<Traits,OverflowHandler> Sig2SigQ ; - typedef GetRC_Sig2Unsig <Traits,OverflowHandler> Sig2UnsigQ ; - typedef GetRC_Unsig2Sig <Traits,OverflowHandler> Unsig2SigQ ; - typedef Sig2SigQ Unsig2UnsigQ ; - - typedef typename Traits::sign_mixture sign_mixture ; - - typedef typename - for_sign_mixture<sign_mixture,Sig2SigQ,Sig2UnsigQ,Unsig2SigQ,Unsig2UnsigQ>::type - selector ; - - typedef typename selector::type type ; - } ; - - template<class Traits> - struct GetRC_Int2Float - { - typedef dummy_range_checker<Traits> type ; - } ; - - template<class Traits, class OverflowHandler, class Float2IntRounder> - struct GetRC_Float2Int - { - typedef LE_PrevLoT <Traits> Pred1 ; - typedef GE_SuccHiT <Traits> Pred2 ; - typedef LT_HalfPrevLoT<Traits> Pred3 ; - typedef GT_HalfSuccHiT<Traits> Pred4 ; - typedef GT_HiT <Traits> Pred5 ; - typedef LT_LoT <Traits> Pred6 ; - - typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ToZero ; - typedef generic_range_checker<Traits,Pred3,Pred4,OverflowHandler> ToNearest ; - typedef generic_range_checker<Traits,Pred1,Pred5,OverflowHandler> ToInf ; - typedef generic_range_checker<Traits,Pred6,Pred2,OverflowHandler> ToNegInf ; - - typedef typename Float2IntRounder::round_style round_style ; - - typedef typename for_round_style<round_style,ToZero,ToNearest,ToInf,ToNegInf>::type type ; - } ; - - template<class Traits, class OverflowHandler> - struct GetRC_Float2Float - { - typedef dummy_range_checker<Traits> Dummy ; - - typedef LT_LoT<Traits> Pred1 ; - typedef GT_HiT<Traits> Pred2 ; - - typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ; - - typedef typename Traits::subranged subranged ; - - typedef typename mpl::if_<subranged,Normal,Dummy>::type type ; - } ; - - template<class Traits, class OverflowHandler, class Float2IntRounder> - struct GetRC_BuiltIn2BuiltIn - { - typedef GetRC_Int2Int<Traits,OverflowHandler> Int2IntQ ; - typedef GetRC_Int2Float<Traits> Int2FloatQ ; - typedef GetRC_Float2Int<Traits,OverflowHandler,Float2IntRounder> Float2IntQ ; - typedef GetRC_Float2Float<Traits,OverflowHandler> Float2FloatQ ; - - typedef typename Traits::int_float_mixture int_float_mixture ; - - typedef typename for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ>::type selector ; - - typedef typename selector::type type ; - } ; - - template<class Traits, class OverflowHandler, class Float2IntRounder> - struct GetRC - { - typedef GetRC_BuiltIn2BuiltIn<Traits,OverflowHandler,Float2IntRounder> BuiltIn2BuiltInQ ; - - typedef dummy_range_checker<Traits> Dummy ; - - typedef mpl::identity<Dummy> DummyQ ; - - typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; - - typedef typename for_udt_builtin_mixture<udt_builtin_mixture,BuiltIn2BuiltInQ,DummyQ,DummyQ,DummyQ>::type selector ; - - typedef typename selector::type type ; - } ; -# 452 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits> - struct trivial_converter_impl : public dummy_range_checker<Traits> - { - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static result_type low_level_convert ( argument_type s ) { return s ; } - static source_type nearbyint ( argument_type s ) { return s ; } - static result_type convert ( argument_type s ) { return s ; } - } ; - - - - - - template<class Traits,class RangeChecker,class RawConverter,class Float2IntRounder> - struct rounding_converter : public RangeChecker - ,public Float2IntRounder - ,public RawConverter - { - typedef RangeChecker RangeCheckerBase ; - typedef Float2IntRounder Float2IntRounderBase ; - typedef RawConverter RawConverterBase ; - - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static result_type convert ( argument_type s ) - { - RangeCheckerBase::validate_range(s); - source_type s1 = Float2IntRounderBase::nearbyint(s); - return RawConverterBase::low_level_convert(s1); - } - } ; - - - - - - template<class Traits,class RangeChecker,class RawConverter> - struct non_rounding_converter : public RangeChecker - ,public RawConverter - { - typedef RangeChecker RangeCheckerBase ; - typedef RawConverter RawConverterBase ; - - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static source_type nearbyint ( argument_type s ) { return s ; } - - static result_type convert ( argument_type s ) - { - RangeCheckerBase::validate_range(s); - return RawConverterBase::low_level_convert(s); - } - } ; -# 528 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - template<class Traits,class OverflowHandler,class Float2IntRounder,class RawConverter, class UserRangeChecker> - struct get_non_trivial_converter - { - typedef GetRC<Traits,OverflowHandler,Float2IntRounder> InternalRangeCheckerQ ; - - typedef is_same<UserRangeChecker,UseInternalRangeChecker> use_internal_RC ; - - typedef mpl::identity<UserRangeChecker> UserRangeCheckerQ ; - - typedef typename - mpl::eval_if<use_internal_RC,InternalRangeCheckerQ,UserRangeCheckerQ>::type - RangeChecker ; - - typedef non_rounding_converter<Traits,RangeChecker,RawConverter> NonRounding ; - typedef rounding_converter<Traits,RangeChecker,RawConverter,Float2IntRounder> Rounding ; - - typedef mpl::identity<NonRounding> NonRoundingQ ; - typedef mpl::identity<Rounding> RoundingQ ; - - typedef typename Traits::int_float_mixture int_float_mixture ; - - typedef typename - for_int_float_mixture<int_float_mixture, NonRoundingQ, NonRoundingQ, RoundingQ, NonRoundingQ>::type - selector ; - - typedef typename selector::type type ; - } ; - - template< class Traits - ,class OverflowHandler - ,class Float2IntRounder - ,class RawConverter - ,class UserRangeChecker - > - struct get_converter_impl - { -# 574 "/usr/include/boost/numeric/conversion/detail/converter.hpp" 3 4 - typedef trivial_converter_impl<Traits> Trivial ; - typedef mpl::identity <Trivial> TrivialQ ; - - typedef get_non_trivial_converter< Traits - ,OverflowHandler - ,Float2IntRounder - ,RawConverter - ,UserRangeChecker - > NonTrivialQ ; - - typedef typename Traits::trivial trivial ; - - typedef typename mpl::eval_if<trivial,TrivialQ,NonTrivialQ>::type type ; - } ; - -} } } -# 17 "/usr/include/boost/numeric/conversion/converter.hpp" 2 3 4 - -namespace boost { namespace numeric -{ - -template<class T, - class S, - class Traits = conversion_traits<T,S>, - class OverflowHandler = def_overflow_handler, - class Float2IntRounder = Trunc< typename Traits::source_type> , - class RawConverter = raw_converter<Traits>, - class UserRangeChecker = UseInternalRangeChecker - > -struct converter : convdetail::get_converter_impl<Traits, - OverflowHandler, - Float2IntRounder, - RawConverter, - UserRangeChecker - >::type -{ - typedef Traits traits ; - - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - result_type operator() ( argument_type s ) const { return this->convert(s) ; } -} ; - - - -template<class S, - class OverflowHandler = def_overflow_handler, - class Float2IntRounder = Trunc<S> , - class UserRangeChecker = UseInternalRangeChecker - > -struct make_converter_from -{ - template<class T, - class Traits = conversion_traits<T,S>, - class RawConverter = raw_converter<Traits> - > - struct to - { - typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ; - } ; - -} ; - -} } -# 34 "/usr/include/boost/numeric/conversion/cast.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/numeric_cast_traits.hpp" 1 3 4 -# 14 "/usr/include/boost/numeric/conversion/numeric_cast_traits.hpp" 3 4 -namespace boost { namespace numeric { - - template <typename Target, typename Source, typename EnableIf = void> - struct numeric_cast_traits - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<Source> rounding_policy; - }; - -}} - - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 28 "/usr/include/boost/numeric/conversion/numeric_cast_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 1 3 4 -# 12 "/usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 3 4 -# 1 "/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp" 1 3 4 -# 12 "/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp" 3 4 -namespace boost { namespace numeric { - - template <> - struct numeric_cast_traits - < - char - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , signed char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<signed char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , unsigned char - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned char> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , unsigned short - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned short> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , unsigned int - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned int> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , unsigned long - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<unsigned long> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , float - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<float> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<double> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , long double - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<long double> rounding_policy; - }; -}} -# 13 "/usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 2 3 4 - - -# 1 "/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp" 1 3 4 -# 9 "/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp" 3 4 -namespace boost { namespace numeric { - - - template <> - struct numeric_cast_traits - < - char - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - char - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - signed char - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned char - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - short - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned short - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - int - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned int - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - unsigned long - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - float - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - double - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - long double - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - boost::long_long_type - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - boost::long_long_type - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - boost::ulong_long_type - , boost::long_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::long_long_type> rounding_policy; - }; - - template <> - struct numeric_cast_traits - < - boost::ulong_long_type - , boost::ulong_long_type - > - { - typedef def_overflow_handler overflow_policy; - typedef UseInternalRangeChecker range_checking_policy; - typedef Trunc<boost::ulong_long_type> rounding_policy; - }; -}} -# 16 "/usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 2 3 4 -# 29 "/usr/include/boost/numeric/conversion/numeric_cast_traits.hpp" 2 3 4 -# 35 "/usr/include/boost/numeric/conversion/cast.hpp" 2 3 4 - -namespace boost -{ - template <typename Target, typename Source> - inline Target numeric_cast( Source arg ) - { - typedef numeric::conversion_traits<Target, Source> conv_traits; - typedef numeric::numeric_cast_traits<Target, Source> cast_traits; - typedef boost::numeric::converter - < - Target, - Source, - conv_traits, - typename cast_traits::overflow_policy, - typename cast_traits::rounding_policy, - boost::numeric::raw_converter< conv_traits >, - typename cast_traits::range_checking_policy - > converter; - return converter::convert(arg); - } - - using numeric::bad_numeric_cast; -} -# 37 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 2 3 4 - -namespace boost { namespace detail { - -template <class Source > -struct detect_precision_loss -{ - typedef Source source_type; - typedef boost::numeric::Trunc<Source> Rounder; - typedef typename conditional< - boost::is_arithmetic<Source>::value, Source, Source const& - >::type argument_type ; - - static inline source_type nearbyint(argument_type s, bool& is_ok) noexcept { - const source_type near_int = Rounder::nearbyint(s); - if (near_int && is_ok) { - const source_type orig_div_round = s / near_int; - const source_type eps = std::numeric_limits<source_type>::epsilon(); - - is_ok = !((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps); - } - - return s; - } - - typedef typename Rounder::round_style round_style; -}; - -template <typename Base, class Source> -struct fake_precision_loss: public Base -{ - typedef Source source_type ; - typedef typename conditional< - boost::is_arithmetic<Source>::value, Source, Source const& - >::type argument_type ; - - static inline source_type nearbyint(argument_type s, bool& ) noexcept { - return s; - } -}; - -struct nothrow_overflow_handler -{ - inline bool operator() ( boost::numeric::range_check_result r ) const noexcept { - return (r == boost::numeric::cInRange); - } -}; - -template <typename Target, typename Source> -inline bool noexcept_numeric_convert(const Source& arg, Target& result) noexcept { - typedef boost::numeric::converter< - Target, - Source, - boost::numeric::conversion_traits<Target, Source >, - nothrow_overflow_handler, - detect_precision_loss<Source > - > converter_orig_t; - - typedef typename boost::conditional< - boost::is_base_of< detect_precision_loss<Source >, converter_orig_t >::value, - converter_orig_t, - fake_precision_loss<converter_orig_t, Source> - >::type converter_t; - - bool res = nothrow_overflow_handler()(converter_t::out_of_range(arg)); - result = converter_t::low_level_convert(converter_t::nearbyint(arg, res)); - return res; -} - -template <typename Target, typename Source> -struct lexical_cast_dynamic_num_not_ignoring_minus -{ - static inline bool try_convert(const Source &arg, Target& result) noexcept { - return noexcept_numeric_convert<Target, Source >(arg, result); - } -}; - -template <typename Target, typename Source> -struct lexical_cast_dynamic_num_ignoring_minus -{ - static inline bool try_convert(const Source &arg, Target& result) noexcept { - typedef typename boost::conditional< - boost::is_float<Source>::value, - boost::type_identity<Source>, - boost::make_unsigned<Source> - >::type usource_lazy_t; - typedef typename usource_lazy_t::type usource_t; - - if (arg < 0) { - const bool res = noexcept_numeric_convert<Target, usource_t>(0u - arg, result); - result = static_cast<Target>(0u - result); - return res; - } else { - return noexcept_numeric_convert<Target, usource_t>(arg, result); - } - } -}; -# 152 "/usr/include/boost/lexical_cast/detail/converter_numeric.hpp" 3 4 -template <typename Target, typename Source> -struct dynamic_num_converter_impl -{ - static inline bool try_convert(const Source &arg, Target& result) noexcept { - typedef typename boost::conditional< - boost::is_unsigned<Target>::value && - (boost::is_signed<Source>::value || boost::is_float<Source>::value) && - !(boost::is_same<Source, bool>::value) && - !(boost::is_same<Target, bool>::value), - lexical_cast_dynamic_num_ignoring_minus<Target, Source>, - lexical_cast_dynamic_num_not_ignoring_minus<Target, Source> - >::type caster_type; - - return caster_type::try_convert(arg, result); - } -}; - -}} -# 44 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - -# 38 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 -# 1 "/usr/include/boost/type_traits/has_left_shift.hpp" 1 3 4 -# 43 "/usr/include/boost/type_traits/has_left_shift.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 -# 43 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 3 -namespace boost -{ - - namespace binary_op_detail { - - struct dont_care; - - template <class T, class U, class Ret, class = void> - struct has_left_shift_ret_imp : public boost::false_type {}; - - template <class T, class U, class Ret> - struct has_left_shift_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_left_shift_void_imp : public boost::false_type {}; - - template <class T, class U> - struct has_left_shift_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_left_shift_dc_imp : public boost::false_type {}; - - template <class T, class U> - struct has_left_shift_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_left_shift : public boost::binary_op_detail:: has_left_shift_ret_imp <T, U, Ret> {}; - template <class T, class U> - struct has_left_shift<T, U, void> : public boost::binary_op_detail:: has_left_shift_void_imp <T, U> {}; - template <class T, class U> - struct has_left_shift<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_left_shift_dc_imp <T, U> {}; - - -} -# 44 "/usr/include/boost/type_traits/has_left_shift.hpp" 2 3 4 -# 39 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/has_right_shift.hpp" 1 3 4 -# 43 "/usr/include/boost/type_traits/has_right_shift.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 -# 43 "/usr/include/boost/type_traits/detail/has_binary_operator.hpp" 3 -namespace boost -{ - - namespace binary_op_detail { - - struct dont_care; - - template <class T, class U, class Ret, class = void> - struct has_right_shift_ret_imp : public boost::false_type {}; - - template <class T, class U, class Ret> - struct has_right_shift_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_right_shift_void_imp : public boost::false_type {}; - - template <class T, class U> - struct has_right_shift_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_right_shift_dc_imp : public boost::false_type {}; - - template <class T, class U> - struct has_right_shift_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_right_shift : public boost::binary_op_detail:: has_right_shift_ret_imp <T, U, Ret> {}; - template <class T, class U> - struct has_right_shift<T, U, void> : public boost::binary_op_detail:: has_right_shift_void_imp <T, U> {}; - template <class T, class U> - struct has_right_shift<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_right_shift_dc_imp <T, U> {}; - - -} -# 44 "/usr/include/boost/type_traits/has_right_shift.hpp" 2 3 4 -# 40 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - -# 1 "/usr/include/boost/detail/lcast_precision.hpp" 1 3 4 -# 11 "/usr/include/boost/detail/lcast_precision.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/climits" 2 3 -# 12 "/usr/include/boost/detail/lcast_precision.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/integer_traits.hpp" 1 3 4 -# 23 "/usr/include/boost/integer_traits.hpp" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 24 "/usr/include/boost/integer_traits.hpp" 2 3 4 -# 39 "/usr/include/boost/integer_traits.hpp" 3 4 - -# 40 "/usr/include/boost/integer_traits.hpp" 3 - - -namespace boost { -template<class T> -class integer_traits : public std::numeric_limits<T> -{ -public: - static const bool is_integral = false; -}; - -namespace detail { -template<class T, T min_val, T max_val> -class integer_traits_base -{ -public: - static const bool is_integral = true; - static const T const_min = min_val; - static const T const_max = max_val; -}; - - - -template<class T, T min_val, T max_val> -const bool integer_traits_base<T, min_val, max_val>::is_integral; - -template<class T, T min_val, T max_val> -const T integer_traits_base<T, min_val, max_val>::const_min; - -template<class T, T min_val, T max_val> -const T integer_traits_base<T, min_val, max_val>::const_max; - - -} - -template<> -class integer_traits<bool> - : public std::numeric_limits<bool>, - public detail::integer_traits_base<bool, false, true> -{ }; - -template<> -class integer_traits<char> - : public std::numeric_limits<char>, - public detail::integer_traits_base<char, (-0x7f - 1), 0x7f> -{ }; - -template<> -class integer_traits<signed char> - : public std::numeric_limits<signed char>, - public detail::integer_traits_base<signed char, (-0x7f - 1), 0x7f> -{ }; - -template<> -class integer_traits<unsigned char> - : public std::numeric_limits<unsigned char>, - public detail::integer_traits_base<unsigned char, 0, (0x7f * 2 + 1)> -{ }; - - -template<> -class integer_traits<wchar_t> - : public std::numeric_limits<wchar_t>, - - - - public detail::integer_traits_base<wchar_t, (-0x7fffffff - 1), 0x7fffffff> -# 125 "/usr/include/boost/integer_traits.hpp" 3 -{ }; - - -template<> -class integer_traits<short> - : public std::numeric_limits<short>, - public detail::integer_traits_base<short, (-0x7fff - 1), 0x7fff> -{ }; - -template<> -class integer_traits<unsigned short> - : public std::numeric_limits<unsigned short>, - public detail::integer_traits_base<unsigned short, 0, (0x7fff * 2 + 1)> -{ }; - -template<> -class integer_traits<int> - : public std::numeric_limits<int>, - public detail::integer_traits_base<int, (-0x7fffffff - 1), 0x7fffffff> -{ }; - -template<> -class integer_traits<unsigned int> - : public std::numeric_limits<unsigned int>, - public detail::integer_traits_base<unsigned int, 0, (0x7fffffff * 2U + 1U)> -{ }; - -template<> -class integer_traits<long> - : public std::numeric_limits<long>, - public detail::integer_traits_base<long, (-0x7fffffffffffffffL - 1L), 0x7fffffffffffffffL> -{ }; - -template<> -class integer_traits<unsigned long> - : public std::numeric_limits<unsigned long>, - public detail::integer_traits_base<unsigned long, 0, (0x7fffffffffffffffL * 2UL + 1UL)> -{ }; - - - - -template<> -class integer_traits< ::boost::long_long_type> - : public std::numeric_limits< ::boost::long_long_type>, - public detail::integer_traits_base< ::boost::long_long_type, (-0x7fffffffffffffffLL -1), 0x7fffffffffffffffLL> -{ }; - -template<> -class integer_traits< ::boost::ulong_long_type> - : public std::numeric_limits< ::boost::ulong_long_type>, - public detail::integer_traits_base< ::boost::ulong_long_type, 0, (0x7fffffffffffffffLL * 2ULL + 1)> -{ }; -# 251 "/usr/include/boost/integer_traits.hpp" 3 -} -# 17 "/usr/include/boost/detail/lcast_precision.hpp" 2 3 4 -# 36 "/usr/include/boost/detail/lcast_precision.hpp" 3 4 -namespace boost { namespace detail { - -class lcast_abstract_stub {}; - - - - - -template<class T> -struct lcast_precision -{ - - - - typedef typename boost::conditional< - boost::is_abstract<T>::value - , std::numeric_limits<lcast_abstract_stub> - , std::numeric_limits<T> - >::type limits; - - - static const bool use_default_precision = !limits::is_specialized || limits::is_exact - - ; - - static const bool is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 - - - ; - - static const bool is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 - - - ; - - static const std::streamsize streamsize_max = boost::integer_traits<std::streamsize>::const_max - - ; - - static const unsigned int precision_dec = limits::digits10 + 1U; - - static_assert(!is_specialized_dec || precision_dec <= streamsize_max + 0UL, "!is_specialized_dec || precision_dec <= streamsize_max + 0UL") - - ; - - static const unsigned long precision_bin = 2UL + limits::digits * 30103UL / 100000UL - - ; - - static_assert(!is_specialized_bin || (limits::digits + 0UL < (0x7fffffffffffffffL * 2UL + 1UL) / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL), "!is_specialized_bin || (limits::digits + 0UL < ULONG_MAX / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL)") - - - - ; - - static const std::streamsize value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 - - - ; -}; - - -template<class T> -inline std::streamsize lcast_get_precision(T* = 0) -{ - - return lcast_precision<T>::value; -# 166 "/usr/include/boost/detail/lcast_precision.hpp" 3 4 -} - -template<class T> -inline void lcast_set_precision(std::ios_base& stream, T*) -{ - stream.precision(lcast_get_precision<T>()); -} - -template<class Source, class Target> -inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) -{ - std::streamsize const s = lcast_get_precision(static_cast<Source*>(0)); - std::streamsize const t = lcast_get_precision(static_cast<Target*>(0)); - stream.precision(s > t ? s : t); -} - -}} -# 42 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - -# 1 "/usr/include/boost/lexical_cast/detail/widest_char.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/widest_char.hpp" 3 4 - - - - - - -namespace boost { namespace detail { - - template <typename TargetChar, typename SourceChar> - struct widest_char { - typedef typename boost::conditional< - (sizeof(TargetChar) > sizeof(SourceChar)) - , TargetChar - , SourceChar - >::type type; - }; - -}} -# 44 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - - - - - - -# 1 "/usr/include/boost/array.hpp" 1 3 4 -# 45 "/usr/include/boost/array.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 46 "/usr/include/boost/array.hpp" 2 3 4 - -# 1 "/usr/include/boost/swap.hpp" 1 3 4 -# 15 "/usr/include/boost/swap.hpp" 3 4 -# 1 "/usr/include/boost/core/swap.hpp" 1 3 4 -# 30 "/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); - } -} -# 16 "/usr/include/boost/swap.hpp" 2 3 4 -# 48 "/usr/include/boost/array.hpp" 2 3 4 - - -# 1 "/usr/include/boost/detail/iterator.hpp" 1 3 4 -# 16 "/usr/include/boost/detail/iterator.hpp" 3 4 -namespace boost -{ - -namespace detail -{ - -using std::iterator_traits; -using std::distance; -# 35 "/usr/include/boost/detail/iterator.hpp" 3 4 -} - -} -# 51 "/usr/include/boost/array.hpp" 2 3 4 - - - - - - - -namespace boost { - - template<class T, std::size_t N> - class array { - public: - T elems[N]; - - public: - - typedef T value_type; - typedef T* iterator; - typedef const T* const_iterator; - typedef T& reference; - typedef const T& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - - iterator begin() { return elems; } - const_iterator begin() const { return elems; } - const_iterator cbegin() const { return elems; } - - iterator end() { return elems+N; } - const_iterator end() const { return elems+N; } - const_iterator cend() const { return elems+N; } - - - - typedef std::reverse_iterator<iterator> reverse_iterator; - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -# 99 "/usr/include/boost/array.hpp" 3 4 - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - const_reverse_iterator crbegin() const { - return const_reverse_iterator(end()); - } - - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - const_reverse_iterator crend() const { - return const_reverse_iterator(begin()); - } - - - reference operator[](size_type i) - { - return (static_cast <bool> ((i < N)&&("out of range")) ? void (0) : __assert_fail ("(i < N)&&(\"out of range\")", "/usr/include/boost/array.hpp", 118, __extension__ __PRETTY_FUNCTION__)), elems[i]; - } - - const_reference operator[](size_type i) const - { - return (static_cast <bool> ((i < N)&&("out of range")) ? void (0) : __assert_fail ("(i < N)&&(\"out of range\")", "/usr/include/boost/array.hpp", 123, __extension__ __PRETTY_FUNCTION__)), elems[i]; - } - - - reference at(size_type i) { return rangecheck(i), elems[i]; } - const_reference at(size_type i) const { return rangecheck(i), elems[i]; } - - - reference front() - { - return elems[0]; - } - - constexpr const_reference front() const - { - return elems[0]; - } - - reference back() - { - return elems[N-1]; - } - - constexpr const_reference back() const - { - return elems[N-1]; - } - - - static constexpr size_type size() { return N; } - static constexpr bool empty() { return false; } - static constexpr size_type max_size() { return N; } - enum { static_size = N }; - - - void swap (array<T,N>& y) { - for (size_type i = 0; i < N; ++i) - boost::swap(elems[i],y.elems[i]); - } - - - const T* data() const { return elems; } - T* data() { return elems; } - - - T* c_array() { return elems; } - - - template <typename T2> - array<T,N>& operator= (const array<T2,N>& rhs) { - std::copy(rhs.begin(),rhs.end(), begin()); - return *this; - } - - - void assign (const T& value) { fill ( value ); } - void fill (const T& value) - { - std::fill_n(begin(),size(),value); - } - - - static constexpr bool rangecheck (size_type i) { - return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true; - } - - }; - - template< class T > - class array< T, 0 > { - - public: - - typedef T value_type; - typedef T* iterator; - typedef const T* const_iterator; - typedef T& reference; - typedef const T& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - - iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } - const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } - const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } - - iterator end() { return begin(); } - const_iterator end() const { return begin(); } - const_iterator cend() const { return cbegin(); } - - - - typedef std::reverse_iterator<iterator> reverse_iterator; - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; -# 228 "/usr/include/boost/array.hpp" 3 4 - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - const_reverse_iterator crbegin() const { - return const_reverse_iterator(end()); - } - - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - const_reverse_iterator crend() const { - return const_reverse_iterator(begin()); - } - - - reference operator[](size_type ) - { - return failed_rangecheck(); - } - - const_reference operator[](size_type ) const - { - return failed_rangecheck(); - } - - - reference at(size_type ) { return failed_rangecheck(); } - const_reference at(size_type ) const { return failed_rangecheck(); } - - - reference front() - { - return failed_rangecheck(); - } - - constexpr const_reference front() const - { - return failed_rangecheck(); - } - - reference back() - { - return failed_rangecheck(); - } - - constexpr const_reference back() const - { - return failed_rangecheck(); - } - - - static constexpr size_type size() { return 0; } - static constexpr bool empty() { return true; } - static constexpr size_type max_size() { return 0; } - enum { static_size = 0 }; - - void swap (array<T,0>& ) { - } - - - const T* data() const { return 0; } - T* data() { return 0; } - - - T* c_array() { return 0; } - - - template <typename T2> - array<T,0>& operator= (const array<T2,0>& ) { - return *this; - } - - - void assign (const T& value) { fill ( value ); } - void fill (const T& ) {} - - - static reference failed_rangecheck () { - std::out_of_range e("attempt to access element of an empty array"); - boost::throw_exception(e); - - - - - - - static T placeholder; - return placeholder; - - } - }; - - - template<class T, std::size_t N> - bool operator== (const array<T,N>& x, const array<T,N>& y) { - return std::equal(x.begin(), x.end(), y.begin()); - } - template<class T, std::size_t N> - bool operator< (const array<T,N>& x, const array<T,N>& y) { - return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); - } - template<class T, std::size_t N> - bool operator!= (const array<T,N>& x, const array<T,N>& y) { - return !(x==y); - } - template<class T, std::size_t N> - bool operator> (const array<T,N>& x, const array<T,N>& y) { - return y<x; - } - template<class T, std::size_t N> - bool operator<= (const array<T,N>& x, const array<T,N>& y) { - return !(y<x); - } - template<class T, std::size_t N> - bool operator>= (const array<T,N>& x, const array<T,N>& y) { - return !(x<y); - } - - - template<class T, std::size_t N> - inline void swap (array<T,N>& x, array<T,N>& y) { - x.swap(y); - } -# 382 "/usr/include/boost/array.hpp" 3 4 - template <typename T, std::size_t N> - T(&get_c_array(boost::array<T,N>& arg))[N] - { - return arg.elems; - } - - - template <typename T, std::size_t N> - const T(&get_c_array(const boost::array<T,N>& arg))[N] - { - return arg.elems; - } -# 414 "/usr/include/boost/array.hpp" 3 4 - template <class It> std::size_t hash_range(It, It); - - template<class T, std::size_t N> - std::size_t hash_value(const array<T,N>& arr) - { - return boost::hash_range(arr.begin(), arr.end()); - } - - template <size_t Idx, typename T, size_t N> - T &get(boost::array<T,N> &arr) noexcept { - static_assert(Idx < N, "boost::get<>(boost::array &) index out of range"); - return arr[Idx]; - } - - template <size_t Idx, typename T, size_t N> - const T &get(const boost::array<T,N> &arr) noexcept { - static_assert(Idx < N, "boost::get<>(const boost::array &) index out of range"); - return arr[Idx]; - } - -} - - - -namespace std { - template <size_t Idx, typename T, size_t N> - T &get(boost::array<T,N> &arr) noexcept { - static_assert(Idx < N, "std::get<>(boost::array &) index out of range"); - return arr[Idx]; - } - - template <size_t Idx, typename T, size_t N> - const T &get(const boost::array<T,N> &arr) noexcept { - static_assert(Idx < N, "std::get<>(const boost::array &) index out of range"); - return arr[Idx]; - } -} -# 51 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - -# 1 "/usr/include/boost/container/container_fwd.hpp" 1 3 4 -# 19 "/usr/include/boost/container/container_fwd.hpp" 3 4 - -# 62 "/usr/include/boost/container/container_fwd.hpp" 3 4 -# 1 "/usr/include/boost/container/detail/std_fwd.hpp" 1 3 4 -# 19 "/usr/include/boost/container/detail/std_fwd.hpp" 3 4 - - - - - - - -# 1 "/usr/include/boost/move/detail/std_ns_begin.hpp" 1 3 4 -# 27 "/usr/include/boost/container/detail/std_fwd.hpp" 2 3 4 -namespace std __attribute__ ((__visibility__ ("default"))) { - -template<class T> -class allocator; - -template<class T> -struct less; - -template<class T> -struct equal_to; - -template<class T1, class T2> -struct pair; - -template<class T> -struct char_traits; - -struct input_iterator_tag; -struct forward_iterator_tag; -struct bidirectional_iterator_tag; -struct random_access_iterator_tag; - -template<class Container> -class insert_iterator; - -struct allocator_arg_t; - -struct piecewise_construct_t; - - } -# 1 "/usr/include/boost/move/detail/std_ns_end.hpp" 1 3 4 -# 58 "/usr/include/boost/container/detail/std_fwd.hpp" 2 3 4 -# 63 "/usr/include/boost/container/container_fwd.hpp" 2 3 4 - - -namespace boost{ -namespace intrusive{ -namespace detail{ - -}}} - -namespace boost{ namespace container{ namespace dtl{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} - -namespace boost{ namespace container{ namespace pmr{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} -# 89 "/usr/include/boost/container/container_fwd.hpp" 3 4 -namespace boost { -namespace container { - - - -template<class T1, class T2> -struct pair; - -template<class T> -class new_allocator; - -template <class T - ,class Allocator = void - ,class Options = void> -class vector; - -template <class T - ,class Allocator = void > -class stable_vector; - -template < class T - , std::size_t Capacity - , class Options = void> -class static_vector; - -template < class T - , class Allocator = void - , class Options = void > -class small_vector_base; - -template < class T - , std::size_t N - , class Allocator = void - , class Options = void > -class small_vector; - -template <class T - ,class Allocator = void - ,class Options = void> -class deque; - -template <class T - ,class Allocator = void > -class list; - -template <class T - ,class Allocator = void > -class slist; - -template <class Key - ,class Compare = std::less<Key> - ,class Allocator = void - ,class Options = void> -class set; - -template <class Key - ,class Compare = std::less<Key> - ,class Allocator = void - ,class Options = void > -class multiset; - -template <class Key - ,class T - ,class Compare = std::less<Key> - ,class Allocator = void - ,class Options = void > -class map; - -template <class Key - ,class T - ,class Compare = std::less<Key> - ,class Allocator = void - ,class Options = void > -class multimap; - -template <class Key - ,class Compare = std::less<Key> - ,class Allocator = void > -class flat_set; - -template <class Key - ,class Compare = std::less<Key> - ,class Allocator = void > -class flat_multiset; - -template <class Key - ,class T - ,class Compare = std::less<Key> - ,class Allocator = void > -class flat_map; - -template <class Key - ,class T - ,class Compare = std::less<Key> - ,class Allocator = void > -class flat_multimap; - -template <class CharT - ,class Traits = std::char_traits<CharT> - ,class Allocator = void > -class basic_string; - -typedef basic_string <char> string; -typedef basic_string<wchar_t> wstring; - -static const std::size_t ADP_nodes_per_block = 256u; -static const std::size_t ADP_max_free_blocks = 2u; -static const std::size_t ADP_overhead_percent = 1u; -static const std::size_t ADP_only_alignment = 0u; - -template < class T - , std::size_t NodesPerBlock = ADP_nodes_per_block - , std::size_t MaxFreeBlocks = ADP_max_free_blocks - , std::size_t OverheadPercent = ADP_overhead_percent - , unsigned Version = 2 - > -class adaptive_pool; - -template < class T - , unsigned Version = 2 - , unsigned int AllocationDisableMask = 0> -class allocator; - -static const std::size_t NodeAlloc_nodes_per_block = 256u; - -template - < class T - , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block - , std::size_t Version = 2> -class node_allocator; - -namespace pmr { - -class memory_resource; - -template<class T> -class polymorphic_allocator; - -class monotonic_buffer_resource; - -struct pool_options; - -template <class Allocator> -class resource_adaptor_imp; - -class unsynchronized_pool_resource; - -class synchronized_pool_resource; - -} - - - - - -struct ordered_range_t -{}; - - - -static const ordered_range_t ordered_range = ordered_range_t(); - - - -struct ordered_unique_range_t - : public ordered_range_t -{}; - - - -static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); - - - -struct default_init_t -{}; - - - -static const default_init_t default_init = default_init_t(); - - - - -struct value_init_t -{}; - - - -static const value_init_t value_init = value_init_t(); - -namespace container_detail_really_deep_namespace { - - - -struct dummy -{ - dummy() - { - (void)ordered_range; - (void)ordered_unique_range; - (void)default_init; - } -}; - -} - - - - -}} -# 53 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - -# 1 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 - -# 33 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 71 "/usr/include/c++/9.2.0/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++/9.2.0/cstring" 3 - -} -} -# 34 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstdio" 3 -# 35 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 61 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 -# 1 "/usr/include/boost/lexical_cast/detail/lcast_char_constants.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/lcast_char_constants.hpp" 3 4 - - - -namespace boost -{ - namespace detail - { - template < typename Char > - struct lcast_char_constants { - - - static const Char zero = static_cast<Char>('0'); - static const Char minus = static_cast<Char>('-'); - static const Char plus = static_cast<Char>('+'); - static const Char lowercase_e = static_cast<Char>('e'); - static const Char capital_e = static_cast<Char>('E'); - static const Char c_decimal_separator = static_cast<Char>('.'); - }; - } -} -# 62 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 3 4 - - - -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/climits" 2 3 -# 27 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 2 3 4 - - -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 30 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstdio" 3 -# 31 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 2 3 4 -# 53 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 3 4 -# 1 "/usr/include/boost/noncopyable.hpp" 1 3 4 -# 54 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 2 3 4 - -namespace boost -{ - namespace detail - { - template<class T> - inline - typename boost::make_unsigned<T>::type lcast_to_unsigned(const T value) noexcept { - typedef typename boost::make_unsigned<T>::type result_type; - return value < 0 - ? static_cast<result_type>(0u - static_cast<result_type>(value)) - : static_cast<result_type>(value); - } - } - - namespace detail - { - template <class Traits, class T, class CharT> - class lcast_put_unsigned: boost::noncopyable { - typedef typename Traits::int_type int_type; - typename boost::conditional< - (sizeof(unsigned) > sizeof(T)) - , unsigned - , T - >::type m_value; - CharT* m_finish; - CharT const m_czero; - int_type const m_zero; - - public: - lcast_put_unsigned(const T n_param, CharT* finish) noexcept - : m_value(n_param), m_finish(finish) - , m_czero(lcast_char_constants<CharT>::zero), m_zero(Traits::to_int_type(m_czero)) - { - - static_assert(!std::numeric_limits<T>::is_signed, "!std::numeric_limits<T>::is_signed"); - - } - - CharT* convert() { - - std::locale loc; - if (loc == std::locale::classic()) { - return main_convert_loop(); - } - - typedef std::numpunct<CharT> numpunct; - numpunct const& np = std::use_facet< numpunct >(loc); - std::string const grouping = np.grouping(); - std::string::size_type const grouping_size = grouping.size(); - - if (!grouping_size || grouping[0] <= 0) { - return main_convert_loop(); - } - - - - static_assert(std::numeric_limits<T>::digits10 < 0x7f, "std::numeric_limits<T>::digits10 < CHAR_MAX"); - - CharT const thousands_sep = np.thousands_sep(); - std::string::size_type group = 0; - char last_grp_size = grouping[0]; - char left = last_grp_size; - - do { - if (left == 0) { - ++group; - if (group < grouping_size) { - char const grp_size = grouping[group]; - last_grp_size = (grp_size <= 0 ? static_cast<char>(0x7f) : grp_size); - } - - left = last_grp_size; - --m_finish; - Traits::assign(*m_finish, thousands_sep); - } - - --left; - } while (main_convert_iteration()); - - return m_finish; - - - - } - - private: - inline bool main_convert_iteration() noexcept { - --m_finish; - int_type const digit = static_cast<int_type>(m_value % 10U); - Traits::assign(*m_finish, Traits::to_char_type(m_zero + digit)); - m_value /= 10; - return !!m_value; - } - - inline CharT* main_convert_loop() noexcept { - while (main_convert_iteration()); - return m_finish; - } - }; - } - - namespace detail - { - template <class Traits, class T, class CharT> - class lcast_ret_unsigned: boost::noncopyable { - bool m_multiplier_overflowed; - T m_multiplier; - T& m_value; - const CharT* const m_begin; - const CharT* m_end; - - public: - lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) noexcept - : m_multiplier_overflowed(false), m_multiplier(1), m_value(value), m_begin(begin), m_end(end) - { - - static_assert(!std::numeric_limits<T>::is_signed, "!std::numeric_limits<T>::is_signed"); - - - - - - - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast") - - ; - - } - - inline bool convert() { - CharT const czero = lcast_char_constants<CharT>::zero; - --m_end; - m_value = static_cast<T>(0); - - if (m_begin > m_end || *m_end < czero || *m_end >= czero + 10) - return false; - m_value = static_cast<T>(*m_end - czero); - --m_end; - - - - - std::locale loc; - if (loc == std::locale::classic()) { - return main_convert_loop(); - } - - typedef std::numpunct<CharT> numpunct; - numpunct const& np = std::use_facet< numpunct >(loc); - std::string const& grouping = np.grouping(); - std::string::size_type const grouping_size = grouping.size(); - - - - - if (!grouping_size || grouping[0] <= 0) { - return main_convert_loop(); - } - - unsigned char current_grouping = 0; - CharT const thousands_sep = np.thousands_sep(); - char remained = static_cast<char>(grouping[current_grouping] - 1); - - for (;m_end >= m_begin; --m_end) - { - if (remained) { - if (!main_convert_iteration()) { - return false; - } - --remained; - } else { - if ( !Traits::eq(*m_end, thousands_sep) ) - { -# 239 "/usr/include/boost/lexical_cast/detail/lcast_unsigned_converters.hpp" 3 4 - return main_convert_loop(); - } else { - if (m_begin == m_end) return false; - if (current_grouping < grouping_size - 1) ++current_grouping; - remained = grouping[current_grouping]; - } - } - } - - return true; - - } - - private: - - - inline bool main_convert_iteration() noexcept { - CharT const czero = lcast_char_constants<CharT>::zero; - T const maxv = (std::numeric_limits<T>::max)(); - - m_multiplier_overflowed = m_multiplier_overflowed || (maxv/10 < m_multiplier); - m_multiplier = static_cast<T>(m_multiplier * 10); - - T const dig_value = static_cast<T>(*m_end - czero); - T const new_sub_value = static_cast<T>(m_multiplier * dig_value); - - - - if (*m_end < czero || *m_end >= czero + 10 - || (dig_value && ( - m_multiplier_overflowed - || static_cast<T>(maxv / dig_value) < m_multiplier - || static_cast<T>(maxv - new_sub_value) < m_value - )) - ) return false; - - m_value = static_cast<T>(m_value + new_sub_value); - - return true; - } - - bool main_convert_loop() noexcept { - for ( ; m_end >= m_begin; --m_end) { - if (!main_convert_iteration()) { - return false; - } - } - - return true; - } - }; - } -} -# 63 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 1 "/usr/include/boost/lexical_cast/detail/inf_nan.hpp" 1 3 4 -# 23 "/usr/include/boost/lexical_cast/detail/inf_nan.hpp" 3 4 - - - - - - - - -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 32 "/usr/include/boost/lexical_cast/detail/inf_nan.hpp" 2 3 4 - - -# 1 "/usr/include/boost/math/special_functions/sign.hpp" 1 3 4 -# 16 "/usr/include/boost/math/special_functions/sign.hpp" 3 4 -# 1 "/usr/include/boost/math/tools/config.hpp" 1 3 4 -# 14 "/usr/include/boost/math/tools/config.hpp" 3 4 -# 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 - - - - - - - -# 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 -# 11 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 -# 1 "/usr/include/boost/predef/version_number.h" 1 3 4 -# 12 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 - - - - - - -# 1 "/usr/include/boost/predef/detail/test.h" 1 3 4 -# 8 "/usr/include/boost/predef/make.h" 2 3 4 -# 13 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 -# 82 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 -# 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 - - - - - - - -# 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 -# 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 - -# 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 -# 12 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 13 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 -# 45 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 -# 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 - - - - - - - -# 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 -# 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 - -# 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 -# 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 - -# 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 - -# 46 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 - - - - - -# 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 - -# 83 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 - - - - - -# 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 -# 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 - -# 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 -# 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 - -# 15 "/usr/include/boost/math/tools/config.hpp" 2 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 16 "/usr/include/boost/math/tools/config.hpp" 2 3 4 - - - - -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/climits" 2 3 -# 21 "/usr/include/boost/math/tools/config.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/cfloat" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cfloat" 3 4 - -# 40 "/usr/include/c++/9.2.0/cfloat" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/float.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/cfloat" 2 3 -# 22 "/usr/include/boost/math/tools/config.hpp" 2 3 4 - - - - - - - -# 1 "/usr/include/boost/math/tools/user.hpp" 1 3 4 -# 30 "/usr/include/boost/math/tools/config.hpp" 2 3 4 -# 335 "/usr/include/boost/math/tools/config.hpp" 3 4 -namespace boost{ namespace math{ -namespace tools -{ - -template <class T> -inline T max (T a, T b, T c) noexcept(std::is_floating_point<T>::value) -{ - return (std::max)((std::max)(a, b), c); -} - -template <class T> -inline T max (T a, T b, T c, T d) noexcept(std::is_floating_point<T>::value) -{ - return (std::max)((std::max)(a, b), (std::max)(c, d)); -} - -} - -template <class T> -void suppress_unused_variable_warning(const T&) noexcept(std::is_floating_point<T>::value) -{ -} - -namespace detail{ - -template <class T> -struct is_integer_for_rounding -{ - static const bool value = boost::is_integral<T>::value - - || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer) - - ; -}; - -} - -}} -# 17 "/usr/include/boost/math/special_functions/sign.hpp" 2 3 4 -# 1 "/usr/include/boost/math/special_functions/math_fwd.hpp" 1 3 4 -# 26 "/usr/include/boost/math/special_functions/math_fwd.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/vector" 1 3 4 -# 58 "/usr/include/c++/9.2.0/vector" 3 4 - -# 59 "/usr/include/c++/9.2.0/vector" 3 - - - - - - - -# 1 "/usr/include/c++/9.2.0/bits/stl_uninitialized.h" 1 3 -# 67 "/usr/include/c++/9.2.0/bits/stl_uninitialized.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - template<bool _TrivialValueTypes> - struct __uninitialized_copy - { - template<typename _InputIterator, typename _ForwardIterator> - static _ForwardIterator - __uninit_copy(_InputIterator __first, _InputIterator __last, - _ForwardIterator __result) - { - _ForwardIterator __cur = __result; - try - { - for (; __first != __last; ++__first, (void)++__cur) - std::_Construct(std::__addressof(*__cur), *__first); - return __cur; - } - catch(...) - { - std::_Destroy(__result, __cur); - throw; - } - } - }; - - 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); } - }; -# 113 "/usr/include/c++/9.2.0/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; - - - - - typedef typename iterator_traits<_InputIterator>::reference _RefType1; - typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; - const bool __assignable = is_assignable<_RefType2, _RefType1>::value; - - - return std::__uninitialized_copy<__is_trivial(_ValueType1) - && __is_trivial(_ValueType2) - && __assignable>:: - __uninit_copy(__first, __last, __result); - } - - - template<bool _TrivialValueType> - struct __uninitialized_fill - { - template<typename _ForwardIterator, typename _Tp> - static void - __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, - const _Tp& __x) - { - _ForwardIterator __cur = __first; - try - { - for (; __cur != __last; ++__cur) - std::_Construct(std::__addressof(*__cur), __x); - } - catch(...) - { - std::_Destroy(__first, __cur); - throw; - } - } - }; - - 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); } - }; -# 179 "/usr/include/c++/9.2.0/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 __assignable = is_copy_assignable<_ValueType>::value; - - - std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: - __uninit_fill(__first, __last, __x); - } - - - template<bool _TrivialValueType> - struct __uninitialized_fill_n - { - template<typename _ForwardIterator, typename _Size, typename _Tp> - static _ForwardIterator - __uninit_fill_n(_ForwardIterator __first, _Size __n, - const _Tp& __x) - { - _ForwardIterator __cur = __first; - try - { - for (; __n > 0; --__n, (void) ++__cur) - std::_Construct(std::__addressof(*__cur), __x); - return __cur; - } - catch(...) - { - std::_Destroy(__first, __cur); - throw; - } - } - }; - - 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); } - }; -# 242 "/usr/include/c++/9.2.0/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 __assignable = is_copy_assignable<_ValueType>::value; - - return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: - __uninit_fill_n(__first, __n, __x); - } - - - - - - - - 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); } -# 378 "/usr/include/c++/9.2.0/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; - } - } - - - - - - 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) - { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - - std::fill(__first, __last, _ValueType()); - } - }; - - template<bool _TrivialValueType> - struct __uninitialized_default_n_1 - { - template<typename _ForwardIterator, typename _Size> - static _ForwardIterator - __uninit_default_n(_ForwardIterator __first, _Size __n) - { - _ForwardIterator __cur = __first; - try - { - for (; __n > 0; --__n, (void) ++__cur) - std::_Construct(std::__addressof(*__cur)); - return __cur; - } - catch(...) - { - std::_Destroy(__first, __cur); - throw; - } - } - }; - - template<> - struct __uninitialized_default_n_1<true> - { - template<typename _ForwardIterator, typename _Size> - static _ForwardIterator - __uninit_default_n(_ForwardIterator __first, _Size __n) - { - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType; - - return std::fill_n(__first, __n, _ValueType()); - } - }; - - - - - 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; - - const bool __assignable = is_copy_assignable<_ValueType>::value; - - return __uninitialized_default_n_1<__is_trivial(_ValueType) - && __assignable>:: - __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}; - } -# 810 "/usr/include/c++/9.2.0/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)); - } -# 885 "/usr/include/c++/9.2.0/bits/stl_uninitialized.h" 3 - template<typename _Tp, typename _Up, typename _Allocator> - inline void - __relocate_object_a(_Tp* __dest, _Up* __orig, _Allocator& __alloc) - noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, - __dest, std::move(*__orig))) - && noexcept(std::allocator_traits<_Allocator>::destroy( - __alloc, std::__addressof(*__orig)))) - { - typedef std::allocator_traits<_Allocator> __traits; - __traits::construct(__alloc, __dest, std::move(*__orig)); - __traits::destroy(__alloc, std::__addressof(*__orig)); - } - - - - template<typename _Tp, typename = void> - struct __is_bitwise_relocatable - : is_trivial<_Tp> { }; - - template <typename _Tp, typename _Up> - inline __enable_if_t<std::__is_bitwise_relocatable<_Tp>::value, _Tp*> - __relocate_a_1(_Tp* __first, _Tp* __last, - _Tp* __result, allocator<_Up>&) noexcept - { - ptrdiff_t __count = __last - __first; - if (__count > 0) - __builtin_memmove(__result, __first, __count * sizeof(_Tp)); - return __result + __count; - } - - template <typename _InputIterator, typename _ForwardIterator, - typename _Allocator> - inline _ForwardIterator - __relocate_a_1(_InputIterator __first, _InputIterator __last, - _ForwardIterator __result, _Allocator& __alloc) - noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), - std::addressof(*__first), - __alloc))) - { - typedef typename iterator_traits<_InputIterator>::value_type - _ValueType; - typedef typename iterator_traits<_ForwardIterator>::value_type - _ValueType2; - static_assert(std::is_same<_ValueType, _ValueType2>::value, - "relocation is only possible for values of the same type"); - _ForwardIterator __cur = __result; - for (; __first != __last; ++__first, (void)++__cur) - std::__relocate_object_a(std::__addressof(*__cur), - std::__addressof(*__first), __alloc); - return __cur; - } - - template <typename _InputIterator, typename _ForwardIterator, - typename _Allocator> - inline _ForwardIterator - __relocate_a(_InputIterator __first, _InputIterator __last, - _ForwardIterator __result, _Allocator& __alloc) - noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), - std::__niter_base(__last), - std::__niter_base(__result), __alloc))) - { - return __relocate_a_1(std::__niter_base(__first), - std::__niter_base(__last), - std::__niter_base(__result), __alloc); - } - - - -} -# 67 "/usr/include/c++/9.2.0/vector" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_vector.h" 1 3 -# 74 "/usr/include/c++/9.2.0/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)) - { } -# 267 "/usr/include/c++/9.2.0/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; - } - }; -# 385 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - template<typename _Tp, typename _Alloc = std::allocator<_Tp> > - class vector : protected _Vector_base<_Tp, _Alloc> - { -# 398 "/usr/include/c++/9.2.0/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"); - - - - - - - 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 - { - using __do_it = __bool_constant<_S_use_relocate()>; - return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); - } - - - protected: - using _Base::_M_allocate; - using _Base::_M_deallocate; - using _Base::_M_impl; - using _Base::_M_get_Tp_allocator; - - public: - - - - - - - - vector() = default; -# 493 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - explicit - vector(const allocator_type& __a) noexcept - : _Base(__a) { } -# 506 "/usr/include/c++/9.2.0/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); } -# 519 "/usr/include/c++/9.2.0/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); } -# 550 "/usr/include/c++/9.2.0/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()); - } -# 569 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - vector(vector&&) noexcept = default; - - - vector(const vector& __x, const allocator_type& __a) - : _Base(__x.size(), __a) - { - this->_M_impl._M_finish = - std::__uninitialized_copy_a(__x.begin(), __x.end(), - this->_M_impl._M_start, - _M_get_Tp_allocator()); - } - - private: - vector(vector&& __rv, const allocator_type& __m, true_type) noexcept - : _Base(__m, std::move(__rv)) - { } - - vector(vector&& __rv, const allocator_type& __m, false_type) - : _Base(__m) - { - if (__rv.get_allocator() == __m) - this->_M_impl._M_swap_data(__rv._M_impl); - else if (!__rv.empty()) - { - this->_M_create_storage(__rv.size()); - this->_M_impl._M_finish = - std::__uninitialized_move_a(__rv.begin(), __rv.end(), - this->_M_impl._M_start, - _M_get_Tp_allocator()); - __rv.clear(); - } - } - - public: - - vector(vector&& __rv, const allocator_type& __m) - noexcept( noexcept( - vector(std::declval<vector&&>(), std::declval<const allocator_type&>(), - std::declval<typename _Alloc_traits::is_always_equal>())) ) - : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) - { } -# 622 "/usr/include/c++/9.2.0/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()); - } -# 648 "/usr/include/c++/9.2.0/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)); - } -# 675 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - ~vector() noexcept - { - std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, - _M_get_Tp_allocator()); - ; - } -# 691 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - vector& - operator=(const vector& __x); -# 705 "/usr/include/c++/9.2.0/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; - } -# 726 "/usr/include/c++/9.2.0/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; - } -# 745 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - void - assign(size_type __n, const value_type& __val) - { _M_fill_assign(__n, __val); } -# 762 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - void - assign(_InputIterator __first, _InputIterator __last) - { _M_assign_dispatch(__first, __last, __false_type()); } -# 790 "/usr/include/c++/9.2.0/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; - - - - - - - - iterator - begin() noexcept - { return iterator(this->_M_impl._M_start); } - - - - - - - const_iterator - begin() const noexcept - { return const_iterator(this->_M_impl._M_start); } - - - - - - - iterator - end() noexcept - { return iterator(this->_M_impl._M_finish); } - - - - - - - const_iterator - end() const noexcept - { return const_iterator(this->_M_impl._M_finish); } - - - - - - - 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()); } - - - - - - - - const_iterator - cbegin() const noexcept - { return const_iterator(this->_M_impl._M_start); } - - - - - - - const_iterator - cend() const noexcept - { return const_iterator(this->_M_impl._M_finish); } - - - - - - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(end()); } - - - - - - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(begin()); } - - - - - size_type - size() const noexcept - { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } - - - size_type - max_size() const noexcept - { return _S_max_size(_M_get_Tp_allocator()); } -# 933 "/usr/include/c++/9.2.0/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); - } -# 953 "/usr/include/c++/9.2.0/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); - } -# 985 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - void - shrink_to_fit() - { _M_shrink_to_fit(); } - - - - - - - size_type - capacity() const noexcept - { return size_type(this->_M_impl._M_end_of_storage - - this->_M_impl._M_start); } - - - - - - bool - empty() const noexcept - { return begin() == end(); } -# 1024 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - void - reserve(size_type __n); -# 1039 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - reference - operator[](size_type __n) noexcept - { - ; - return *(this->_M_impl._M_start + __n); - } -# 1057 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - 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: -# 1088 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - reference - at(size_type __n) - { - _M_range_check(__n); - return (*this)[__n]; - } -# 1106 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - const_reference - at(size_type __n) const - { - _M_range_check(__n); - return (*this)[__n]; - } - - - - - - reference - front() noexcept - { - ; - return *begin(); - } - - - - - - const_reference - front() const noexcept - { - ; - return *begin(); - } - - - - - - reference - back() noexcept - { - ; - return *(end() - 1); - } - - - - - - const_reference - back() const noexcept - { - ; - return *(end() - 1); - } -# 1164 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - _Tp* - data() noexcept - { return _M_data_ptr(this->_M_impl._M_start); } - - const _Tp* - data() const noexcept - { return _M_data_ptr(this->_M_impl._M_start); } -# 1183 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_back(_Args&&... __args); -# 1221 "/usr/include/c++/9.2.0/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); - ; - } -# 1243 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - template<typename... _Args> - iterator - emplace(const_iterator __position, _Args&&... __args) - { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } -# 1259 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - iterator - insert(const_iterator __position, const value_type& __x); -# 1289 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - iterator - insert(const_iterator __position, value_type&& __x) - { return _M_insert_rval(__position, std::move(__x)); } -# 1306 "/usr/include/c++/9.2.0/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; - } -# 1331 "/usr/include/c++/9.2.0/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; - } -# 1373 "/usr/include/c++/9.2.0/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_insert_dispatch(begin() + __offset, - __first, __last, __false_type()); - return begin() + __offset; - } -# 1425 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - iterator - - erase(const_iterator __position) - { return _M_erase(begin() + (__position - cbegin())); } -# 1452 "/usr/include/c++/9.2.0/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)); - } -# 1476 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - void - swap(vector& __x) noexcept - { - - - ; - - 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; - } - } -# 1553 "/usr/include/c++/9.2.0/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()); - } -# 1615 "/usr/include/c++/9.2.0/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(); -# 1702 "/usr/include/c++/9.2.0/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() { return *_M_ptr(); } - - private: - _Tp* - _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } - - vector* _M_this; - typename aligned_storage<sizeof(_Tp), alignof(_Tp)>::type __buf; - }; - - - - 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->assign(std::__make_move_if_noexcept_iterator(__x.begin()), - std::__make_move_if_noexcept_iterator(__x.end())); - __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); } -# 1864 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - }; -# 1886 "/usr/include/c++/9.2.0/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())); } -# 1903 "/usr/include/c++/9.2.0/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); } - - -# 1956 "/usr/include/c++/9.2.0/bits/stl_vector.h" 3 - -} -# 68 "/usr/include/c++/9.2.0/vector" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_bvector.h" 1 3 -# 64 "/usr/include/c++/9.2.0/bits/stl_bvector.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - typedef unsigned long _Bit_type; - enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; - - struct _Bit_reference - { - _Bit_type * _M_p; - _Bit_type _M_mask; - - _Bit_reference(_Bit_type * __x, _Bit_type __y) - : _M_p(__x), _M_mask(__y) { } - - _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } - - - _Bit_reference(const _Bit_reference&) = default; - - - 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; - } - - _Bit_reference& - operator=(const _Bit_reference& __x) noexcept - { return *this = bool(__x); } - - bool - operator==(const _Bit_reference& __x) const - { return bool(*this) == bool(__x); } - - bool - operator<(const _Bit_reference& __x) const - { return !bool(*this) && bool(__x); } - - void - flip() noexcept - { *_M_p ^= _M_mask; } - }; - - - inline void - swap(_Bit_reference __x, _Bit_reference __y) noexcept - { - bool __tmp = __x; - __x = __y; - __y = __tmp; - } - - inline void - swap(_Bit_reference __x, bool& __y) noexcept - { - bool __tmp = __x; - __x = __y; - __y = __tmp; - } - - inline void - swap(bool& __x, _Bit_reference __y) noexcept - { - bool __tmp = __x; - __x = __y; - __y = __tmp; - } - - - struct _Bit_iterator_base - : public std::iterator<std::random_access_iterator_tag, bool> - { - _Bit_type * _M_p; - unsigned int _M_offset; - - _Bit_iterator_base(_Bit_type * __x, unsigned int __y) - : _M_p(__x), _M_offset(__y) { } - - void - _M_bump_up() - { - if (_M_offset++ == int(_S_word_bit) - 1) - { - _M_offset = 0; - ++_M_p; - } - } - - void - _M_bump_down() - { - if (_M_offset-- == 0) - { - _M_offset = int(_S_word_bit) - 1; - --_M_p; - } - } - - void - _M_incr(ptrdiff_t __i) - { - difference_type __n = __i + _M_offset; - _M_p += __n / int(_S_word_bit); - __n = __n % int(_S_word_bit); - if (__n < 0) - { - __n += int(_S_word_bit); - --_M_p; - } - _M_offset = static_cast<unsigned int>(__n); - } - - bool - operator==(const _Bit_iterator_base& __i) const - { return _M_p == __i._M_p && _M_offset == __i._M_offset; } - - bool - operator<(const _Bit_iterator_base& __i) const - { - return _M_p < __i._M_p - || (_M_p == __i._M_p && _M_offset < __i._M_offset); - } - - bool - operator!=(const _Bit_iterator_base& __i) const - { return !(*this == __i); } - - bool - operator>(const _Bit_iterator_base& __i) const - { return __i < *this; } - - bool - operator<=(const _Bit_iterator_base& __i) const - { return !(__i < *this); } - - bool - operator>=(const _Bit_iterator_base& __i) const - { return !(*this < __i); } - }; - - inline ptrdiff_t - operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) - { - return (int(_S_word_bit) * (__x._M_p - __y._M_p) - + __x._M_offset - __y._M_offset); - } - - struct _Bit_iterator : public _Bit_iterator_base - { - typedef _Bit_reference reference; - typedef _Bit_reference* pointer; - typedef _Bit_iterator iterator; - - _Bit_iterator() : _Bit_iterator_base(0, 0) { } - - _Bit_iterator(_Bit_type * __x, unsigned int __y) - : _Bit_iterator_base(__x, __y) { } - - iterator - _M_const_cast() const - { return *this; } - - reference - operator*() const - { return reference(_M_p, 1UL << _M_offset); } - - iterator& - operator++() - { - _M_bump_up(); - return *this; - } - - iterator - operator++(int) - { - iterator __tmp = *this; - _M_bump_up(); - return __tmp; - } - - iterator& - operator--() - { - _M_bump_down(); - return *this; - } - - iterator - operator--(int) - { - iterator __tmp = *this; - _M_bump_down(); - return __tmp; - } - - iterator& - operator+=(difference_type __i) - { - _M_incr(__i); - return *this; - } - - iterator& - operator-=(difference_type __i) - { - *this += -__i; - return *this; - } - - iterator - operator+(difference_type __i) const - { - iterator __tmp = *this; - return __tmp += __i; - } - - iterator - operator-(difference_type __i) const - { - iterator __tmp = *this; - return __tmp -= __i; - } - - reference - operator[](difference_type __i) const - { return *(*this + __i); } - }; - - inline _Bit_iterator - operator+(ptrdiff_t __n, const _Bit_iterator& __x) - { return __x + __n; } - - struct _Bit_const_iterator : public _Bit_iterator_base - { - typedef bool reference; - typedef bool const_reference; - typedef const bool* pointer; - typedef _Bit_const_iterator const_iterator; - - _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } - - _Bit_const_iterator(_Bit_type * __x, unsigned int __y) - : _Bit_iterator_base(__x, __y) { } - - _Bit_const_iterator(const _Bit_iterator& __x) - : _Bit_iterator_base(__x._M_p, __x._M_offset) { } - - _Bit_iterator - _M_const_cast() const - { return _Bit_iterator(_M_p, _M_offset); } - - const_reference - operator*() const - { return _Bit_reference(_M_p, 1UL << _M_offset); } - - const_iterator& - operator++() - { - _M_bump_up(); - return *this; - } - - const_iterator - operator++(int) - { - const_iterator __tmp = *this; - _M_bump_up(); - return __tmp; - } - - const_iterator& - operator--() - { - _M_bump_down(); - return *this; - } - - const_iterator - operator--(int) - { - const_iterator __tmp = *this; - _M_bump_down(); - return __tmp; - } - - const_iterator& - operator+=(difference_type __i) - { - _M_incr(__i); - return *this; - } - - const_iterator& - operator-=(difference_type __i) - { - *this += -__i; - return *this; - } - - const_iterator - operator+(difference_type __i) const - { - const_iterator __tmp = *this; - return __tmp += __i; - } - - const_iterator - operator-(difference_type __i) const - { - const_iterator __tmp = *this; - return __tmp -= __i; - } - - const_reference - operator[](difference_type __i) const - { return *(*this + __i); } - }; - - inline _Bit_const_iterator - operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) - { return __x + __n; } - - inline void - __fill_bvector(_Bit_type * __v, - unsigned int __first, unsigned int __last, bool __x) - { - const _Bit_type __fmask = ~0ul << __first; - const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); - const _Bit_type __mask = __fmask & __lmask; - - if (__x) - *__v |= __mask; - else - *__v &= ~__mask; - } - - inline void - fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) - { - if (__first._M_p != __last._M_p) - { - _Bit_type* __first_p = __first._M_p; - if (__first._M_offset != 0) - __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); - - __builtin_memset(__first_p, __x ? ~0 : 0, - (__last._M_p - __first_p) * sizeof(_Bit_type)); - - if (__last._M_offset != 0) - __fill_bvector(__last._M_p, 0, __last._M_offset, __x); - } - else if (__first._M_offset != __last._M_offset) - __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); - } - - template<typename _Alloc> - struct _Bvector_base - { - typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template - rebind<_Bit_type>::other _Bit_alloc_type; - typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> - _Bit_alloc_traits; - typedef typename _Bit_alloc_traits::pointer _Bit_pointer; - - struct _Bvector_impl_data - { - _Bit_iterator _M_start; - _Bit_iterator _M_finish; - _Bit_pointer _M_end_of_storage; - - _Bvector_impl_data() noexcept - : _M_start(), _M_finish(), _M_end_of_storage() - { } - - - _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept - : _M_start(__x._M_start), _M_finish(__x._M_finish) - , _M_end_of_storage(__x._M_end_of_storage) - { __x._M_reset(); } - - void - _M_move_data(_Bvector_impl_data&& __x) noexcept - { - this->_M_start = __x._M_start; - this->_M_finish = __x._M_finish; - this->_M_end_of_storage = __x._M_end_of_storage; - __x._M_reset(); - } - - - void - _M_reset() noexcept - { - _M_start = _M_finish = _Bit_iterator(); - _M_end_of_storage = _Bit_pointer(); - } - }; - - struct _Bvector_impl - : public _Bit_alloc_type, public _Bvector_impl_data - { - public: - _Bvector_impl() 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&&) = default; - - - _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() - { this->_M_deallocate(); } - - protected: - _Bvector_impl _M_impl; - - _Bit_pointer - _M_allocate(size_t __n) - { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } - - void - _M_deallocate() - { - if (_M_impl._M_start._M_p) - { - const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; - _Bit_alloc_traits::deallocate(_M_impl, - _M_impl._M_end_of_storage - __n, - __n); - _M_impl._M_reset(); - } - } - - - void - _M_move_data(_Bvector_base&& __x) noexcept - { _M_impl._M_move_data(std::move(__x._M_impl)); } - - - static size_t - _S_nword(size_t __n) - { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } - }; - - - -} - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - -# 591 "/usr/include/c++/9.2.0/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(), this->_M_impl._M_start); - } - - - vector(vector&&) = default; - - vector(vector&& __x, const allocator_type& __a) - noexcept(_Bit_alloc_traits::_S_always_equal()) - : _Base(__a) - { - if (__x.get_allocator() == __a) - this->_M_move_data(std::move(__x)); - else - { - _M_initialize(__x.size()); - _M_copy_aligned(__x.begin(), __x.end(), begin()); - __x.clear(); - } - } - - vector(const vector& __x, const allocator_type& __a) - : _Base(__a) - { - _M_initialize(__x.size()); - _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); - } - - vector(initializer_list<bool> __l, - const allocator_type& __a = allocator_type()) - : _Base(__a) - { - _M_initialize_range(__l.begin(), __l.end(), - random_access_iterator_tag()); - } - - - - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - vector(_InputIterator __first, _InputIterator __last, - const allocator_type& __a = allocator_type()) - : _Base(__a) - { _M_initialize_dispatch(__first, __last, __false_type()); } -# 714 "/usr/include/c++/9.2.0/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)); } -# 805 "/usr/include/c++/9.2.0/bits/stl_bvector.h" 3 - void - assign(initializer_list<bool> __l) - { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } - - - iterator - begin() noexcept - { return iterator(this->_M_impl._M_start._M_p, 0); } - - const_iterator - begin() const noexcept - { return const_iterator(this->_M_impl._M_start._M_p, 0); } - - iterator - end() noexcept - { return this->_M_impl._M_finish; } - - const_iterator - end() const noexcept - { return this->_M_impl._M_finish; } - - 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()); } - - - const_iterator - cbegin() const noexcept - { return const_iterator(this->_M_impl._M_start._M_p, 0); } - - const_iterator - cend() const noexcept - { return this->_M_impl._M_finish; } - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(end()); } - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(begin()); } - - - size_type - size() const noexcept - { return size_type(end() - begin()); } - - 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); - } - - size_type - capacity() const noexcept - { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) - - begin()); } - - bool - empty() const noexcept - { return begin() == end(); } - - reference - operator[](size_type __n) - { - return *iterator(this->_M_impl._M_start._M_p - + __n / int(_S_word_bit), __n % int(_S_word_bit)); - } - - const_reference - operator[](size_type __n) const - { - return *const_iterator(this->_M_impl._M_start._M_p - + __n / int(_S_word_bit), __n % int(_S_word_bit)); - } - - protected: - void - _M_range_check(size_type __n) const - { - if (__n >= this->size()) - __throw_out_of_range_fmt(("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); - } - - reference - front() - { return *begin(); } - - const_reference - front() const - { return *begin(); } - - reference - back() - { return *(end() - 1); } - - const_reference - back() const - { return *(end() - 1); } - - - - - - - void - data() noexcept { } - - void - push_back(bool __x) - { - if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) - *this->_M_impl._M_finish++ = __x; - else - _M_insert_aux(end(), __x); - } - - void - swap(vector& __x) noexcept - { - std::swap(this->_M_impl._M_start, __x._M_impl._M_start); - std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); - std::swap(this->_M_impl._M_end_of_storage, - __x._M_impl._M_end_of_storage); - _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), - __x._M_get_Bit_allocator()); - } - - - static void - swap(reference __x, reference __y) noexcept - { - bool __tmp = __x; - __x = __y; - __y = __tmp; - } - - iterator - - insert(const_iterator __position, const bool& __x = bool()) - - - - { - 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; - } - - - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - iterator - insert(const_iterator __position, - _InputIterator __first, _InputIterator __last) - { - difference_type __offset = __position - cbegin(); - _M_insert_dispatch(__position._M_const_cast(), - __first, __last, __false_type()); - return begin() + __offset; - } -# 1021 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_back(_Args&&... __args) - { - push_back(bool(__args...)); - - - - } - - 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); - this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); - } - else - { - this->_M_impl._M_end_of_storage = _Bit_pointer(); - this->_M_impl._M_start = iterator(0, 0); - } - this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); - - } - - void - _M_initialize_value(bool __x) - { - if (_Bit_type* __p = this->_M_impl._M_start._M_p) - __builtin_memset(__p, __x ? ~0 : 0, - (this->_M_impl._M_end_addr() - __p) - * sizeof(_Bit_type)); - } - - void - _M_reallocate(size_type __n); - - - bool - _M_shrink_to_fit(); - - - - - - - template<typename _Integer> - void - _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) - { - _M_initialize(static_cast<size_type>(__n)); - _M_initialize_value(__x); - } - - template<typename _InputIterator> - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, - __false_type) - { _M_initialize_range(__first, __last, - std::__iterator_category(__first)); } - - template<typename _InputIterator> - void - _M_initialize_range(_InputIterator __first, _InputIterator __last, - std::input_iterator_tag) - { - for (; __first != __last; ++__first) - push_back(*__first); - } - - template<typename _ForwardIterator> - void - _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, - std::forward_iterator_tag) - { - const size_type __n = std::distance(__first, __last); - _M_initialize(__n); - std::copy(__first, __last, this->_M_impl._M_start); - } -# 1207 "/usr/include/c++/9.2.0/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); - } - } - - - - - - template<typename _Integer> - void - _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, - __true_type) - { _M_fill_insert(__pos, __n, __x); } - - template<typename _InputIterator> - void - _M_insert_dispatch(iterator __pos, - _InputIterator __first, _InputIterator __last, - __false_type) - { _M_insert_range(__pos, __first, __last, - std::__iterator_category(__first)); } - - void - _M_fill_insert(iterator __position, size_type __n, bool __x); - - template<typename _InputIterator> - void - _M_insert_range(iterator __pos, _InputIterator __first, - _InputIterator __last, std::input_iterator_tag) - { - for (; __first != __last; ++__first) - { - __pos = insert(__pos, *__first); - ++__pos; - } - } - - template<typename _ForwardIterator> - void - _M_insert_range(iterator __position, _ForwardIterator __first, - _ForwardIterator __last, std::forward_iterator_tag); - - void - _M_insert_aux(iterator __position, bool __x); - - size_type - _M_check_len(size_type __n, const char* __s) const - { - if (max_size() - size() < __n) - __throw_length_error((__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); - }; - - - -} - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - 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; - }; - - -} -# 69 "/usr/include/c++/9.2.0/vector" 2 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/vector.tcc" 1 3 -# 59 "/usr/include/c++/9.2.0/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 (_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> - - - - void - - 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)...); - - - - } - - - 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) - 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 (&__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 (_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 (!_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(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::fill(__position.base(), __position.base() + __n, - __x_copy); - } - else - { - ; - this->_M_impl._M_finish = - std::__uninitialized_fill_n_a(this->_M_impl._M_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 - { - const size_type __len = - _M_check_len(__n, "vector::_M_fill_insert"); - const size_type __elems_before = __position - begin(); - pointer __new_start(this->_M_allocate(__len)); - pointer __new_finish(__new_start); - try - { - - std::__uninitialized_fill_n_a(__new_start + __elems_before, - __n, __x, - _M_get_Tp_allocator()); - __new_finish = pointer(); - - __new_finish - = std::__uninitialized_move_if_noexcept_a - (this->_M_impl._M_start, __position.base(), - __new_start, _M_get_Tp_allocator()); - - __new_finish += __n; - - __new_finish - = std::__uninitialized_move_if_noexcept_a - (__position.base(), this->_M_impl._M_finish, - __new_finish, _M_get_Tp_allocator()); - } - catch(...) - { - if (!__new_finish) - std::_Destroy(__new_start + __elems_before, - __new_start + __elems_before + __n, - _M_get_Tp_allocator()); - else - std::_Destroy(__new_start, __new_finish, - _M_get_Tp_allocator()); - _M_deallocate(__new_start, __len); - throw; - } - 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 = __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 - { - const size_type __len = - _M_check_len(__n, "vector::_M_default_append"); - pointer __new_start(this->_M_allocate(__len)); - if (_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(this->_M_impl._M_start, this->_M_impl._M_finish, - __new_start, _M_get_Tp_allocator()); - } - else - { - pointer __destroy_from = pointer(); - try - { - std::__uninitialized_default_n_a(__new_start + __size, - __n, _M_get_Tp_allocator()); - __destroy_from = __new_start + __size; - std::__uninitialized_move_if_noexcept_a( - this->_M_impl._M_start, this->_M_impl._M_finish, - __new_start, _M_get_Tp_allocator()); - } - catch(...) - { - if (__destroy_from) - std::_Destroy(__destroy_from, __destroy_from + __n, - _M_get_Tp_allocator()); - _M_deallocate(__new_start, __len); - throw; - } - 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 = __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 - { - const size_type __len = - _M_check_len(__n, "vector::_M_range_insert"); - pointer __new_start(this->_M_allocate(__len)); - pointer __new_finish(__new_start); - try - { - __new_finish - = std::__uninitialized_move_if_noexcept_a - (this->_M_impl._M_start, __position.base(), - __new_start, _M_get_Tp_allocator()); - __new_finish - = std::__uninitialized_copy_a(__first, __last, - __new_finish, - _M_get_Tp_allocator()); - __new_finish - = std::__uninitialized_move_if_noexcept_a - (__position.base(), this->_M_impl._M_finish, - __new_finish, _M_get_Tp_allocator()); - } - catch(...) - { - std::_Destroy(__new_start, __new_finish, - _M_get_Tp_allocator()); - _M_deallocate(__new_start, __len); - throw; - } - 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 = __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 - { - _M_reallocate(size()); - 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; - using std::_S_word_bit; - using std::_Bit_type; - - const size_t __words = __b.size() / _S_word_bit; - if (__words) - { - const size_t __clength = __words * sizeof(_Bit_type); - __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); - } - - const size_t __extrabits = __b.size() % _S_word_bit; - if (__extrabits) - { - _Bit_type __hiword = *__b._M_impl._M_finish._M_p; - __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); - - const size_t __clength - = (__extrabits + 8 - 1) / 8; - if (__words) - __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); - else - __hash = std::_Hash_impl::hash(&__hiword, __clength); - } - - return __hash; - } - - -} -# 73 "/usr/include/c++/9.2.0/vector" 2 3 -# 27 "/usr/include/boost/math/special_functions/math_fwd.hpp" 2 3 4 -# 1 "/usr/include/boost/math/special_functions/detail/round_fwd.hpp" 1 3 4 -# 12 "/usr/include/boost/math/special_functions/detail/round_fwd.hpp" 3 4 -# 1 "/usr/include/boost/math/tools/promotion.hpp" 1 3 4 -# 42 "/usr/include/boost/math/tools/promotion.hpp" 3 4 -namespace boost -{ - namespace math - { - namespace tools - { -# 68 "/usr/include/boost/math/tools/promotion.hpp" 3 4 - template <class T> - struct promote_arg - { - typedef typename mpl::if_<is_integral<T>, double, T>::type type; - }; - - - template <> struct promote_arg<float> { typedef float type; }; - template <> struct promote_arg<double>{ typedef double type; }; - template <> struct promote_arg<long double> { typedef long double type; }; - template <> struct promote_arg<int> { typedef double type; }; - - template <class T1, class T2> - struct promote_args_2 - { - - typedef typename promote_arg<T1>::type T1P; - typedef typename promote_arg<T2>::type T2P; - - typedef typename mpl::if_< - typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, - - typename mpl::if_< typename mpl::or_<is_same<__float128, T1P>, is_same<__float128, T2P> >::type, - __float128, - - typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, - long double, - typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, - double, - float - >::type - - >::type - - >::type, - - typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type; - }; - - - template <> struct promote_args_2<float, float> { typedef float type; }; - template <> struct promote_args_2<double, double>{ typedef double type; }; - template <> struct promote_args_2<long double, long double> { typedef long double type; }; - template <> struct promote_args_2<int, int> { typedef double type; }; - template <> struct promote_args_2<int, float> { typedef double type; }; - template <> struct promote_args_2<float, int> { typedef double type; }; - template <> struct promote_args_2<int, double> { typedef double type; }; - template <> struct promote_args_2<double, int> { typedef double type; }; - template <> struct promote_args_2<int, long double> { typedef long double type; }; - template <> struct promote_args_2<long double, int> { typedef long double type; }; - template <> struct promote_args_2<float, double> { typedef double type; }; - template <> struct promote_args_2<double, float> { typedef double type; }; - template <> struct promote_args_2<float, long double> { typedef long double type; }; - template <> struct promote_args_2<long double, float> { typedef long double type; }; - template <> struct promote_args_2<double, long double> { typedef long double type; }; - template <> struct promote_args_2<long double, double> { typedef long double type; }; - - template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float> - struct promote_args - { - typedef typename promote_args_2< - typename remove_cv<T1>::type, - typename promote_args_2< - typename remove_cv<T2>::type, - typename promote_args_2< - typename remove_cv<T3>::type, - typename promote_args_2< - typename remove_cv<T4>::type, - typename promote_args_2< - typename remove_cv<T5>::type, typename remove_cv<T6>::type - >::type - >::type - >::type - >::type - >::type type; - - - - - - - - }; - - - - - - - template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float> - struct promote_args_permissive - { - typedef typename promote_args_2< - typename remove_cv<T1>::type, - typename promote_args_2< - typename remove_cv<T2>::type, - typename promote_args_2< - typename remove_cv<T3>::type, - typename promote_args_2< - typename remove_cv<T4>::type, - typename promote_args_2< - typename remove_cv<T5>::type, typename remove_cv<T6>::type - >::type - >::type - >::type - >::type - >::type type; - }; - - } - } -} -# 13 "/usr/include/boost/math/special_functions/detail/round_fwd.hpp" 2 3 4 - - - - - -namespace boost -{ - namespace math - { - - template <class T, class Policy> - typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol); - template <class T> - typename tools::promote_args<T>::type trunc(const T& v); - template <class T, class Policy> - int itrunc(const T& v, const Policy& pol); - template <class T> - int itrunc(const T& v); - template <class T, class Policy> - long ltrunc(const T& v, const Policy& pol); - template <class T> - long ltrunc(const T& v); - - template <class T, class Policy> - boost::long_long_type lltrunc(const T& v, const Policy& pol); - template <class T> - boost::long_long_type lltrunc(const T& v); - - template <class T, class Policy> - typename tools::promote_args<T>::type round(const T& v, const Policy& pol); - template <class T> - typename tools::promote_args<T>::type round(const T& v); - template <class T, class Policy> - int iround(const T& v, const Policy& pol); - template <class T> - int iround(const T& v); - template <class T, class Policy> - long lround(const T& v, const Policy& pol); - template <class T> - long lround(const T& v); - - template <class T, class Policy> - boost::long_long_type llround(const T& v, const Policy& pol); - template <class T> - boost::long_long_type llround(const T& v); - - template <class T, class Policy> - T modf(const T& v, T* ipart, const Policy& pol); - template <class T> - T modf(const T& v, T* ipart); - template <class T, class Policy> - T modf(const T& v, int* ipart, const Policy& pol); - template <class T> - T modf(const T& v, int* ipart); - template <class T, class Policy> - T modf(const T& v, long* ipart, const Policy& pol); - template <class T> - T modf(const T& v, long* ipart); - - template <class T, class Policy> - T modf(const T& v, boost::long_long_type* ipart, const Policy& pol); - template <class T> - T modf(const T& v, boost::long_long_type* ipart); - - - } -} -# 28 "/usr/include/boost/math/special_functions/math_fwd.hpp" 2 3 4 - -# 1 "/usr/include/boost/math/policies/policy.hpp" 1 3 4 -# 9 "/usr/include/boost/math/policies/policy.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/list.hpp" 3 4 -# 1 "/usr/include/boost/mpl/limits/list.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/list.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/list.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/list20.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/list/list20.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/list10.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/list/list10.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/list0.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/list0.hpp" 3 4 -# 1 "/usr/include/boost/mpl/long.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/long.hpp" 3 4 -# 1 "/usr/include/boost/mpl/long_fwd.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/long_fwd.hpp" 3 4 -namespace mpl_ { - -template< long N > struct long_; - -} -namespace boost { namespace mpl { using ::mpl_::long_; } } -# 18 "/usr/include/boost/mpl/long.hpp" 2 3 4 - - -# 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 -# 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 -namespace mpl_ { - -template< long N > -struct long_ -{ - static const long value = N; - - - - - - typedef long_ type; - - typedef long value_type; - typedef integral_c_tag tag; -# 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 - typedef mpl_::long_< static_cast<long>((value + 1)) > next; - typedef mpl_::long_< static_cast<long>((value - 1)) > prior; - - - - - - - constexpr operator long() const { return static_cast<long>(this->value); } -}; - - -template< long N > -long const mpl_::long_< N >::value; - - -} -# 21 "/usr/include/boost/mpl/long.hpp" 2 3 4 -# 18 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/list/aux_/push_front.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/push_front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/push_front_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/push_front_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct push_front_impl; -template< typename Sequence, typename T > struct push_front; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/push_front.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/list/aux_/item.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/list/aux_/item.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/tag.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/tag.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - -struct list_tag; -struct l_iter_tag; - -}}} -# 19 "/usr/include/boost/mpl/list/aux_/item.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename Size - , typename T - , typename Next - > -struct l_item -{ - - - - - typedef aux::list_tag tag; - typedef l_item type; - - typedef Size size; - typedef T item; - typedef Next next; -}; - -struct l_end -{ - - - - typedef aux::list_tag tag; - typedef l_end type; - typedef long_<0> size; -}; - -}} -# 20 "/usr/include/boost/mpl/list/aux_/push_front.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template<> -struct push_front_impl< aux::list_tag > -{ - template< typename List, typename T > struct apply - { - typedef l_item< - typename next<typename List::size>::type - , T - , typename List::type - > type; - }; -}; - -}} -# 20 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/pop_front.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/pop_front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/pop_front_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/pop_front_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct pop_front_impl; -template< typename Sequence > struct pop_front; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/pop_front.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template<> -struct pop_front_impl< aux::list_tag > -{ - template< typename List > struct apply - { - typedef typename mpl::next<List>::type type; - }; -}; - -}} -# 21 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/push_back.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/push_back.hpp" 3 4 -# 1 "/usr/include/boost/mpl/push_back_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/push_back_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct push_back_impl; -template< typename Sequence, typename T > struct push_back; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/push_back.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< typename Tag > struct has_push_back_impl; - -template<> -struct has_push_back_impl< aux::list_tag > -{ - template< typename Seq > struct apply - : false_ - { - }; -}; - -}} -# 22 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/front.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/front_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/front_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct front_impl; -template< typename Sequence > struct front; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/front.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template<> -struct front_impl< aux::list_tag > -{ - template< typename List > struct apply - { - typedef typename List::item type; - }; -}; - -}} -# 23 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/clear.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/clear.hpp" 3 4 -# 1 "/usr/include/boost/mpl/clear_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/clear_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct clear_impl; -template< typename Sequence > struct clear; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/clear.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template<> -struct clear_impl< aux::list_tag > -{ - template< typename List > struct apply - { - typedef l_end type; - }; -}; - -}} -# 24 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/O1_size.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/O1_size.hpp" 3 4 -# 1 "/usr/include/boost/mpl/O1_size_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/O1_size_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct O1_size_impl; -template< typename Sequence > struct O1_size; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/O1_size.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template<> -struct O1_size_impl< aux::list_tag > -{ - template< typename List > struct apply - : List::size - { - }; -}; - -}} -# 25 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/size.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/size.hpp" 3 4 -# 1 "/usr/include/boost/mpl/size_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/size_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct size_impl; -template< typename Sequence > struct size; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/size.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template<> -struct size_impl< aux::list_tag > -{ - template< typename List > struct apply - : List::size - { - }; -}; - -}} -# 26 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/empty.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/empty.hpp" 3 4 -# 1 "/usr/include/boost/mpl/empty_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/empty_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct empty_impl; -template< typename Sequence > struct empty; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/empty.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template<> -struct empty_impl< aux::list_tag > -{ - template< typename List > struct apply - : not_<typename List::size> - { - }; -}; - -}} -# 27 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/begin_end.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/list/aux_/begin_end.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/iterator.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/list/aux_/iterator.hpp" 3 4 -# 1 "/usr/include/boost/mpl/iterator_tags.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/iterator_tags.hpp" 3 4 -namespace boost { namespace mpl { - -struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; -struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; -struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; - -}} -# 18 "/usr/include/boost/mpl/list/aux_/iterator.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/mpl/aux_/lambda_spec.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/list/aux_/iterator.hpp" 2 3 4 - - -namespace boost { namespace mpl { - - - -template< typename Node > -struct l_iter -{ - typedef aux::l_iter_tag tag; - typedef forward_iterator_tag category; -}; - -template< typename Node > -struct deref< l_iter<Node> > -{ - typedef typename Node::item type; -}; - -template< typename Node > -struct next< l_iter<Node> > -{ - typedef l_iter< typename Node::next > type; -}; -# 62 "/usr/include/boost/mpl/list/aux_/iterator.hpp" 3 4 -template<> struct l_iter<l_end> -{ - typedef aux::l_iter_tag tag; - typedef forward_iterator_tag category; - - - - -}; - -template< typename T1 , typename Tag > struct lambda< l_iter< T1 > , Tag , int_<1> > { typedef false_ is_le; typedef l_iter< T1 > result_; typedef result_ type; }; - -}} -# 19 "/usr/include/boost/mpl/list/aux_/begin_end.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template<> -struct begin_impl< aux::list_tag > -{ - template< typename List > struct apply - { - typedef l_iter<typename List::type> type; - }; -}; - -template<> -struct end_impl< aux::list_tag > -{ - template< typename > struct apply - { - typedef l_iter<l_end> type; - }; -}; - -}} -# 28 "/usr/include/boost/mpl/list/list0.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template< typename Dummy = na > struct list0; - -template<> struct list0<na> - : l_end -{ - typedef l_end type; -}; - -}} -# 19 "/usr/include/boost/mpl/list/list10.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/list/list10.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 1 3 4 -# 30 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0 - > -struct list1 - : l_item< - long_<1> - , T0 - , l_end - > -{ - typedef list1 type; -}; - -template< - typename T0, typename T1 - > -struct list2 - : l_item< - long_<2> - , T0 - , list1<T1> - > -{ - typedef list2 type; -}; - -template< - typename T0, typename T1, typename T2 - > -struct list3 - : l_item< - long_<3> - , T0 - , list2< T1,T2 > - > -{ - typedef list3 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3 - > -struct list4 - : l_item< - long_<4> - , T0 - , list3< T1,T2,T3 > - > -{ - typedef list4 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - > -struct list5 - : l_item< - long_<5> - , T0 - , list4< T1,T2,T3,T4 > - > -{ - typedef list5 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct list6 - : l_item< - long_<6> - , T0 - , list5< T1,T2,T3,T4,T5 > - > -{ - typedef list6 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6 - > -struct list7 - : l_item< - long_<7> - , T0 - , list6< T1,T2,T3,T4,T5,T6 > - > -{ - typedef list7 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7 - > -struct list8 - : l_item< - long_<8> - , T0 - , list7< T1,T2,T3,T4,T5,T6,T7 > - > -{ - typedef list8 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8 - > -struct list9 - : l_item< - long_<9> - , T0 - , list8< T1,T2,T3,T4,T5,T6,T7,T8 > - > -{ - typedef list9 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - > -struct list10 - : l_item< - long_<10> - , T0 - , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > - > -{ - typedef list10 type; -}; - -}} -# 31 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/list/list10.hpp" 2 3 4 -# 19 "/usr/include/boost/mpl/list/list20.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/list/list20.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 1 3 4 -# 30 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 3 4 -# 1 "/usr/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10 - > -struct list11 - : l_item< - long_<11> - , T0 - , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > - > -{ - typedef list11 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11 - > -struct list12 - : l_item< - long_<12> - , T0 - , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > - > -{ - typedef list12 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12 - > -struct list13 - : l_item< - long_<13> - , T0 - , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > - > -{ - typedef list13 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13 - > -struct list14 - : l_item< - long_<14> - , T0 - , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > - > -{ - typedef list14 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - > -struct list15 - : l_item< - long_<15> - , T0 - , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > - > -{ - typedef list15 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15 - > -struct list16 - : l_item< - long_<16> - , T0 - , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > - > -{ - typedef list16 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16 - > -struct list17 - : l_item< - long_<17> - , T0 - , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > - > -{ - typedef list17 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17 - > -struct list18 - : l_item< - long_<18> - , T0 - , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > - > -{ - typedef list18 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18 - > -struct list19 - : l_item< - long_<19> - , T0 - , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > - > -{ - typedef list19 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18, typename T19 - > -struct list20 - : l_item< - long_<20> - , T0 - , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > - > -{ - typedef list20 type; -}; - -}} -# 31 "/usr/include/boost/mpl/list/aux_/include_preprocessed.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/list/list20.hpp" 2 3 4 -# 37 "/usr/include/boost/mpl/list.hpp" 2 3 4 -# 46 "/usr/include/boost/mpl/list.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/list.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/list.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na - , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na - , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na - , typename T12 = na, typename T13 = na, typename T14 = na - , typename T15 = na, typename T16 = na, typename T17 = na - , typename T18 = na, typename T19 = na - > -struct list; - -template< - - > -struct list< - na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list0< > -{ - typedef list0< >::type type; -}; - -template< - typename T0 - > -struct list< - T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list1<T0> -{ - typedef typename list1<T0>::type type; -}; - -template< - typename T0, typename T1 - > -struct list< - T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list2< T0,T1 > -{ - typedef typename list2< T0,T1 >::type type; -}; - -template< - typename T0, typename T1, typename T2 - > -struct list< - T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list3< T0,T1,T2 > -{ - typedef typename list3< T0,T1,T2 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3 - > -struct list< - T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list4< T0,T1,T2,T3 > -{ - typedef typename list4< T0,T1,T2,T3 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - > -struct list< - T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list5< T0,T1,T2,T3,T4 > -{ - typedef typename list5< T0,T1,T2,T3,T4 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct list< - T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list6< T0,T1,T2,T3,T4,T5 > -{ - typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list7< T0,T1,T2,T3,T4,T5,T6 > -{ - typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na - , na, na, na - > - : list8< T0,T1,T2,T3,T4,T5,T6,T7 > -{ - typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na - , na, na, na - > - : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > -{ - typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na - , na, na, na - > - : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > -{ - typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na - , na, na, na - > - : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > -{ - typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na - , na, na, na, na - > - : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > -{ - typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na - , na, na, na, na - > - : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > -{ - typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na - , na, na, na, na - > - : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > -{ - typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na - , na, na, na, na - > - : list15< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - > -{ - typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, na, na, na, na - > - : list16< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15 - > -{ - typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, na, na, na - > - : list17< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16 - > -{ - typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, na, na - > - : list18< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17 - > -{ - typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18 - > -struct list< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18, na - > - : list19< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18 - > -{ - typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; -}; - - - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18, typename T19 - > -struct list - : list20< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18, T19 - > -{ - typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 47 "/usr/include/boost/mpl/list.hpp" 2 3 4 -# 10 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/contains.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/contains.hpp" 3 4 -# 1 "/usr/include/boost/mpl/contains_fwd.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/contains_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct contains_impl; -template< typename Sequence, typename T > struct contains; - -}} -# 19 "/usr/include/boost/mpl/contains.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/aux_/contains_impl.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/contains_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/find.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/find.hpp" 3 4 -# 1 "/usr/include/boost/mpl/same_as.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/same_as.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename T1 > -struct same_as -{ - template< typename T2 > struct apply - - : is_same<T1,T2> - { - - - - - }; -}; - -template< typename T1 > -struct not_same_as -{ - template< typename T2 > struct apply - - : not_< is_same<T1,T2> > - { - - - - - }; -}; - -}} -# 19 "/usr/include/boost/mpl/find.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename T = na - > -struct find - : find_if< Sequence,same_as<T> > -{ - -}; - -template<> struct find< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find< T1 , T2 > { }; }; template< typename Tag > struct lambda< find< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find< na , na > result_; typedef find< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find< na , na > > : int_<-1> { }; } - -}} -# 21 "/usr/include/boost/mpl/aux_/contains_impl.hpp" 2 3 4 - - - - - - - -namespace boost { namespace mpl { - -template< typename Tag > -struct contains_impl -{ - template< typename Sequence, typename T > struct apply - - : not_< is_same< - typename find<Sequence,T>::type - , typename end<Sequence>::type - > > - { -# 54 "/usr/include/boost/mpl/aux_/contains_impl.hpp" 3 4 - }; -}; - - template<> struct contains_impl<non_sequence_tag> {}; - -}} -# 21 "/usr/include/boost/mpl/contains.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename T = na - > -struct contains - : contains_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence,T > -{ - -}; - -template<> struct contains< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : contains< T1 , T2 > { }; }; template< typename Tag > struct lambda< contains< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef contains< na , na > result_; typedef contains< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< contains< T1 , T2 > > : int_<2> { }; template<> struct template_arity< contains< na , na > > : int_<-1> { }; } - -}} -# 11 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 - - -# 1 "/usr/include/boost/mpl/remove_if.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/remove_if.hpp" 3 4 -# 1 "/usr/include/boost/mpl/fold.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/fold.hpp" 3 4 -# 1 "/usr/include/boost/mpl/O1_size.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/O1_size.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/has_size.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/has_size.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { -template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_size { 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::size>* = 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; }; -}}} -# 21 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 2 3 4 - - - - - -namespace boost { namespace mpl { -# 35 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 3 4 -namespace aux { -template< typename Sequence > struct O1_size_impl - : Sequence::size -{ -}; -} - -template< typename Tag > -struct O1_size_impl -{ - template< typename Sequence > struct apply - - : if_< - aux::has_size<Sequence> - , aux::O1_size_impl<Sequence> - , long_<-1> - >::type - { -# 69 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 3 4 - }; -}; -# 85 "/usr/include/boost/mpl/aux_/O1_size_impl.hpp" 3 4 -}} -# 20 "/usr/include/boost/mpl/O1_size.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - - -template< - typename Sequence = na - > -struct O1_size - : O1_size_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence > -{ - -}; - -template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/fold.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/fold_impl.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/fold_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/fold_impl.hpp" 2 3 4 -# 34 "/usr/include/boost/mpl/aux_/fold_impl.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/fold_impl.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - - - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 0,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 1,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; - typedef typename mpl::next<iter0>::type iter1; - - - typedef state1 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 2,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; - typedef typename mpl::next<iter1>::type iter2; - - - typedef state2 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 3,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; - typedef typename mpl::next<iter2>::type iter3; - - - typedef state3 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 4,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; - typedef typename mpl::next<iter2>::type iter3; - typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; - typedef typename mpl::next<iter3>::type iter4; - - - typedef state4 state; - typedef iter4 iterator; -}; - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl -{ - typedef fold_impl< - 4 - , First - , Last - , State - , ForwardOp - > chunk_; - - typedef fold_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , typename chunk_::iterator - , Last - , typename chunk_::state - , ForwardOp - > res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< -1,First,Last,State,ForwardOp > - : fold_impl< - -1 - , typename mpl::next<First>::type - , Last - , typename apply2<ForwardOp,State, typename deref<First>::type>::type - , ForwardOp - > -{ -}; - -template< - typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< -1,Last,Last,State,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 35 "/usr/include/boost/mpl/aux_/fold_impl.hpp" 2 3 4 -# 21 "/usr/include/boost/mpl/fold.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename State = na - , typename ForwardOp = na - > -struct fold -{ - typedef typename aux::fold_impl< - ::boost::mpl::O1_size<Sequence>::value - , typename begin<Sequence>::type - , typename end<Sequence>::type - , State - , ForwardOp - >::state type; - - -}; - -template<> struct fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef fold< na , na , na > result_; typedef fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< fold< na , na , na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/remove_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/reverse_fold.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/reverse_fold.hpp" 3 4 -# 1 "/usr/include/boost/mpl/arg.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/reverse_fold.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/reverse_fold_impl.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/reverse_fold_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/aux_/reverse_fold_impl.hpp" 2 3 4 -# 35 "/usr/include/boost/mpl/aux_/reverse_fold_impl.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/reverse_fold_impl.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - - - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1; - typedef typename mpl::next<iter0>::type iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2; - typedef typename mpl::next<iter1>::type iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1; - typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3; - typedef typename mpl::next<iter2>::type iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2; - typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1; - typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3; - typedef typename mpl::next<iter2>::type iter3; - typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4; - typedef typename mpl::next<iter3>::type iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3; - typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2; - typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1; - typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3; - typedef typename mpl::next<iter2>::type iter3; - typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4; - typedef typename mpl::next<iter3>::type iter4; - - - typedef reverse_fold_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3; - typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2; - typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1; - typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef reverse_fold_impl< - -1 - , typename mpl::next<First>::type - , Last - , typename apply2<ForwardOp,State, typename deref<First>::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2< - BackwardOp - , typename nested_step::state - , typename deref<First>::type - >::type state; - - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/reverse_fold_impl.hpp" 2 3 4 -# 22 "/usr/include/boost/mpl/reverse_fold.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename State = na - , typename BackwardOp = na - , typename ForwardOp = arg<1> - > -struct reverse_fold -{ - typedef typename aux::reverse_fold_impl< - ::boost::mpl::O1_size<Sequence>::value - , typename begin<Sequence>::type - , typename end<Sequence>::type - , State - , BackwardOp - , ForwardOp - >::state type; - - -}; - -template<> struct reverse_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_fold< na , na , na > result_; typedef reverse_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_fold< na , na , na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/remove_if.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/remove_if.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/inserter_algorithm.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/aux_/inserter_algorithm.hpp" 3 4 -# 1 "/usr/include/boost/mpl/back_inserter.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/back_inserter.hpp" 3 4 -# 1 "/usr/include/boost/mpl/push_back.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/push_back.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/push_back_impl.hpp" 1 3 4 -# 26 "/usr/include/boost/mpl/aux_/push_back_impl.hpp" 3 4 -namespace boost { namespace mpl { - -struct has_push_back_arg {}; - - - -template< typename Tag > -struct push_back_impl -{ - template< typename Sequence, typename T > struct apply - { - - - - struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST40 : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } mpl_assert_arg40; enum { mpl_assertion_in_line_40 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_back_arg >::value ))>( mpl_assert_arg40::assert_arg() ) ) } - - - - ; - }; -}; - -template< typename Tag > -struct has_push_back_impl -{ - template< typename Seq > struct apply - - : aux::has_type< push_back< Seq, has_push_back_arg > > - { - - - - - - - - }; -}; - - template<> struct push_back_impl<non_sequence_tag> {}; - template<> struct has_push_back_impl<non_sequence_tag> {}; - -}} -# 19 "/usr/include/boost/mpl/push_back.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename T = na - > -struct push_back - : push_back_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence,T > -{ - -}; - - -template< - typename Sequence = na - > -struct has_push_back - : has_push_back_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence > -{ - -}; - - -template<> struct push_back< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_back< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_back< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_back< na , na > result_; typedef push_back< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_back< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_back< na , na > > : int_<-1> { }; } -template<> struct has_push_back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_back< T1 > { }; }; template< typename Tag > struct lambda< has_push_back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_back< na > result_; typedef has_push_back< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_back< T1 > > : int_<1> { }; template<> struct template_arity< has_push_back< na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/back_inserter.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/inserter.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/inserter.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Sequence - , typename Operation - > -struct inserter -{ - typedef Sequence state; - typedef Operation operation; -}; - -}} -# 20 "/usr/include/boost/mpl/back_inserter.hpp" 2 3 4 - -namespace boost { -namespace mpl { - -template< - typename Sequence - > -struct back_inserter - : inserter< Sequence,push_back<> > -{ -}; - -}} -# 19 "/usr/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/front_inserter.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/front_inserter.hpp" 3 4 -# 1 "/usr/include/boost/mpl/push_front.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/push_front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/push_front_impl.hpp" 1 3 4 -# 26 "/usr/include/boost/mpl/aux_/push_front_impl.hpp" 3 4 -namespace boost { namespace mpl { - -struct has_push_front_arg {}; - - - - -template< typename Tag > -struct push_front_impl -{ - template< typename Sequence, typename T > struct apply - { - - - - struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST41 : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } mpl_assert_arg41; enum { mpl_assertion_in_line_41 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg41::assert_arg() ) ) } - - - - ; - }; -}; - -template< typename Tag > -struct has_push_front_impl -{ - template< typename Seq > struct apply - - : aux::has_type< push_front< Seq, has_push_front_arg > > - { - - - - - - - - }; -}; - - template<> struct push_front_impl<non_sequence_tag> {}; - template<> struct has_push_front_impl<non_sequence_tag> {}; - -}} -# 19 "/usr/include/boost/mpl/push_front.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename T = na - > -struct push_front - : push_front_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence,T > -{ - -}; - - -template< - typename Sequence = na - > -struct has_push_front - : has_push_front_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence > -{ - -}; - -template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; } -template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/front_inserter.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template< - typename Sequence - > -struct front_inserter - : inserter< Sequence,push_front<> > -{ -}; - -}} -# 20 "/usr/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/mpl/clear.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/clear.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/clear_impl.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/aux_/clear_impl.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< typename Tag > -struct clear_impl -{ - template< typename Sequence > struct apply; -}; - - template<> struct clear_impl<non_sequence_tag> {}; - -}} -# 19 "/usr/include/boost/mpl/clear.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - > -struct clear - : clear_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence > -{ - -}; - -template<> struct clear< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : clear< T1 > { }; }; template< typename Tag > struct lambda< clear< na > , Tag , int_<-1> > { typedef false_ is_le; typedef clear< na > result_; typedef clear< na > type; }; namespace aux { template< typename T1 > struct template_arity< clear< T1 > > : int_<1> { }; template<> struct template_arity< clear< na > > : int_<-1> { }; } - -}} -# 25 "/usr/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 3 4 -# 26 "/usr/include/boost/mpl/remove_if.hpp" 2 3 4 - -namespace boost { namespace mpl { - -namespace aux { - -template< typename Pred, typename InsertOp > struct remove_if_helper -{ - template< typename Sequence, typename U > struct apply - { - typedef typename eval_if< - typename apply1<Pred,U>::type - , identity<Sequence> - , apply2<InsertOp,Sequence,U> - >::type type; - }; -}; - -template< - typename Sequence - , typename Predicate - , typename Inserter - > -struct remove_if_impl - : fold< - Sequence - , typename Inserter::state - , protect< aux::remove_if_helper< - typename lambda<Predicate>::type - , typename Inserter::operation - > > - > -{ -}; - -template< - typename Sequence - , typename Predicate - , typename Inserter - > -struct reverse_remove_if_impl - : reverse_fold< - Sequence - , typename Inserter::state - , protect< aux::remove_if_helper< - typename lambda<Predicate>::type - , typename Inserter::operation - > > - > -{ -}; - -} - - template< typename P1 = na , typename P2 = na , typename P3 = na > struct remove_if : aux::remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct remove_if< P1 , P2,na > : if_< has_push_back< typename clear<P1>::type> , aux::remove_if_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::reverse_remove_if_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_remove_if : aux::reverse_remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_remove_if< P1 , P2,na > : if_< has_push_back<P1> , aux::reverse_remove_if_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::remove_if_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef remove_if< na , na , na > result_; typedef remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< remove_if< na , na , na > > : int_<-1> { }; } template<> struct reverse_remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_remove_if< na , na , na > result_; typedef reverse_remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_remove_if< na , na , na > > : int_<-1> { }; } - -}} -# 14 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/vector.hpp" 3 4 -# 1 "/usr/include/boost/mpl/limits/vector.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/vector.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/vector.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/vector20.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/vector/vector20.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/vector10.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/vector/vector10.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/vector0.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/vector/vector0.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/at.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/vector/aux_/at.hpp" 3 4 -# 1 "/usr/include/boost/mpl/at_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/at_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct at_impl; -template< typename Sequence, typename N > struct at; - -}} -# 18 "/usr/include/boost/mpl/vector/aux_/at.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/tag.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/vector/aux_/tag.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/config/typeof.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/vector/aux_/tag.hpp" 2 3 4 - - -namespace boost { namespace mpl { namespace aux { - -struct v_iter_tag; - - -struct vector_tag; - - - - -}}} -# 19 "/usr/include/boost/mpl/vector/aux_/at.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/vector/aux_/at.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< typename Vector, long n_ > -struct v_at_impl -{ - typedef long_< (Vector::lower_bound_::value + n_) > index_; - typedef __typeof__( Vector::item_(index_()) ) type; -}; - - -template< typename Vector, long n_ > -struct v_at - : aux::wrapped_type< typename v_at_impl<Vector,n_>::type > -{ -}; - -template<> -struct at_impl< aux::vector_tag > -{ - template< typename Vector, typename N > struct apply - : v_at< - Vector - , N::value - > - { - }; -}; -# 114 "/usr/include/boost/mpl/vector/aux_/at.hpp" 3 4 -}} -# 18 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/front.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/vector/aux_/front.hpp" 3 4 -namespace boost { namespace mpl { - - - -template<> -struct front_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : v_at<Vector,0> - { - }; -}; -# 54 "/usr/include/boost/mpl/vector/aux_/front.hpp" 3 4 -}} -# 19 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/push_front.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/vector/aux_/push_front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/item.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/vector/aux_/item.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< - typename T - , typename Base - , int at_front = 0 - > -struct v_item - : Base -{ - typedef typename Base::upper_bound_ index_; - typedef typename next<index_>::type upper_bound_; - typedef typename next<typename Base::size>::type size; - typedef Base base; - typedef v_item type; - - - - static aux::type_wrapper<T> item_(index_); - using Base::item_; -}; - -template< - typename T - , typename Base - > -struct v_item<T,Base,1> - : Base -{ - typedef typename prior<typename Base::lower_bound_>::type index_; - typedef index_ lower_bound_; - typedef typename next<typename Base::size>::type size; - typedef Base base; - typedef v_item type; - - static aux::type_wrapper<T> item_(index_); - using Base::item_; -}; - - -template< - typename Base - , int at_front - > -struct v_mask - : Base -{ - typedef typename prior<typename Base::upper_bound_>::type index_; - typedef index_ upper_bound_; - typedef typename prior<typename Base::size>::type size; - typedef Base base; - typedef v_mask type; - - static aux::type_wrapper<void_> item_(index_); - using Base::item_; -}; - -template< - typename Base - > -struct v_mask<Base,1> - : Base -{ - typedef typename Base::lower_bound_ index_; - typedef typename next<index_>::type lower_bound_; - typedef typename prior<typename Base::size>::type size; - typedef Base base; - typedef v_mask type; - - static aux::type_wrapper<void_> item_(index_); - using Base::item_; -}; - - - -}} -# 23 "/usr/include/boost/mpl/vector/aux_/push_front.hpp" 2 3 4 - - -namespace boost { namespace mpl { - -template<> -struct push_front_impl< aux::vector_tag > -{ - template< typename Vector, typename T > struct apply - { - typedef v_item<T,Vector,1> type; - }; -}; - -}} -# 20 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/pop_front.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/vector/aux_/pop_front.hpp" 3 4 -namespace boost { namespace mpl { - -template<> -struct pop_front_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_mask<Vector,1> type; - }; -}; - -}} -# 21 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/push_back.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/vector/aux_/push_back.hpp" 3 4 -namespace boost { namespace mpl { - -template<> -struct push_back_impl< aux::vector_tag > -{ - template< typename Vector, typename T > struct apply - { - typedef v_item<T,Vector,0> type; - }; -}; - -}} -# 22 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/pop_back.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/vector/aux_/pop_back.hpp" 3 4 -# 1 "/usr/include/boost/mpl/pop_back_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/pop_back_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct pop_back_impl; -template< typename Sequence > struct pop_back; - -}} -# 18 "/usr/include/boost/mpl/vector/aux_/pop_back.hpp" 2 3 4 - - - - - - - -namespace boost { namespace mpl { - -template<> -struct pop_back_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_mask<Vector,0> type; - }; -}; - -}} -# 23 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/back.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/vector/aux_/back.hpp" 3 4 -# 1 "/usr/include/boost/mpl/back_fwd.hpp" 1 3 4 -# 17 "/usr/include/boost/mpl/back_fwd.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct back_impl; -template< typename Sequence > struct back; - -}} -# 18 "/usr/include/boost/mpl/vector/aux_/back.hpp" 2 3 4 - - - - - - -namespace boost { namespace mpl { - - - -template<> -struct back_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : v_at< - Vector - , prior<typename Vector::size>::type::value - > - { - }; -}; -# 57 "/usr/include/boost/mpl/vector/aux_/back.hpp" 3 4 -}} -# 24 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/clear.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/vector/aux_/clear.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/vector0.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/vector/aux_/vector0.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 3 4 -# 1 "/usr/include/boost/mpl/minus.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/minus.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 1 3 4 -# 26 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/aux_/arithmetic_op.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/minus.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct minus_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct minus_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct minus_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct minus_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct minus_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - , typename N3 = na, typename N4 = na, typename N5 = na - > -struct minus - : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3, typename N4 - > -struct minus< N1,N2,N3,N4,na > - - : minus< minus< minus< N1,N2 >, N3>, N4> -{ - - - - - -}; - -template< - typename N1, typename N2, typename N3 - > -struct minus< N1,N2,N3,na,na > - - : minus< minus< N1,N2 >, N3> -{ - - - - - -}; - -template< - typename N1, typename N2 - > -struct minus< N1,N2,na,na,na > - : minus_impl< - typename minus_tag<N1>::type - , typename minus_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - - - - - -}; - -template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { -template<> -struct minus_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : integral_c< - typename aux::largest_int< - typename N1::value_type - , typename N2::value_type - >::type - , ( N1::value - - N2::value - ) - > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 35 "/usr/include/boost/mpl/aux_/arithmetic_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/minus.hpp" 2 3 4 -# 21 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/advance_fwd.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/advance_fwd.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< typename Tag > struct advance_impl; -template< typename Iterator, typename N > struct advance; - -}} -# 22 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/distance_fwd.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/distance_fwd.hpp" 3 4 -namespace boost { namespace mpl { - - - -template< typename Tag > struct distance_impl; -template< typename First, typename Last > struct distance; - -}} -# 23 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/prior.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 2 3 4 - - - - - -namespace boost { namespace mpl { - -template< - typename Vector - , long n_ - > -struct v_iter -{ - typedef aux::v_iter_tag tag; - typedef random_access_iterator_tag category; - typedef typename v_at<Vector,n_>::type type; - - typedef Vector vector_; - typedef mpl::long_<n_> pos; -# 56 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 3 4 -}; - - - - -template< - typename Vector - , long n_ - > -struct next< v_iter<Vector,n_> > -{ - typedef v_iter<Vector,(n_ + 1)> type; -}; - -template< - typename Vector - , long n_ - > -struct prior< v_iter<Vector,n_> > -{ - typedef v_iter<Vector,(n_ - 1)> type; -}; - -template< - typename Vector - , long n_ - , typename Distance - > -struct advance< v_iter<Vector,n_>,Distance> -{ - typedef v_iter< - Vector - , (n_ + Distance::value) - > type; -}; - -template< - typename Vector - , long n_ - , long m_ - > -struct distance< v_iter<Vector,n_>, v_iter<Vector,m_> > - : mpl::long_<(m_ - n_)> -{ -}; -# 128 "/usr/include/boost/mpl/vector/aux_/iterator.hpp" 3 4 -}} -# 23 "/usr/include/boost/mpl/vector/aux_/vector0.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< typename Dummy = na > struct vector0; - -template<> struct vector0<na> -{ - - typedef aux::vector_tag tag; - typedef vector0 type; - typedef long_<32768> lower_bound_; - typedef lower_bound_ upper_bound_; - typedef long_<0> size; - - static aux::type_wrapper<void_> item_(...); -# 48 "/usr/include/boost/mpl/vector/aux_/vector0.hpp" 3 4 -}; - -}} -# 19 "/usr/include/boost/mpl/vector/aux_/clear.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - - - -template<> -struct clear_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef vector0<> type; - }; -}; -# 53 "/usr/include/boost/mpl/vector/aux_/clear.hpp" 3 4 -}} -# 25 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/O1_size.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/vector/aux_/O1_size.hpp" 3 4 -namespace boost { namespace mpl { - - - -template<> -struct O1_size_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : Vector::size - { - }; -}; -# 54 "/usr/include/boost/mpl/vector/aux_/O1_size.hpp" 3 4 -}} -# 26 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/size.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/vector/aux_/size.hpp" 3 4 -namespace boost { namespace mpl { - - - -template<> -struct size_impl< aux::vector_tag > - : O1_size_impl< aux::vector_tag > -{ -}; -# 47 "/usr/include/boost/mpl/vector/aux_/size.hpp" 3 4 -}} -# 27 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/empty.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/vector/aux_/empty.hpp" 3 4 -namespace boost { namespace mpl { - - - -template<> -struct empty_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : is_same< - typename Vector::lower_bound_ - , typename Vector::upper_bound_ - > - { - }; -}; -# 66 "/usr/include/boost/mpl/vector/aux_/empty.hpp" 3 4 -}} -# 28 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/mpl/vector/aux_/begin_end.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/vector/aux_/begin_end.hpp" 3 4 -namespace boost { namespace mpl { - -template<> -struct begin_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_iter<Vector,0> type; - }; -}; - -template<> -struct end_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_iter<Vector,Vector::size::value> type; - }; -}; - -}} -# 32 "/usr/include/boost/mpl/vector/vector0.hpp" 2 3 4 -# 19 "/usr/include/boost/mpl/vector/vector10.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/vector/vector10.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 3 4 -# 49 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0 - > -struct vector1 - : v_item< - T0 - , vector0< > - > -{ - typedef vector1 type; -}; - -template< - typename T0, typename T1 - > -struct vector2 - : v_item< - T1 - , vector1<T0> - > -{ - typedef vector2 type; -}; - -template< - typename T0, typename T1, typename T2 - > -struct vector3 - : v_item< - T2 - , vector2< T0,T1 > - > -{ - typedef vector3 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3 - > -struct vector4 - : v_item< - T3 - , vector3< T0,T1,T2 > - > -{ - typedef vector4 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - > -struct vector5 - : v_item< - T4 - , vector4< T0,T1,T2,T3 > - > -{ - typedef vector5 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct vector6 - : v_item< - T5 - , vector5< T0,T1,T2,T3,T4 > - > -{ - typedef vector6 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6 - > -struct vector7 - : v_item< - T6 - , vector6< T0,T1,T2,T3,T4,T5 > - > -{ - typedef vector7 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7 - > -struct vector8 - : v_item< - T7 - , vector7< T0,T1,T2,T3,T4,T5,T6 > - > -{ - typedef vector8 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8 - > -struct vector9 - : v_item< - T8 - , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > - > -{ - typedef vector9 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - > -struct vector10 - : v_item< - T9 - , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > - > -{ - typedef vector10 type; -}; - -}} -# 50 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/vector/vector10.hpp" 2 3 4 -# 19 "/usr/include/boost/mpl/vector/vector20.hpp" 2 3 4 -# 27 "/usr/include/boost/mpl/vector/vector20.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 3 4 -# 49 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 3 4 -# 1 "/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10 - > -struct vector11 - : v_item< - T10 - , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > - > -{ - typedef vector11 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11 - > -struct vector12 - : v_item< - T11 - , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > - > -{ - typedef vector12 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12 - > -struct vector13 - : v_item< - T12 - , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > - > -{ - typedef vector13 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13 - > -struct vector14 - : v_item< - T13 - , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > - > -{ - typedef vector14 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - > -struct vector15 - : v_item< - T14 - , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > - > -{ - typedef vector15 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15 - > -struct vector16 - : v_item< - T15 - , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > - > -{ - typedef vector16 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16 - > -struct vector17 - : v_item< - T16 - , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > - > -{ - typedef vector17 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17 - > -struct vector18 - : v_item< - T17 - , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > - > -{ - typedef vector18 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18 - > -struct vector19 - : v_item< - T18 - , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > - > -{ - typedef vector19 type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18, typename T19 - > -struct vector20 - : v_item< - T19 - , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > - > -{ - typedef vector20 type; -}; - -}} -# 50 "/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/vector/vector20.hpp" 2 3 4 -# 37 "/usr/include/boost/mpl/vector.hpp" 2 3 4 -# 46 "/usr/include/boost/mpl/vector.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/vector.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na - , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na - , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na - , typename T12 = na, typename T13 = na, typename T14 = na - , typename T15 = na, typename T16 = na, typename T17 = na - , typename T18 = na, typename T19 = na - > -struct vector; - -template< - - > -struct vector< - na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector0< > -{ - typedef vector0< >::type type; -}; - -template< - typename T0 - > -struct vector< - T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector1<T0> -{ - typedef typename vector1<T0>::type type; -}; - -template< - typename T0, typename T1 - > -struct vector< - T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector2< T0,T1 > -{ - typedef typename vector2< T0,T1 >::type type; -}; - -template< - typename T0, typename T1, typename T2 - > -struct vector< - T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector3< T0,T1,T2 > -{ - typedef typename vector3< T0,T1,T2 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3 - > -struct vector< - T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector4< T0,T1,T2,T3 > -{ - typedef typename vector4< T0,T1,T2,T3 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - > -struct vector< - T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector5< T0,T1,T2,T3,T4 > -{ - typedef typename vector5< T0,T1,T2,T3,T4 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct vector< - T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector6< T0,T1,T2,T3,T4,T5 > -{ - typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector7< T0,T1,T2,T3,T4,T5,T6 > -{ - typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na - , na, na, na - > - : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > -{ - typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na - , na, na, na - > - : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > -{ - typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na - , na, na, na - > - : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > -{ - typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na - , na, na, na - > - : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > -{ - typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na - , na, na, na, na - > - : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > -{ - typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na - , na, na, na, na - > - : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > -{ - typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na - , na, na, na, na - > - : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > -{ - typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na - , na, na, na, na - > - : vector15< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - > -{ - typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, na, na, na, na - > - : vector16< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15 - > -{ - typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, na, na, na - > - : vector17< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16 - > -{ - typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, na, na - > - : vector18< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17 - > -{ - typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; -}; - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18 - > -struct vector< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18, na - > - : vector19< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18 - > -{ - typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; -}; - - - -template< - typename T0, typename T1, typename T2, typename T3, typename T4 - , typename T5, typename T6, typename T7, typename T8, typename T9 - , typename T10, typename T11, typename T12, typename T13, typename T14 - , typename T15, typename T16, typename T17, typename T18, typename T19 - > -struct vector - : vector20< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 - , T15, T16, T17, T18, T19 - > -{ - typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 47 "/usr/include/boost/mpl/vector.hpp" 2 3 4 -# 15 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/at.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/at.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/at_impl.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/aux_/at_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/advance.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/advance.hpp" 3 4 -# 1 "/usr/include/boost/mpl/negate.hpp" 1 3 4 -# 25 "/usr/include/boost/mpl/negate.hpp" 3 4 -namespace boost { namespace mpl { - -template< typename Tag > struct negate_impl; - -template< typename T > struct negate_tag -{ - typedef typename T::tag type; -}; - -template< - typename N = na - > -struct negate - - : negate_impl< - typename negate_tag<N>::type - >::template apply<N>::type - - - - - - -{ - -}; - -template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; } -# 65 "/usr/include/boost/mpl/negate.hpp" 3 4 -template<> -struct negate_impl<integral_c_tag> -{ - - - - - template< typename N > struct apply - : integral_c< typename N::value_type, (-N::value) > - - { - }; -}; - -}} -# 20 "/usr/include/boost/mpl/advance.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/advance.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/advance_forward.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/advance_forward.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/aux_/advance_forward.hpp" 2 3 4 -# 32 "/usr/include/boost/mpl/aux_/advance_forward.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/advance_forward.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - -template< long N > struct advance_forward; -template<> -struct advance_forward<0> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef iter0 type; - }; -}; - -template<> -struct advance_forward<1> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next<iter0>::type iter1; - typedef iter1 type; - }; -}; - -template<> -struct advance_forward<2> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next<iter0>::type iter1; - typedef typename next<iter1>::type iter2; - typedef iter2 type; - }; -}; - -template<> -struct advance_forward<3> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next<iter0>::type iter1; - typedef typename next<iter1>::type iter2; - typedef typename next<iter2>::type iter3; - typedef iter3 type; - }; -}; - -template<> -struct advance_forward<4> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next<iter0>::type iter1; - typedef typename next<iter1>::type iter2; - typedef typename next<iter2>::type iter3; - typedef typename next<iter3>::type iter4; - typedef iter4 type; - }; -}; - -template< long N > -struct advance_forward -{ - template< typename Iterator > struct apply - { - typedef typename apply_wrap1< - advance_forward<4> - , Iterator - >::type chunk_result_; - - typedef typename apply_wrap1< - advance_forward<( - (N - 4) < 0 - ? 0 - : N - 4 - )> - , chunk_result_ - >::type type; - }; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 33 "/usr/include/boost/mpl/aux_/advance_forward.hpp" 2 3 4 -# 25 "/usr/include/boost/mpl/advance.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/aux_/advance_backward.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/advance_backward.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/aux_/advance_backward.hpp" 2 3 4 -# 32 "/usr/include/boost/mpl/aux_/advance_backward.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/advance_backward.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - -template< long N > struct advance_backward; -template<> -struct advance_backward<0> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef iter0 type; - }; -}; - -template<> -struct advance_backward<1> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior<iter0>::type iter1; - typedef iter1 type; - }; -}; - -template<> -struct advance_backward<2> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior<iter0>::type iter1; - typedef typename prior<iter1>::type iter2; - typedef iter2 type; - }; -}; - -template<> -struct advance_backward<3> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior<iter0>::type iter1; - typedef typename prior<iter1>::type iter2; - typedef typename prior<iter2>::type iter3; - typedef iter3 type; - }; -}; - -template<> -struct advance_backward<4> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior<iter0>::type iter1; - typedef typename prior<iter1>::type iter2; - typedef typename prior<iter2>::type iter3; - typedef typename prior<iter3>::type iter4; - typedef iter4 type; - }; -}; - -template< long N > -struct advance_backward -{ - template< typename Iterator > struct apply - { - typedef typename apply_wrap1< - advance_backward<4> - , Iterator - >::type chunk_result_; - - typedef typename apply_wrap1< - advance_backward<( - (N - 4) < 0 - ? 0 - : N - 4 - )> - , chunk_result_ - >::type type; - }; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 33 "/usr/include/boost/mpl/aux_/advance_backward.hpp" 2 3 4 -# 26 "/usr/include/boost/mpl/advance.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - - -template< typename Tag > -struct advance_impl -{ - template< typename Iterator, typename N > struct apply - { - typedef typename less< N,long_<0> >::type backward_; - typedef typename if_< backward_, negate<N>, N >::type offset_; - - typedef typename if_< - backward_ - , aux::advance_backward< offset_::value > - , aux::advance_forward< offset_::value > - >::type f_; - - typedef typename apply_wrap1<f_,Iterator>::type type; - }; -}; - - -template< - typename Iterator = na - , typename N = na - > -struct advance - : advance_impl< typename tag<Iterator>::type > - ::template apply<Iterator,N> -{ -}; - -template< - typename Iterator - , long N - > -struct advance_c - : advance_impl< typename tag<Iterator>::type > - ::template apply<Iterator,long_<N> > -{ -}; - -template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/aux_/at_impl.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - - - - -template< typename Tag > -struct at_impl -{ - template< typename Sequence, typename N > struct apply - { - typedef typename advance< - typename begin<Sequence>::type - , N - >::type iter_; - - typedef typename deref<iter_>::type type; - }; -}; - - template<> struct at_impl<non_sequence_tag> {}; - -}} -# 19 "/usr/include/boost/mpl/at.hpp" 2 3 4 - - - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename N = na - > -struct at - : at_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence,N > -{ - -}; - -template< - typename Sequence - , long N - > -struct at_c - : at_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence,mpl::long_<N> > -{ -}; - -template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; } - -}} -# 17 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/size.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/size.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/size_impl.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/size_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/distance.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/distance.hpp" 3 4 -# 1 "/usr/include/boost/mpl/iter_fold.hpp" 1 3 4 -# 21 "/usr/include/boost/mpl/iter_fold.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/iter_fold_impl.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/aux_/iter_fold_impl.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/aux_/iter_fold_impl.hpp" 2 3 4 -# 33 "/usr/include/boost/mpl/aux_/iter_fold_impl.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/iter_fold_impl.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" 3 4 -namespace boost { namespace mpl { namespace aux { - - - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 0,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 1,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next<iter0>::type iter1; - - - typedef state1 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 2,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next<iter1>::type iter2; - - - typedef state2 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 3,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename mpl::next<iter2>::type iter3; - - - typedef state3 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 4,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next<iter0>::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next<iter1>::type iter2; - typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename mpl::next<iter2>::type iter3; - typedef typename apply2< ForwardOp,state3,iter3 >::type state4; - typedef typename mpl::next<iter3>::type iter4; - - - typedef state4 state; - typedef iter4 iterator; -}; - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl -{ - typedef iter_fold_impl< - 4 - , First - , Last - , State - , ForwardOp - > chunk_; - - typedef iter_fold_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , typename chunk_::iterator - , Last - , typename chunk_::state - , ForwardOp - > res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< -1,First,Last,State,ForwardOp > - : iter_fold_impl< - -1 - , typename mpl::next<First>::type - , Last - , typename apply2< ForwardOp,State,First >::type - , ForwardOp - > -{ -}; - -template< - typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< -1,Last,Last,State,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -}}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 34 "/usr/include/boost/mpl/aux_/iter_fold_impl.hpp" 2 3 4 -# 22 "/usr/include/boost/mpl/iter_fold.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - , typename State = na - , typename ForwardOp = na - > -struct iter_fold -{ - typedef typename aux::iter_fold_impl< - ::boost::mpl::O1_size<Sequence>::value - , typename begin<Sequence>::type - , typename end<Sequence>::type - , State - , typename lambda<ForwardOp>::type - >::state type; - - -}; - -template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; } - -}} -# 19 "/usr/include/boost/mpl/distance.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/iterator_range.hpp" 1 3 4 -# 20 "/usr/include/boost/mpl/iterator_range.hpp" 3 4 -namespace boost { namespace mpl { - -struct iterator_range_tag; - -template< - typename First = na - , typename Last = na - > -struct iterator_range -{ - typedef iterator_range_tag tag; - typedef iterator_range type; - typedef First begin; - typedef Last end; - - -}; - -template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/distance.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 24 "/usr/include/boost/mpl/distance.hpp" 2 3 4 - - - - - - - -namespace boost { namespace mpl { - - -template< typename Tag > struct distance_impl -{ - template< typename First, typename Last > struct apply - - : aux::msvc_eti_base< typename iter_fold< - iterator_range<First,Last> - , mpl::long_<0> - , next<> - >::type > - { -# 60 "/usr/include/boost/mpl/distance.hpp" 3 4 - }; -}; - -template< - typename First = na - , typename Last = na - > -struct distance - : distance_impl< typename tag<First>::type > - ::template apply<First, Last> -{ - -}; - -template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; } - -}} -# 20 "/usr/include/boost/mpl/aux_/size_impl.hpp" 2 3 4 - - - -namespace boost { namespace mpl { - - - - -template< typename Tag > -struct size_impl -{ - template< typename Sequence > struct apply - - : distance< - typename begin<Sequence>::type - , typename end<Sequence>::type - > - { - - - - - - - - }; -}; - - template<> struct size_impl<non_sequence_tag> {}; - -}} -# 20 "/usr/include/boost/mpl/size.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - > -struct size - : aux::msvc_eti_base< - typename size_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence >::type - >::type -{ - -}; - -template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; } - -}} -# 18 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/comparison.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/comparison.hpp" 3 4 -# 1 "/usr/include/boost/mpl/not_equal_to.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/not_equal_to.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/not_equal_to.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct not_equal_to_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct not_equal_to_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct not_equal_to_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct not_equal_to_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct not_equal_to_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct not_equal_to - - : not_equal_to_impl< - typename not_equal_to_tag<N1>::type - , typename not_equal_to_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct not_equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< not_equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_equal_to< na , na > result_; typedef not_equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< not_equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< not_equal_to< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct not_equal_to_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N1::value != N2::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/not_equal_to.hpp" 2 3 4 -# 19 "/usr/include/boost/mpl/comparison.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/greater.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/greater.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/greater.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct greater_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct greater_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct greater_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct greater_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct greater_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct greater - - : greater_impl< - typename greater_tag<N1>::type - , typename greater_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct greater< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater< na , na > result_; typedef greater< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct greater_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N1::value > N2::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/greater.hpp" 2 3 4 -# 21 "/usr/include/boost/mpl/comparison.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/less_equal.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/less_equal.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/less_equal.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct less_equal_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct less_equal_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct less_equal_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct less_equal_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct less_equal_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct less_equal - - : less_equal_impl< - typename less_equal_tag<N1>::type - , typename less_equal_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct less_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< less_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less_equal< na , na > result_; typedef less_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less_equal< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct less_equal_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N1::value <= N2::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/less_equal.hpp" 2 3 4 -# 22 "/usr/include/boost/mpl/comparison.hpp" 2 3 4 -# 1 "/usr/include/boost/mpl/greater_equal.hpp" 1 3 4 -# 19 "/usr/include/boost/mpl/greater_equal.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 1 3 4 -# 27 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 3 4 -# 1 "/usr/include/boost/mpl/apply_wrap.hpp" 1 3 4 -# 23 "/usr/include/boost/mpl/aux_/numeric_op.hpp" 2 3 4 -# 28 "/usr/include/boost/mpl/aux_/comparison_op.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/greater_equal.hpp" 1 3 4 -# 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp" 3 4 -namespace boost { namespace mpl { - -template< - typename Tag1 - , typename Tag2 - > -struct greater_equal_impl - : if_c< - ( Tag1::value - > Tag2::value - ) - - , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > - , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > - >::type -{ -}; - - -template<> struct greater_equal_impl< na,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct greater_equal_impl< na,Tag > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename Tag > struct greater_equal_impl< Tag,na > -{ - template< typename U1, typename U2 > struct apply - { - typedef apply type; - static const int value = 0; - }; -}; - -template< typename T > struct greater_equal_tag -{ - typedef typename T::tag type; -}; - -template< - typename N1 = na - , typename N2 = na - > -struct greater_equal - - : greater_equal_impl< - typename greater_equal_tag<N1>::type - , typename greater_equal_tag<N2>::type - >::template apply< N1,N2 >::type -{ - - -}; - -template<> struct greater_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater_equal< na , na > result_; typedef greater_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater_equal< na , na > > : int_<-1> { }; } - -}} - -namespace boost { namespace mpl { - -template<> -struct greater_equal_impl< integral_c_tag,integral_c_tag > -{ - template< typename N1, typename N2 > struct apply - - : bool_< ( N1::value >= N2::value ) > - { - }; -}; - -}} -# 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 -# 36 "/usr/include/boost/mpl/aux_/comparison_op.hpp" 2 3 4 -# 20 "/usr/include/boost/mpl/greater_equal.hpp" 2 3 4 -# 23 "/usr/include/boost/mpl/comparison.hpp" 2 3 4 -# 19 "/usr/include/boost/math/policies/policy.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 22 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 27 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/stdlib.h" 1 3 4 -# 36 "/usr/include/c++/9.2.0/stdlib.h" 3 4 -# 1 "/usr/include/c++/9.2.0/cstdlib" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstdlib" 3 -# 37 "/usr/include/c++/9.2.0/stdlib.h" 2 3 4 - -using std::abort; -using std::atexit; -using std::exit; - - - using std::at_quick_exit; - - - using std::quick_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; -# 28 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 29 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/math.h" 1 3 4 -# 36 "/usr/include/c++/9.2.0/math.h" 3 4 -# 1 "/usr/include/c++/9.2.0/cmath" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cmath" 3 4 - -# 40 "/usr/include/c++/9.2.0/cmath" 3 -# 37 "/usr/include/c++/9.2.0/math.h" 2 3 4 - -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; -# 30 "/usr/include/boost/math/policies/policy.hpp" 2 3 4 - -namespace boost{ namespace math{ - -namespace tools{ - -template <class T> -constexpr int digits() noexcept; -template <class T> -constexpr T epsilon() noexcept(std::is_floating_point<T>::value); - -} - -namespace policies{ -# 197 "/usr/include/boost/math/policies/policy.hpp" 3 4 -enum error_policy_type -{ - throw_on_error = 0, - errno_on_error = 1, - ignore_error = 2, - user_error = 3 -}; - -template <error_policy_type N = throw_on_error> struct domain_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const domain_error<N>*); char test_is_default_arg(const domain_error<throw_on_error>*); template <class T> struct is_domain_error_imp { template <error_policy_type N> static char test(const domain_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_domain_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_domain_error_imp<T>::value>{}; -template <error_policy_type N = throw_on_error> struct pole_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const pole_error<N>*); char test_is_default_arg(const pole_error<throw_on_error>*); template <class T> struct is_pole_error_imp { template <error_policy_type N> static char test(const pole_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_pole_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_pole_error_imp<T>::value>{}; -template <error_policy_type N = throw_on_error> struct overflow_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const overflow_error<N>*); char test_is_default_arg(const overflow_error<throw_on_error>*); template <class T> struct is_overflow_error_imp { template <error_policy_type N> static char test(const overflow_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_overflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_overflow_error_imp<T>::value>{}; -template <error_policy_type N = ignore_error> struct underflow_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const underflow_error<N>*); char test_is_default_arg(const underflow_error<ignore_error>*); template <class T> struct is_underflow_error_imp { template <error_policy_type N> static char test(const underflow_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_underflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_underflow_error_imp<T>::value>{}; -template <error_policy_type N = ignore_error> struct denorm_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const denorm_error<N>*); char test_is_default_arg(const denorm_error<ignore_error>*); template <class T> struct is_denorm_error_imp { template <error_policy_type N> static char test(const denorm_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_denorm_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_denorm_error_imp<T>::value>{}; -template <error_policy_type N = throw_on_error> struct evaluation_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const evaluation_error<N>*); char test_is_default_arg(const evaluation_error<throw_on_error>*); template <class T> struct is_evaluation_error_imp { template <error_policy_type N> static char test(const evaluation_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_evaluation_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_evaluation_error_imp<T>::value>{}; -template <error_policy_type N = throw_on_error> struct rounding_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const rounding_error<N>*); char test_is_default_arg(const rounding_error<throw_on_error>*); template <class T> struct is_rounding_error_imp { template <error_policy_type N> static char test(const rounding_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_rounding_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_rounding_error_imp<T>::value>{}; -template <error_policy_type N = ignore_error> struct indeterminate_result_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const indeterminate_result_error<N>*); char test_is_default_arg(const indeterminate_result_error<ignore_error>*); template <class T> struct is_indeterminate_result_error_imp { template <error_policy_type N> static char test(const indeterminate_result_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_indeterminate_result_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_indeterminate_result_error_imp<T>::value>{}; - - - - -template <bool N = true> struct promote_float : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const promote_float<N>*); char test_is_default_arg(const promote_float<true>*); template <class T> struct is_promote_float_imp { template <bool N> static char test(const promote_float<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_promote_float : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_float_imp<T>::value>{}; -template <bool N = true> struct promote_double : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const promote_double<N>*); char test_is_default_arg(const promote_double<true>*); template <class T> struct is_promote_double_imp { template <bool N> static char test(const promote_double<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_promote_double : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_double_imp<T>::value>{}; -template <bool N = true> struct assert_undefined : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const assert_undefined<N>*); char test_is_default_arg(const assert_undefined<true>*); template <class T> struct is_assert_undefined_imp { template <bool N> static char test(const assert_undefined<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_assert_undefined : public boost::mpl::bool_< ::boost::math::policies::detail::is_assert_undefined_imp<T>::value>{}; - - - -enum discrete_quantile_policy_type -{ - real, - integer_round_outwards, - integer_round_inwards, - integer_round_down, - integer_round_up, - integer_round_nearest -}; - -template <discrete_quantile_policy_type N = integer_round_outwards> struct discrete_quantile : public boost::mpl::int_<N>{}; namespace detail{ template <discrete_quantile_policy_type N> char test_is_valid_arg(const discrete_quantile<N>*); char test_is_default_arg(const discrete_quantile<integer_round_outwards>*); template <class T> struct is_discrete_quantile_imp { template <discrete_quantile_policy_type N> static char test(const discrete_quantile<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_discrete_quantile : public boost::mpl::bool_< ::boost::math::policies::detail::is_discrete_quantile_imp<T>::value>{}; - - - -template <int N = 0> struct digits10 : public boost::mpl::int_<N>{}; namespace detail{ template <int N> char test_is_valid_arg(const digits10<N>*); char test_is_default_arg(const digits10<0>*); template <class T> struct is_digits10_imp { template <int N> static char test(const digits10<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_digits10 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits10_imp<T>::value>{}; -template <int N = 0> struct digits2 : public boost::mpl::int_<N>{}; namespace detail{ template <int N> char test_is_valid_arg(const digits2<N>*); char test_is_default_arg(const digits2<0>*); template <class T> struct is_digits2_imp { template <int N> static char test(const digits2<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_digits2 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits2_imp<T>::value>{}; - - - -template <unsigned long N = 1000000> struct max_series_iterations : public boost::mpl::int_<N>{}; namespace detail{ template <unsigned long N> char test_is_valid_arg(const max_series_iterations<N>*); char test_is_default_arg(const max_series_iterations<1000000>*); template <class T> struct is_max_series_iterations_imp { template <unsigned long N> static char test(const max_series_iterations<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_max_series_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_series_iterations_imp<T>::value>{}; -template <unsigned long N = 200> struct max_root_iterations : public boost::mpl::int_<N>{}; namespace detail{ template <unsigned long N> char test_is_valid_arg(const max_root_iterations<N>*); char test_is_default_arg(const max_root_iterations<200>*); template <class T> struct is_max_root_iterations_imp { template <unsigned long N> static char test(const max_root_iterations<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_max_root_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_root_iterations_imp<T>::value>{}; - - - - - - - -struct default_policy{}; - -namespace detail{ - - - -template <class Digits10, class Digits2> -struct precision -{ - - - - typedef typename mpl::if_c< - (Digits10::value == 0), - digits2<0>, - digits2<((Digits10::value + 1) * 1000L) / 301L> - >::type digits2_type; -public: - - - - - - typedef typename mpl::if_c< - (Digits2::value > digits2_type::value), - Digits2, digits2_type>::type type; - -}; - -template <class A, class B, bool b> -struct select_result -{ - typedef A type; -}; -template <class A, class B> -struct select_result<A, B, false> -{ - typedef typename mpl::deref<B>::type type; -}; - -template <class Seq, class Pred, class DefaultType> -struct find_arg -{ -private: - typedef typename mpl::find_if<Seq, Pred>::type iter; - typedef typename mpl::end<Seq>::type end_type; -public: - typedef typename select_result< - DefaultType, iter, - ::boost::is_same<iter, end_type>::value>::type type; -}; - -double test_is_valid_arg(...); -double test_is_default_arg(...); -char test_is_valid_arg(const default_policy*); -char test_is_default_arg(const default_policy*); - -template <class T> -struct is_valid_policy_imp -{ - static const bool value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1; -}; - -template <class T> -struct is_default_policy_imp -{ - static const bool value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1; -}; - -template <class T> struct is_valid_policy -: public mpl::bool_< - ::boost::math::policies::detail::is_valid_policy_imp<T>::value> -{}; - -template <class T> struct is_default_policy -: public mpl::bool_< - ::boost::math::policies::detail::is_default_policy_imp<T>::value> -{ - template <class U> - struct apply - { - typedef is_default_policy<U> type; - }; -}; - -template <class Seq, class T, int N> -struct append_N -{ - typedef typename mpl::push_back<Seq, T>::type new_seq; - typedef typename append_N<new_seq, T, N-1>::type type; -}; - -template <class Seq, class T> -struct append_N<Seq, T, 0> -{ - typedef Seq type; -}; - - - - - -template <bool f, bool d> -struct default_args -{ - typedef promote_float<false> arg1; - typedef promote_double<false> arg2; -}; - -template <> -struct default_args<false, false> -{ - typedef default_policy arg1; - typedef default_policy arg2; -}; - -template <> -struct default_args<true, false> -{ - typedef promote_float<false> arg1; - typedef default_policy arg2; -}; - -template <> -struct default_args<false, true> -{ - typedef promote_double<false> arg1; - typedef default_policy arg2; -}; - -typedef default_args<true, true>::arg1 forwarding_arg1; -typedef default_args<true, true>::arg2 forwarding_arg2; - -} - - - - -template <class A1 = default_policy, - class A2 = default_policy, - class A3 = default_policy, - class A4 = default_policy, - class A5 = default_policy, - class A6 = default_policy, - class A7 = default_policy, - class A8 = default_policy, - class A9 = default_policy, - class A10 = default_policy, - class A11 = default_policy, - class A12 = default_policy, - class A13 = default_policy> -struct policy -{ -private: - - - - static_assert(::boost::math::policies::detail::is_valid_policy<A1>::value, "::boost::math::policies::detail::is_valid_policy<A1>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A2>::value, "::boost::math::policies::detail::is_valid_policy<A2>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A3>::value, "::boost::math::policies::detail::is_valid_policy<A3>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A4>::value, "::boost::math::policies::detail::is_valid_policy<A4>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A5>::value, "::boost::math::policies::detail::is_valid_policy<A5>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A6>::value, "::boost::math::policies::detail::is_valid_policy<A6>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A7>::value, "::boost::math::policies::detail::is_valid_policy<A7>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A8>::value, "::boost::math::policies::detail::is_valid_policy<A8>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A9>::value, "::boost::math::policies::detail::is_valid_policy<A9>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A10>::value, "::boost::math::policies::detail::is_valid_policy<A10>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A11>::value, "::boost::math::policies::detail::is_valid_policy<A11>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A12>::value, "::boost::math::policies::detail::is_valid_policy<A12>::value"); - static_assert(::boost::math::policies::detail::is_valid_policy<A13>::value, "::boost::math::policies::detail::is_valid_policy<A13>::value"); - - - - typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list; - -public: - typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, domain_error<> >::type domain_error_type; - typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, pole_error<> >::type pole_error_type; - typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, overflow_error<> >::type overflow_error_type; - typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, underflow_error<> >::type underflow_error_type; - typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, denorm_error<> >::type denorm_error_type; - typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, evaluation_error<> >::type evaluation_error_type; - typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, rounding_error<> >::type rounding_error_type; - typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, indeterminate_result_error<> >::type indeterminate_result_error_type; -private: - - - - typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type; - typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, digits2<> >::type bits_precision_type; -public: - typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type; - - - - typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, promote_float<> >::type promote_float_type; - typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, promote_double<> >::type promote_double_type; - - - - typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, discrete_quantile<> >::type discrete_quantile_type; - - - - typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, assert_undefined<> >::type assert_undefined_type; - - - - typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type; - typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type; -}; - - - - - -template <> -struct policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> -{ -public: - typedef domain_error<> domain_error_type; - typedef pole_error<> pole_error_type; - typedef overflow_error<> overflow_error_type; - typedef underflow_error<> underflow_error_type; - typedef denorm_error<> denorm_error_type; - typedef evaluation_error<> evaluation_error_type; - typedef rounding_error<> rounding_error_type; - typedef indeterminate_result_error<> indeterminate_result_error_type; - - typedef digits2<> precision_type; - - - - typedef promote_float<> promote_float_type; - typedef promote_double<> promote_double_type; - typedef discrete_quantile<> discrete_quantile_type; - typedef assert_undefined<> assert_undefined_type; - typedef max_series_iterations<> max_series_iterations_type; - typedef max_root_iterations<> max_root_iterations_type; -}; - -template <> -struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> -{ -public: - typedef domain_error<> domain_error_type; - typedef pole_error<> pole_error_type; - typedef overflow_error<> overflow_error_type; - typedef underflow_error<> underflow_error_type; - typedef denorm_error<> denorm_error_type; - typedef evaluation_error<> evaluation_error_type; - typedef rounding_error<> rounding_error_type; - typedef indeterminate_result_error<> indeterminate_result_error_type; - - typedef digits2<> precision_type; - - - - typedef promote_float<false> promote_float_type; - typedef promote_double<false> promote_double_type; - typedef discrete_quantile<> discrete_quantile_type; - typedef assert_undefined<> assert_undefined_type; - typedef max_series_iterations<> max_series_iterations_type; - typedef max_root_iterations<> max_root_iterations_type; -}; - -template <class Policy, - class A1 = default_policy, - class A2 = default_policy, - class A3 = default_policy, - class A4 = default_policy, - class A5 = default_policy, - class A6 = default_policy, - class A7 = default_policy, - class A8 = default_policy, - class A9 = default_policy, - class A10 = default_policy, - class A11 = default_policy, - class A12 = default_policy, - class A13 = default_policy> -struct normalise -{ -private: - typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list; - typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, typename Policy::domain_error_type >::type domain_error_type; - typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, typename Policy::pole_error_type >::type pole_error_type; - typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, typename Policy::overflow_error_type >::type overflow_error_type; - typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, typename Policy::underflow_error_type >::type underflow_error_type; - typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, typename Policy::denorm_error_type >::type denorm_error_type; - typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, typename Policy::evaluation_error_type >::type evaluation_error_type; - typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, typename Policy::rounding_error_type >::type rounding_error_type; - typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; - - - - typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type; - typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, typename Policy::precision_type >::type bits_precision_type; - typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type; - - - - typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, typename Policy::promote_float_type >::type promote_float_type; - typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, typename Policy::promote_double_type >::type promote_double_type; - - - - typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, typename Policy::discrete_quantile_type >::type discrete_quantile_type; - - - - typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, typename Policy::assert_undefined_type >::type assert_undefined_type; - - - - typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, typename Policy::max_series_iterations_type>::type max_series_iterations_type; - typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, typename Policy::max_root_iterations_type>::type max_root_iterations_type; - - - - typedef mpl::vector< - domain_error_type, - pole_error_type, - overflow_error_type, - underflow_error_type, - denorm_error_type, - evaluation_error_type, - rounding_error_type, - indeterminate_result_error_type, - precision_type, - promote_float_type, - promote_double_type, - discrete_quantile_type, - assert_undefined_type, - max_series_iterations_type, - max_root_iterations_type> result_list; - - - - typedef typename mpl::remove_if<result_list, detail::is_default_policy<mpl::_> >::type reduced_list; - - - - typedef typename detail::append_N<reduced_list, default_policy, (14 - ::boost::mpl::size<reduced_list>::value)>::type result_type; -public: - typedef policy< - typename mpl::at<result_type, mpl::int_<0> >::type, - typename mpl::at<result_type, mpl::int_<1> >::type, - typename mpl::at<result_type, mpl::int_<2> >::type, - typename mpl::at<result_type, mpl::int_<3> >::type, - typename mpl::at<result_type, mpl::int_<4> >::type, - typename mpl::at<result_type, mpl::int_<5> >::type, - typename mpl::at<result_type, mpl::int_<6> >::type, - typename mpl::at<result_type, mpl::int_<7> >::type, - typename mpl::at<result_type, mpl::int_<8> >::type, - typename mpl::at<result_type, mpl::int_<9> >::type, - typename mpl::at<result_type, mpl::int_<10> >::type, - typename mpl::at<result_type, mpl::int_<11> >::type, - typename mpl::at<result_type, mpl::int_<12> >::type > type; -}; - - - -template <> -struct normalise<policy<>, - promote_float<false>, - promote_double<false>, - discrete_quantile<>, - assert_undefined<>, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy> -{ - typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type; -}; - -template <> -struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>, - promote_float<false>, - promote_double<false>, - discrete_quantile<>, - assert_undefined<>, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy, - default_policy> -{ - typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type; -}; - -inline constexpr policy<> make_policy() noexcept -{ return policy<>(); } - -template <class A1> -inline constexpr typename normalise<policy<>, A1>::type make_policy(const A1&) noexcept -{ - typedef typename normalise<policy<>, A1>::type result_type; - return result_type(); -} - -template <class A1, class A2> -inline constexpr typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&) noexcept -{ - typedef typename normalise<policy<>, A1, A2>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3> -inline constexpr typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6, class A7> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; - return result_type(); -} - -template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11> -inline constexpr typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) noexcept -{ - typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; - return result_type(); -} - - - - -template <class Real, class Policy> -struct evaluation -{ - typedef Real type; -}; - -template <class Policy> -struct evaluation<float, Policy> -{ - typedef typename mpl::if_<typename Policy::promote_float_type, double, float>::type type; -}; - -template <class Policy> -struct evaluation<double, Policy> -{ - typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type; -}; -# 797 "/usr/include/boost/math/policies/policy.hpp" 3 4 -template <class Real, class Policy> -struct precision -{ - static_assert((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)), "(::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0))"); - - typedef typename Policy::precision_type precision_type; - typedef typename mpl::if_c< - ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)), - - precision_type, - typename mpl::if_c< - ((::std::numeric_limits<Real>::digits <= precision_type::value) - || (Policy::precision_type::value <= 0)), - - digits2< ::std::numeric_limits<Real>::digits>, - - precision_type - >::type - >::type type; -# 833 "/usr/include/boost/math/policies/policy.hpp" 3 4 -}; - - - - - -template <class Policy> -struct precision<__float128, Policy> -{ - typedef mpl::int_<113> type; -}; - - - -namespace detail{ - -template <class T, class Policy> -inline constexpr int digits_imp(mpl::true_ const&) noexcept -{ - - static_assert(::std::numeric_limits<T>::is_specialized, "::std::numeric_limits<T>::is_specialized"); - - - - typedef typename boost::math::policies::precision<T, Policy>::type p_t; - return p_t::value; -} - -template <class T, class Policy> -inline constexpr int digits_imp(mpl::false_ const&) noexcept -{ - return tools::digits<T>(); -} - -} - -template <class T, class Policy> -inline constexpr int digits() noexcept -{ - typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type; - return detail::digits_imp<T, Policy>(tag_type()); -} -template <class T, class Policy> -inline constexpr int digits_base10() noexcept -{ - return boost::math::policies::digits<T, Policy>() * 301 / 1000L; -} - -template <class Policy> -inline constexpr unsigned long get_max_series_iterations() noexcept -{ - typedef typename Policy::max_series_iterations_type iter_type; - return iter_type::value; -} - -template <class Policy> -inline constexpr unsigned long get_max_root_iterations() noexcept -{ - typedef typename Policy::max_root_iterations_type iter_type; - return iter_type::value; -} - -namespace detail{ - -template <class T, class Digits, class Small, class Default> -struct series_factor_calc -{ - static T get() noexcept(std::is_floating_point<T>::value) - { - return ldexp(T(1.0), 1 - Digits::value); - } -}; - -template <class T, class Digits> -struct series_factor_calc<T, Digits, mpl::true_, mpl::true_> -{ - static constexpr T get() noexcept(std::is_floating_point<T>::value) - { - return boost::math::tools::epsilon<T>(); - } -}; -template <class T, class Digits> -struct series_factor_calc<T, Digits, mpl::true_, mpl::false_> -{ - static constexpr T get() noexcept(std::is_floating_point<T>::value) - { - return 1 / static_cast<T>(static_cast<boost::uintmax_t>(1u) << (Digits::value - 1)); - } -}; -template <class T, class Digits> -struct series_factor_calc<T, Digits, mpl::false_, mpl::true_> -{ - static constexpr T get() noexcept(std::is_floating_point<T>::value) - { - return boost::math::tools::epsilon<T>(); - } -}; - -template <class T, class Policy> -inline constexpr T get_epsilon_imp(mpl::true_ const&) noexcept(std::is_floating_point<T>::value) -{ - - static_assert(::std::numeric_limits<T>::is_specialized, "::std::numeric_limits<T>::is_specialized"); - static_assert(::std::numeric_limits<T>::radix == 2, "::std::numeric_limits<T>::radix == 2"); - - - - - typedef typename boost::math::policies::precision<T, Policy>::type p_t; - typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int; - typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value; - return series_factor_calc<T, p_t, is_small_int, is_default_value>::get(); -} - -template <class T, class Policy> -inline constexpr T get_epsilon_imp(mpl::false_ const&) noexcept(std::is_floating_point<T>::value) -{ - return tools::epsilon<T>(); -} - -} - -template <class T, class Policy> -inline constexpr T get_epsilon() noexcept(std::is_floating_point<T>::value) -{ - typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type; - return detail::get_epsilon_imp<T, Policy>(tag_type()); -} - -namespace detail{ - -template <class A1, - class A2, - class A3, - class A4, - class A5, - class A6, - class A7, - class A8, - class A9, - class A10, - class A11> -char test_is_policy(const policy<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11>*); -double test_is_policy(...); - -template <class P> -struct is_policy_imp -{ - static const bool value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1); -}; - -} - -template <class P> -struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {}; - - - - -template <class Policy> -struct constructor_error_check -{ - typedef typename Policy::domain_error_type domain_error_type; - typedef typename mpl::if_c< - (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error) || (domain_error_type::value == errno_on_error), - mpl::true_, - mpl::false_>::type type; -}; - -template <class Policy> -struct method_error_check -{ - typedef typename Policy::domain_error_type domain_error_type; - typedef typename mpl::if_c< - (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error), - mpl::false_, - mpl::true_>::type type; -}; - - - -template <class Policy> -struct is_noexcept_error_policy -{ - typedef typename Policy::domain_error_type t1; - typedef typename Policy::pole_error_type t2; - typedef typename Policy::overflow_error_type t3; - typedef typename Policy::underflow_error_type t4; - typedef typename Policy::denorm_error_type t5; - typedef typename Policy::evaluation_error_type t6; - typedef typename Policy::rounding_error_type t7; - typedef typename Policy::indeterminate_result_error_type t8; - - static const bool value = ((t1::value != throw_on_error) && (t1::value != user_error) && (t2::value != throw_on_error) && (t2::value != user_error) && (t3::value != throw_on_error) && (t3::value != user_error) && (t4::value != throw_on_error) && (t4::value != user_error) && (t5::value != throw_on_error) && (t5::value != user_error) && (t6::value != throw_on_error) && (t6::value != user_error) && (t7::value != throw_on_error) && (t7::value != user_error) && (t8::value != throw_on_error) && (t8::value != user_error)) - - - - - - - - ; -}; - -}}} -# 30 "/usr/include/boost/math/special_functions/math_fwd.hpp" 2 3 4 - - -# 1 "/usr/include/boost/config/no_tr1/complex.hpp" 1 3 4 -# 33 "/usr/include/boost/math/special_functions/math_fwd.hpp" 2 3 4 - - - -namespace boost -{ - namespace math - { - - - template <class RT1, class RT2> - typename tools::promote_args<RT1, RT2>::type - beta(RT1 a, RT2 b); - - template <class RT1, class RT2, class A> - typename tools::promote_args<RT1, RT2, A>::type - beta(RT1 a, RT2 b, A x); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - beta(RT1 a, RT2 b, RT3 x, const Policy& pol); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - betac(RT1 a, RT2 b, RT3 x); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - betac(RT1 a, RT2 b, RT3 x, const Policy& pol); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta(RT1 a, RT2 b, RT3 x); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac(RT1 a, RT2 b, RT3 x); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); - - template <class T1, class T2, class T3, class T4> - typename tools::promote_args<T1, T2, T3, T4>::type - ibeta_inv(T1 a, T2 b, T3 p, T4* py); - - template <class T1, class T2, class T3, class T4, class Policy> - typename tools::promote_args<T1, T2, T3, T4>::type - ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_inv(RT1 a, RT2 b, RT3 p); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_inva(RT1 a, RT2 b, RT3 p); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_invb(RT1 a, RT2 b, RT3 p); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); - - template <class T1, class T2, class T3, class T4> - typename tools::promote_args<T1, T2, T3, T4>::type - ibetac_inv(T1 a, T2 b, T3 q, T4* py); - - template <class T1, class T2, class T3, class T4, class Policy> - typename tools::promote_args<T1, T2, T3, T4>::type - ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_inv(RT1 a, RT2 b, RT3 q); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_inva(RT1 a, RT2 b, RT3 q); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_invb(RT1 a, RT2 b, RT3 q); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); - - template <class RT1, class RT2, class RT3> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_derivative(RT1 a, RT2 b, RT3 x); - - template <class RT1, class RT2, class RT3, class Policy> - typename tools::promote_args<RT1, RT2, RT3>::type - ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); - - - template <class T, class Policy> - T binomial_coefficient(unsigned n, unsigned k, const Policy& pol); - template <class T> - T binomial_coefficient(unsigned n, unsigned k); - - - template <class RT> - typename tools::promote_args<RT>::type erf(RT z); - template <class RT, class Policy> - typename tools::promote_args<RT>::type erf(RT z, const Policy&); - - template <class RT> - typename tools::promote_args<RT>::type erfc(RT z); - template <class RT, class Policy> - typename tools::promote_args<RT>::type erfc(RT z, const Policy&); - - template <class RT> - typename tools::promote_args<RT>::type erf_inv(RT z); - template <class RT, class Policy> - typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol); - - template <class RT> - typename tools::promote_args<RT>::type erfc_inv(RT z); - template <class RT, class Policy> - typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol); - - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); - - template <class T> - typename tools::promote_args<T>::type - legendre_p(int l, T x); - template <class T> - typename tools::promote_args<T>::type - legendre_p_prime(int l, T x); - - - template <class T, class Policy> - inline std::vector<T> legendre_p_zeros(int l, const Policy& pol); - - template <class T> - inline std::vector<T> legendre_p_zeros(int l); - - - template <class T, class Policy> - typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type - legendre_p(int l, T x, const Policy& pol); - template <class T, class Policy> - inline typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type - legendre_p_prime(int l, T x, const Policy& pol); - - template <class T> - typename tools::promote_args<T>::type - legendre_q(unsigned l, T x); - - template <class T, class Policy> - typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type - legendre_q(unsigned l, T x, const Policy& pol); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); - - template <class T> - typename tools::promote_args<T>::type - legendre_p(int l, int m, T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type - legendre_p(int l, int m, T x, const Policy& pol); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); - - template <class T> - typename tools::promote_args<T>::type - laguerre(unsigned n, T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type - laguerre(unsigned n, unsigned m, T x, const Policy& pol); - - template <class T1, class T2> - struct laguerre_result - { - typedef typename mpl::if_< - policies::is_policy<T2>, - typename tools::promote_args<T1>::type, - typename tools::promote_args<T2>::type - >::type type; - }; - - template <class T1, class T2> - typename laguerre_result<T1, T2>::type - laguerre(unsigned n, T1 m, T2 x); - - template <class T> - typename tools::promote_args<T>::type - hermite(unsigned n, T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type - hermite(unsigned n, T x, const Policy& pol); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); - - template<class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type chebyshev_next(T1 const & x, T2 const & Tn, T3 const & Tn_1); - - template <class Real, class Policy> - typename tools::promote_args<Real>::type - chebyshev_t(unsigned n, Real const & x, const Policy&); - template<class Real> - typename tools::promote_args<Real>::type chebyshev_t(unsigned n, Real const & x); - - template <class Real, class Policy> - typename tools::promote_args<Real>::type - chebyshev_u(unsigned n, Real const & x, const Policy&); - template<class Real> - typename tools::promote_args<Real>::type chebyshev_u(unsigned n, Real const & x); - - template <class Real, class Policy> - typename tools::promote_args<Real>::type - chebyshev_t_prime(unsigned n, Real const & x, const Policy&); - template<class Real> - typename tools::promote_args<Real>::type chebyshev_t_prime(unsigned n, Real const & x); - - template<class Real, class T2> - Real chebyshev_clenshaw_recurrence(const Real* const c, size_t length, const T2& x); - - template <class T1, class T2> - std::complex<typename tools::promote_args<T1, T2>::type> - spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); - - template <class T1, class T2, class Policy> - std::complex<typename tools::promote_args<T1, T2>::type> - spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type - spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type - spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type - spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type - spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); - - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - ellint_rf(T1 x, T2 y, T3 z); - - template <class T1, class T2, class T3, class Policy> - typename tools::promote_args<T1, T2, T3>::type - ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - ellint_rd(T1 x, T2 y, T3 z); - - template <class T1, class T2, class T3, class Policy> - typename tools::promote_args<T1, T2, T3>::type - ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type - ellint_rc(T1 x, T2 y); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type - ellint_rc(T1 x, T2 y, const Policy& pol); - - template <class T1, class T2, class T3, class T4> - typename tools::promote_args<T1, T2, T3, T4>::type - ellint_rj(T1 x, T2 y, T3 z, T4 p); - - template <class T1, class T2, class T3, class T4, class Policy> - typename tools::promote_args<T1, T2, T3, T4>::type - ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); - - template <class T1, class T2, class T3> - typename tools::promote_args<T1, T2, T3>::type - ellint_rg(T1 x, T2 y, T3 z); - - template <class T1, class T2, class T3, class Policy> - typename tools::promote_args<T1, T2, T3>::type - ellint_rg(T1 x, T2 y, T3 z, const Policy& pol); - - template <typename T> - typename tools::promote_args<T>::type ellint_2(T k); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol); - - template <typename T> - typename tools::promote_args<T>::type ellint_1(T k); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol); - - template <typename T> - typename tools::promote_args<T>::type ellint_d(T k); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi, const Policy& pol); - - namespace detail{ - - template <class T, class U, class V> - struct ellint_3_result - { - typedef typename mpl::if_< - policies::is_policy<V>, - typename tools::promote_args<T, U>::type, - typename tools::promote_args<T, U, V>::type - >::type type; - }; - - } - - - template <class T1, class T2, class T3> - typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi); - - template <class T1, class T2, class T3, class Policy> - typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v); - - - - template <class RT> - struct max_factorial; - template <class RT> - RT factorial(unsigned int); - template <class RT, class Policy> - RT factorial(unsigned int, const Policy& pol); - template <class RT> - RT unchecked_factorial(unsigned int ); - template <class RT> - RT double_factorial(unsigned i); - template <class RT, class Policy> - RT double_factorial(unsigned i, const Policy& pol); - - template <class RT> - typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol); - - template <class RT> - typename tools::promote_args<RT>::type rising_factorial(RT x, int n); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol); - - - template <class RT> - typename tools::promote_args<RT>::type tgamma(RT z); - - template <class RT> - typename tools::promote_args<RT>::type tgamma1pm1(RT z); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol); - - template <class RT1, class RT2> - typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z); - - template <class RT1, class RT2, class Policy> - typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol); - - template <class RT> - typename tools::promote_args<RT>::type lgamma(RT z, int* sign); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol); - - template <class RT> - typename tools::promote_args<RT>::type lgamma(RT x); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol); - - template <class RT1, class RT2> - typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z); - - template <class RT1, class RT2, class Policy> - typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&); - - template <class RT1, class RT2> - typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z); - - template <class RT1, class RT2, class Policy> - typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&); - - template <class RT1, class RT2> - typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z); - - template <class RT1, class RT2, class Policy> - typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&); - - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type digamma(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type digamma(T x, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type trigamma(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type trigamma(T x, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type polygamma(int n, T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type polygamma(int n, T x, const Policy&); - - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type - hypot(T1 x, T2 y); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type - hypot(T1 x, T2 y, const Policy&); - - - template <class RT> - typename tools::promote_args<RT>::type cbrt(RT z); - - template <class RT, class Policy> - typename tools::promote_args<RT>::type cbrt(RT z, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type log1p(T); - - template <class T, class Policy> - typename tools::promote_args<T>::type log1p(T, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type log1pmx(T); - - template <class T, class Policy> - typename tools::promote_args<T>::type log1pmx(T, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type expm1(T); - - template <class T, class Policy> - typename tools::promote_args<T>::type expm1(T, const Policy&); - - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type - powm1(const T1 a, const T2 z); - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type - powm1(const T1 a, const T2 z, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type sqrt1pm1(const T& val); - - template <class T, class Policy> - typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&); - - - template <class T> - typename tools::promote_args<T>::type sinc_pi(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type sinc_pi(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type sinhc_pi(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&); - - - template<typename T> - typename tools::promote_args<T>::type asinh(T x); - - template<typename T, class Policy> - typename tools::promote_args<T>::type asinh(T x, const Policy&); - - template<typename T> - typename tools::promote_args<T>::type acosh(T x); - - template<typename T, class Policy> - typename tools::promote_args<T>::type acosh(T x, const Policy&); - - template<typename T> - typename tools::promote_args<T>::type atanh(T x); - - template<typename T, class Policy> - typename tools::promote_args<T>::type atanh(T x, const Policy&); - - namespace detail{ - - typedef mpl::int_<0> bessel_no_int_tag; - typedef mpl::int_<1> bessel_maybe_int_tag; - typedef mpl::int_<2> bessel_int_tag; - - template <class T1, class T2, class Policy> - struct bessel_traits - { - typedef typename mpl::if_< - is_integral<T1>, - typename tools::promote_args<T2>::type, - typename tools::promote_args<T1, T2>::type - >::type result_type; - - typedef typename policies::precision<result_type, Policy>::type precision_type; - - typedef typename mpl::if_< - mpl::or_< - mpl::less_equal<precision_type, mpl::int_<0> >, - mpl::greater<precision_type, mpl::int_<64> > >, - bessel_no_int_tag, - typename mpl::if_< - is_integral<T1>, - bessel_int_tag, - bessel_maybe_int_tag - >::type - >::type optimisation_tag; - typedef typename mpl::if_< - mpl::or_< - mpl::less_equal<precision_type, mpl::int_<0> >, - mpl::greater<precision_type, mpl::int_<113> > >, - bessel_no_int_tag, - typename mpl::if_< - is_integral<T1>, - bessel_int_tag, - bessel_maybe_int_tag - >::type - >::type optimisation_tag128; - }; - } - - - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x); - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x); - - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol); - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol); - - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x); - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x); - - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x); - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x); - - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x); - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x); - - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); - template <class T1, class T2, class Policy> - typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x); - template <class T1, class T2> - typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x); - - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol); - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol); - - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x); - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x); - - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); - - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m); - - template <class T, class OutputIterator> - OutputIterator cyl_bessel_j_zero(T v, - int start_index, - unsigned number_of_zeros, - OutputIterator out_it); - - template <class T, class OutputIterator, class Policy> - OutputIterator cyl_bessel_j_zero(T v, - int start_index, - unsigned number_of_zeros, - OutputIterator out_it, - const Policy&); - - template <class T, class Policy> - typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol); - - template <class T> - typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m); - - template <class T, class OutputIterator> - OutputIterator cyl_neumann_zero(T v, - int start_index, - unsigned number_of_zeros, - OutputIterator out_it); - - template <class T, class OutputIterator, class Policy> - OutputIterator cyl_neumann_zero(T v, - int start_index, - unsigned number_of_zeros, - OutputIterator out_it, - const Policy&); - - template <class T1, class T2> - std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x); - - template <class T1, class T2, class Policy> - std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2, class Policy> - std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x); - - template <class T1, class T2, class Policy> - std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x); - - template <class T1, class T2, class Policy> - std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol); - - template <class T1, class T2> - std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x); - - template <class T, class Policy> - typename tools::promote_args<T>::type airy_ai(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type airy_ai(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type airy_bi(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type airy_bi(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type airy_ai_prime(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type airy_bi_prime(T x); - - template <class T> - T airy_ai_zero(int m); - template <class T, class Policy> - T airy_ai_zero(int m, const Policy&); - - template <class OutputIterator> - OutputIterator airy_ai_zero( - int start_index, - unsigned number_of_zeros, - OutputIterator out_it); - template <class OutputIterator, class Policy> - OutputIterator airy_ai_zero( - int start_index, - unsigned number_of_zeros, - OutputIterator out_it, - const Policy&); - - template <class T> - T airy_bi_zero(int m); - template <class T, class Policy> - T airy_bi_zero(int m, const Policy&); - - template <class OutputIterator> - OutputIterator airy_bi_zero( - int start_index, - unsigned number_of_zeros, - OutputIterator out_it); - template <class OutputIterator, class Policy> - OutputIterator airy_bi_zero( - int start_index, - unsigned number_of_zeros, - OutputIterator out_it, - const Policy&); - - template <class T, class Policy> - typename tools::promote_args<T>::type sin_pi(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type sin_pi(T x); - - template <class T, class Policy> - typename tools::promote_args<T>::type cos_pi(T x, const Policy&); - - template <class T> - typename tools::promote_args<T>::type cos_pi(T x); - - template <class T> - int fpclassify (T t); - - template <class T> - bool isfinite (T z); - - template <class T> - bool isinf (T t); - - template <class T> - bool isnan (T t); - - template <class T> - bool isnormal (T t); - - template<class T> - int signbit (T x); - - template <class T> - int sign (const T& z); - - template <class T, class U> - typename tools::promote_args_permissive<T, U>::type copysign (const T& x, const U& y); - - template <class T> - typename tools::promote_args_permissive<T>::type changesign (const T& z); - - - namespace detail{ - - template <class T, class U> - struct expint_result - { - typedef typename mpl::if_< - policies::is_policy<U>, - typename tools::promote_args<T>::type, - typename tools::promote_args<U>::type - >::type type; - }; - - } - - template <class T, class Policy> - typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&); - - template <class T, class U> - typename detail::expint_result<T, U>::type expint(T const z, U const u); - - template <class T> - typename tools::promote_args<T>::type expint(T z); - - - template <class T, class Policy> - typename tools::promote_args<T>::type zeta(T s, const Policy&); - - - template <class T1, class T2, class Policy> - typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol); - - template <class T1, class T2> - typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a); - - - template <class T, class U, class V, class Policy> - typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&); - - template <class T, class U, class V> - typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0); - - template <class U, class T, class Policy> - typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol); - - template <class U, class T> - typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta); - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol); - - template <class T, class U> - typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta); - - - template <class T> - typename tools::promote_args<T>::type zeta(T s); - - - template <int N, typename T, class Policy> - typename tools::promote_args<T>::type pow(T base, const Policy& policy); - - template <int N, typename T> - typename tools::promote_args<T>::type pow(T base); - - - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&); - template <class T, class U> - typename tools::promote_args<T, U>::type nextafter(const T&, const U&); - template <class T, class Policy> - typename tools::promote_args<T>::type float_next(const T&, const Policy&); - template <class T> - typename tools::promote_args<T>::type float_next(const T&); - template <class T, class Policy> - typename tools::promote_args<T>::type float_prior(const T&, const Policy&); - template <class T> - typename tools::promote_args<T>::type float_prior(const T&); - template <class T, class U, class Policy> - typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&); - template <class T, class U> - typename tools::promote_args<T, U>::type float_distance(const T&, const U&); - template <class T, class Policy> - typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol); - template <class T> - typename tools::promote_args<T>::type float_advance(const T& val, int distance); - - template <class T, class Policy> - typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol); - template <class T> - typename tools::promote_args<T>::type ulp(const T& val); - - template <class T, class U> - typename tools::promote_args<T, U>::type relative_difference(const T&, const U&); - template <class T, class U> - typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&); - - template<class T> - constexpr T unchecked_bernoulli_b2n(const std::size_t n); - template <class T, class Policy> - T bernoulli_b2n(const int i, const Policy &pol); - template <class T> - T bernoulli_b2n(const int i); - template <class T, class OutputIterator, class Policy> - OutputIterator bernoulli_b2n(const int start_index, - const unsigned number_of_bernoullis_b2n, - OutputIterator out_it, - const Policy& pol); - template <class T, class OutputIterator> - OutputIterator bernoulli_b2n(const int start_index, - const unsigned number_of_bernoullis_b2n, - OutputIterator out_it); - template <class T, class Policy> - T tangent_t2n(const int i, const Policy &pol); - template <class T> - T tangent_t2n(const int i); - template <class T, class OutputIterator, class Policy> - OutputIterator tangent_t2n(const int start_index, - const unsigned number_of_bernoullis_b2n, - OutputIterator out_it, - const Policy& pol); - template <class T, class OutputIterator> - OutputIterator tangent_t2n(const int start_index, - const unsigned number_of_bernoullis_b2n, - OutputIterator out_it); - - - template <class T, class Policy> - typename boost::math::tools::promote_args<T>::type lambert_w0(T z, const Policy& pol); - template <class T> - typename boost::math::tools::promote_args<T>::type lambert_w0(T z); - template <class T, class Policy> - typename boost::math::tools::promote_args<T>::type lambert_wm1(T z, const Policy& pol); - template <class T> - typename boost::math::tools::promote_args<T>::type lambert_wm1(T z); - template <class T, class Policy> - typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z, const Policy& pol); - template <class T> - typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z); - template <class T, class Policy> - typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z, const Policy& pol); - template <class T> - typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z); - - - - - } -} -# 18 "/usr/include/boost/math/special_functions/sign.hpp" 2 3 4 -# 1 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 1 3 4 -# 23 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 24 "/usr/include/boost/math/special_functions/detail/fp_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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 26 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 27 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 2 3 4 -# 1 "/usr/include/boost/predef/other/endian.h" 1 3 4 -# 12 "/usr/include/boost/predef/other/endian.h" 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 13 "/usr/include/boost/predef/other/endian.h" 2 3 4 -# 1 "/usr/include/boost/predef/library/c/gnu.h" 1 3 4 -# 12 "/usr/include/boost/predef/library/c/gnu.h" 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 13 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 - -# 1 "/usr/include/boost/predef/library/c/_prefix.h" 1 3 4 -# 11 "/usr/include/boost/predef/library/c/_prefix.h" 3 4 -# 1 "/usr/include/boost/predef/detail/_cassert.h" 1 3 4 -# 12 "/usr/include/boost/predef/detail/_cassert.h" 3 4 -# 1 "/usr/include/c++/9.2.0/cassert" 1 3 4 -# 41 "/usr/include/c++/9.2.0/cassert" 3 4 - -# 42 "/usr/include/c++/9.2.0/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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 44 "/usr/include/c++/9.2.0/cassert" 2 3 -# 13 "/usr/include/boost/predef/detail/_cassert.h" 2 3 4 -# 12 "/usr/include/boost/predef/library/c/_prefix.h" 2 3 4 -# 15 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/stddef.h" 1 3 4 -# 18 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 -# 61 "/usr/include/boost/predef/library/c/gnu.h" 3 4 - -# 14 "/usr/include/boost/predef/other/endian.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 -# 17 "/usr/include/boost/predef/os/macos.h" 3 4 -# 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 -# 13 "/usr/include/boost/predef/os/ios.h" 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 14 "/usr/include/boost/predef/os/ios.h" 2 3 4 -# 51 "/usr/include/boost/predef/os/ios.h" 3 4 - -# 18 "/usr/include/boost/predef/os/macos.h" 2 3 4 - - -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 21 "/usr/include/boost/predef/os/macos.h" 2 3 4 -# 65 "/usr/include/boost/predef/os/macos.h" 3 4 - -# 15 "/usr/include/boost/predef/other/endian.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 16 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 -# 65 "/usr/include/boost/predef/os/macos.h" 3 4 - -# 17 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 20 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 52 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 11 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 11 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 11 "/usr/include/boost/predef/os/bsd/free.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 11 "/usr/include/boost/predef/os/bsd/open.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 11 "/usr/include/boost/predef/os/bsd/net.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 12 "/usr/include/boost/predef/os/bsd/net.h" 2 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 12 "/usr/include/boost/predef/os/bsd/open.h" 2 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 12 "/usr/include/boost/predef/os/bsd/free.h" 2 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 12 "/usr/include/boost/predef/os/bsd/dragonfly.h" 2 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 12 "/usr/include/boost/predef/os/bsd/bsdi.h" 2 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 53 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 54 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 55 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 56 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 57 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 94 "/usr/include/boost/predef/os/bsd.h" 3 4 -# 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 -# 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 - -# 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 -# 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 - -# 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 -# 67 "/usr/include/boost/predef/os/bsd/free.h" 3 4 - -# 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 -# 251 "/usr/include/boost/predef/os/bsd/open.h" 3 4 - -# 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 -# 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 - -# 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 - - - -# 16 "/usr/include/boost/predef/other/endian.h" 2 3 4 -# 1 "/usr/include/boost/predef/os/android.h" 1 3 4 -# 12 "/usr/include/boost/predef/os/android.h" 3 4 -# 1 "/usr/include/boost/predef/make.h" 1 3 4 -# 13 "/usr/include/boost/predef/os/android.h" 2 3 4 -# 48 "/usr/include/boost/predef/os/android.h" 3 4 - -# 17 "/usr/include/boost/predef/other/endian.h" 2 3 4 -# 194 "/usr/include/boost/predef/other/endian.h" 3 4 - - - - - - - - - - -# 28 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 2 3 4 -# 81 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -namespace boost { -namespace math { -namespace detail { -# 92 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -struct native_tag {}; -template <bool has_limits> -struct generic_tag {}; -struct ieee_tag {}; -struct ieee_copy_all_bits_tag : public ieee_tag {}; -struct ieee_copy_leading_bits_tag : public ieee_tag {}; -# 125 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -struct unknown_precision{}; -struct single_precision {}; -struct double_precision {}; -struct extended_double_precision {}; - - - -template<class T> struct fp_traits_native -{ - typedef native_tag method; -}; - - - -template<class T, class U> struct fp_traits_non_native -{ - - typedef generic_tag<std::numeric_limits<T>::is_specialized> method; - - - -}; -# 177 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<> struct fp_traits_non_native<float, single_precision> -{ - typedef ieee_copy_all_bits_tag method; - - static const uint32_t sign = 0x80000000u; - static const uint32_t exponent = 0x7f800000; - static const uint32_t flag = 0x00000000; - static const uint32_t significand = 0x007fffff; - - typedef uint32_t bits; - static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } - static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } -}; -# 232 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<> struct fp_traits_non_native<double, double_precision> -{ - typedef ieee_copy_all_bits_tag method; - - static const uint64_t sign = ((uint64_t)0x80000000u) << 32; - static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; - static const uint64_t flag = 0; - static const uint64_t significand - = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); - - typedef uint64_t bits; - static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } - static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } -}; -# 292 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<> struct fp_traits_non_native<long double, double_precision> -{ - typedef ieee_copy_all_bits_tag method; - - static const uint64_t sign = (uint64_t)0x80000000u << 32; - static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; - static const uint64_t flag = 0; - static const uint64_t significand - = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; - - typedef uint64_t bits; - static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } - static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } -}; -# 318 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<> -struct fp_traits_non_native<long double, extended_double_precision> -{ - typedef ieee_copy_leading_bits_tag method; - - static const uint32_t sign = 0x80000000u; - static const uint32_t exponent = 0x7fff0000; - static const uint32_t flag = 0x00008000; - static const uint32_t significand = 0x00007fff; - - typedef uint32_t bits; - - static void get_bits(long double x, uint32_t& a) - { - std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4); - } - - static void set_bits(long double& x, uint32_t a) - { - std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4); - } -}; -# 490 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<int n, bool fp> struct size_to_precision -{ - typedef unknown_precision type; -}; - -template<> struct size_to_precision<4, true> -{ - typedef single_precision type; -}; - -template<> struct size_to_precision<8, true> -{ - typedef double_precision type; -}; - -template<> struct size_to_precision<10, true> -{ - typedef extended_double_precision type; -}; - -template<> struct size_to_precision<12, true> -{ - typedef extended_double_precision type; -}; - -template<> struct size_to_precision<16, true> -{ - typedef extended_double_precision type; -}; - - - - - - -template <class T> -struct select_native -{ - typedef typename size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision; - typedef fp_traits_non_native<T, precision> type; -}; -template<> -struct select_native<float> -{ - typedef fp_traits_native<float> type; -}; -template<> -struct select_native<double> -{ - typedef fp_traits_native<double> type; -}; -template<> -struct select_native<long double> -{ - typedef fp_traits_native<long double> type; -}; -# 564 "/usr/include/boost/math/special_functions/detail/fp_traits.hpp" 3 4 -template<class T> struct fp_traits -{ - typedef typename size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision; - - typedef typename select_native<T>::type type; - - - - typedef fp_traits_non_native<T, precision> sign_change_type; -}; - - - -} -} -} -# 19 "/usr/include/boost/math/special_functions/sign.hpp" 2 3 4 - -namespace boost{ namespace math{ - -namespace detail { - - - - - template<class T> - inline int signbit_impl(T x, native_tag const&) - { - return (std::signbit)(x) ? 1 : 0; - } - - - - - - template<class T> - inline int signbit_impl(T x, generic_tag<true> const&) - { - return x < 0; - } - - template<class T> - inline int signbit_impl(T x, generic_tag<false> const&) - { - return x < 0; - } -# 67 "/usr/include/boost/math/special_functions/sign.hpp" 3 4 - template<class T> - inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - return a & traits::sign ? 1 : 0; - } - - template<class T> - inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - - return a & traits::sign ? 1 : 0; - } - - - - - - - template<class T> - inline T (changesign_impl)(T x, generic_tag<true> const&) - { - return -x; - } - - template<class T> - inline T (changesign_impl)(T x, generic_tag<false> const&) - { - return -x; - } -# 126 "/usr/include/boost/math/special_functions/sign.hpp" 3 4 - template<class T> - inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) - { - typedef typename fp_traits<T>::sign_change_type traits; - - typename traits::bits a; - traits::get_bits(x,a); - a ^= traits::sign; - traits::set_bits(x,a); - return x; - } - - template<class T> - inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&) - { - typedef typename fp_traits<T>::sign_change_type traits; - - typename traits::bits a; - traits::get_bits(x,a); - a ^= traits::sign; - traits::set_bits(x,a); - return x; - } - - -} - -template<class T> int (signbit)(T x) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - - typedef typename tools::promote_args_permissive<T>::type result_type; - return detail::signbit_impl(static_cast<result_type>(x), method()); -} - -template <class T> -inline int sign (const T& z) -{ - return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; -} - -template <class T> typename tools::promote_args_permissive<T>::type (changesign)(const T& x) -{ - typedef typename detail::fp_traits<T>::sign_change_type traits; - typedef typename traits::method method; - - typedef typename tools::promote_args_permissive<T>::type result_type; - - return detail::changesign_impl(static_cast<result_type>(x), method()); -} - -template <class T, class U> -inline typename tools::promote_args_permissive<T, U>::type - copysign (const T& x, const U& y) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - typedef typename tools::promote_args_permissive<T, U>::type result_type; - return (boost::math::signbit)(static_cast<result_type>(x)) != (boost::math::signbit)(static_cast<result_type>(y)) - ? (boost::math::changesign)(static_cast<result_type>(x)) : static_cast<result_type>(x); -} - -} -} -# 35 "/usr/include/boost/lexical_cast/detail/inf_nan.hpp" 2 3 4 -# 1 "/usr/include/boost/math/special_functions/fpclassify.hpp" 1 3 4 -# 14 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/math.h" 1 3 4 -# 15 "/usr/include/boost/math/special_functions/fpclassify.hpp" 2 3 4 - - -# 1 "/usr/include/boost/math/tools/real_cast.hpp" 1 3 4 -# 15 "/usr/include/boost/math/tools/real_cast.hpp" 3 4 -namespace boost{ namespace math -{ - namespace tools - { - template <class To, class T> - inline constexpr To real_cast(T t) noexcept(((std::is_floating_point<T>::value) && (std::is_floating_point<To>::value))) - { - return static_cast<To>(t); - } - } -} -} -# 18 "/usr/include/boost/math/special_functions/fpclassify.hpp" 2 3 4 -# 86 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/quadmath.h" 1 3 4 -# 24 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/quadmath.h" 3 4 -# 1 "/usr/include/c++/9.2.0/stdlib.h" 1 3 4 -# 25 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/quadmath.h" 2 3 4 - - -extern "C" { - - - - - -typedef _Complex float __attribute__((mode(TC))) __complex128; -# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/quadmath.h" 3 4 -extern __float128 acosq (__float128) throw (); -extern __float128 acoshq (__float128) throw (); -extern __float128 asinq (__float128) throw (); -extern __float128 asinhq (__float128) throw (); -extern __float128 atanq (__float128) throw (); -extern __float128 atanhq (__float128) throw (); -extern __float128 atan2q (__float128, __float128) throw (); -extern __float128 cbrtq (__float128) throw (); -extern __float128 ceilq (__float128) throw (); -extern __float128 copysignq (__float128, __float128) throw (); -extern __float128 coshq (__float128) throw (); -extern __float128 cosq (__float128) throw (); -extern __float128 erfq (__float128) throw (); -extern __float128 erfcq (__float128) throw (); -extern __float128 exp2q (__float128) throw (); -extern __float128 expq (__float128) throw (); -extern __float128 expm1q (__float128) throw (); -extern __float128 fabsq (__float128) throw (); -extern __float128 fdimq (__float128, __float128) throw (); -extern int finiteq (__float128) throw (); -extern __float128 floorq (__float128) throw (); -extern __float128 fmaq (__float128, __float128, __float128) throw (); -extern __float128 fmaxq (__float128, __float128) throw (); -extern __float128 fminq (__float128, __float128) throw (); -extern __float128 fmodq (__float128, __float128) throw (); -extern __float128 frexpq (__float128, int *) throw (); -extern __float128 hypotq (__float128, __float128) throw (); -extern int isinfq (__float128) throw (); -extern int ilogbq (__float128) throw (); -extern int isnanq (__float128) throw (); -extern int issignalingq (__float128) throw (); -extern __float128 j0q (__float128) throw (); -extern __float128 j1q (__float128) throw (); -extern __float128 jnq (int, __float128) throw (); -extern __float128 ldexpq (__float128, int) throw (); -extern __float128 lgammaq (__float128) throw (); -extern long long int llrintq (__float128) throw (); -extern long long int llroundq (__float128) throw (); -extern __float128 logbq (__float128) throw (); -extern __float128 logq (__float128) throw (); -extern __float128 log10q (__float128) throw (); -extern __float128 log2q (__float128) throw (); -extern __float128 log1pq (__float128) throw (); -extern long int lrintq (__float128) throw (); -extern long int lroundq (__float128) throw (); -extern __float128 modfq (__float128, __float128 *) throw (); -extern __float128 nanq (const char *) throw (); -extern __float128 nearbyintq (__float128) throw (); -extern __float128 nextafterq (__float128, __float128) throw (); -extern __float128 powq (__float128, __float128) throw (); -extern __float128 remainderq (__float128, __float128) throw (); -extern __float128 remquoq (__float128, __float128, int *) throw (); -extern __float128 rintq (__float128) throw (); -extern __float128 roundq (__float128) throw (); -extern __float128 scalblnq (__float128, long int) throw (); -extern __float128 scalbnq (__float128, int) throw (); -extern int signbitq (__float128) throw (); -extern void sincosq (__float128, __float128 *, __float128 *) throw (); -extern __float128 sinhq (__float128) throw (); -extern __float128 sinq (__float128) throw (); -extern __float128 sqrtq (__float128) throw (); -extern __float128 tanq (__float128) throw (); -extern __float128 tanhq (__float128) throw (); -extern __float128 tgammaq (__float128) throw (); -extern __float128 truncq (__float128) throw (); -extern __float128 y0q (__float128) throw (); -extern __float128 y1q (__float128) throw (); -extern __float128 ynq (int, __float128) throw (); - - - -extern __float128 cabsq (__complex128) throw (); -extern __float128 cargq (__complex128) throw (); -extern __float128 cimagq (__complex128) throw (); -extern __float128 crealq (__complex128) throw (); -extern __complex128 cacosq (__complex128) throw (); -extern __complex128 cacoshq (__complex128) throw (); -extern __complex128 casinq (__complex128) throw (); -extern __complex128 casinhq (__complex128) throw (); -extern __complex128 catanq (__complex128) throw (); -extern __complex128 catanhq (__complex128) throw (); -extern __complex128 ccosq (__complex128) throw (); -extern __complex128 ccoshq (__complex128) throw (); -extern __complex128 cexpq (__complex128) throw (); -extern __complex128 cexpiq (__float128) throw (); -extern __complex128 clogq (__complex128) throw (); -extern __complex128 clog10q (__complex128) throw (); -extern __complex128 conjq (__complex128) throw (); -extern __complex128 cpowq (__complex128, __complex128) throw (); -extern __complex128 cprojq (__complex128) throw (); -extern __complex128 csinq (__complex128) throw (); -extern __complex128 csinhq (__complex128) throw (); -extern __complex128 csqrtq (__complex128) throw (); -extern __complex128 ctanq (__complex128) throw (); -extern __complex128 ctanhq (__complex128) throw (); - - - -extern __float128 strtoflt128 (const char *, char **) throw (); -extern int quadmath_snprintf (char *str, size_t size, - const char *format, ...) throw (); -# 185 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/quadmath.h" 3 4 -extern inline __attribute__ ((__gnu_inline__)) __float128 -cimagq (__complex128 __z) throw () -{ - return __imag__ __z; -} - -extern inline __attribute__ ((__gnu_inline__)) __float128 -crealq (__complex128 __z) throw () -{ - return __real__ __z; -} - -extern inline __attribute__ ((__gnu_inline__)) __complex128 -conjq (__complex128 __z) throw () -{ - return __extension__ ~__z; -} - - -} -# 87 "/usr/include/boost/math/special_functions/fpclassify.hpp" 2 3 4 -# 96 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -namespace boost{ - - - - - - -namespace math_detail{ - - - - - - -template <class T> -inline bool is_nan_helper(T t, const boost::true_type&) -{ - - - - - - - return (::std:: fpclassify(t) == (int)0); - -} - - - - - -template <class T> -inline bool is_nan_helper(T, const boost::false_type&) -{ - return false; -} - - -inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); } -inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); } -# 145 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -} - -namespace math{ - -namespace detail{ - - -template <class T> -inline int fpclassify_imp (T t, const native_tag&) -{ - return (std::fpclassify)(t); -} - - -template <class T> -inline int fpclassify_imp (T t, const generic_tag<true>&) -{ - ; - - - - if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>())) - return 0; -# 176 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 - T at = (t < T(0)) ? -t : t; - - - - - - - - if(at <= (std::numeric_limits<T>::max)()) - { - if(at >= (std::numeric_limits<T>::min)()) - return 4; - return (at != 0) ? 3 : 2; - } - else if(at > (std::numeric_limits<T>::max)()) - return 1; - return 0; -} - -template <class T> -inline int fpclassify_imp (T t, const generic_tag<false>&) -{ -# 206 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 - ; - - return t == 0 ? 2 : 4; -} - -template<class T> -int fpclassify_imp (T x, ieee_copy_all_bits_tag) -{ - typedef typename fp_traits<T>::type traits; - - ; - - typename traits::bits a; - traits::get_bits(x,a); - ; - a &= traits::exponent | traits::flag | traits::significand; - ; - ; - - if(a <= traits::significand) { - if(a == 0) - return 2; - else - return 3; - } - - if(a < traits::exponent) return 4; - - a &= traits::significand; - if(a == 0) return 1; - - return 0; -} - -template<class T> -int fpclassify_imp (T x, ieee_copy_leading_bits_tag) -{ - typedef typename fp_traits<T>::type traits; - - ; - - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::flag | traits::significand; - - if(a <= traits::significand) { - if(x == 0) - return 2; - else - return 3; - } - - if(a < traits::exponent) return 4; - - a &= traits::significand; - traits::set_bits(x,a); - if(x == 0) return 1; - - return 0; -} -# 274 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -} - -template <class T> -inline int fpclassify (T t) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - typedef typename tools::promote_args_permissive<T>::type value_type; - - - - - - return detail::fpclassify_imp(static_cast<value_type>(t), method()); - -} -# 308 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -namespace detail { - - - template<class T> - inline bool isfinite_impl(T x, native_tag const&) - { - return (std::isfinite)(x); - } - - - template<class T> - inline bool isfinite_impl(T x, generic_tag<true> const&) - { - return x >= -(std::numeric_limits<T>::max)() - && x <= (std::numeric_limits<T>::max)(); - } - - template<class T> - inline bool isfinite_impl(T x, generic_tag<false> const&) - { - - - - - (void)x; - return true; - } - - template<class T> - inline bool isfinite_impl(T x, ieee_tag const&) - { - typedef typename detail::fp_traits<T>::type traits; - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent; - return a != traits::exponent; - } -# 353 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -} - -template<class T> -inline bool (isfinite)(T x) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - - typedef typename tools::promote_args_permissive<T>::type value_type; - return detail::isfinite_impl(static_cast<value_type>(x), method()); -} -# 379 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -namespace detail { - - - template<class T> - inline bool isnormal_impl(T x, native_tag const&) - { - return (std::isnormal)(x); - } - - - template<class T> - inline bool isnormal_impl(T x, generic_tag<true> const&) - { - if(x < 0) x = -x; - return x >= (std::numeric_limits<T>::min)() - && x <= (std::numeric_limits<T>::max)(); - } - - template<class T> - inline bool isnormal_impl(T x, generic_tag<false> const&) - { - - - - - return !(x == 0); - } - - template<class T> - inline bool isnormal_impl(T x, ieee_tag const&) - { - typedef typename detail::fp_traits<T>::type traits; - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::flag; - return (a != 0) && (a < traits::exponent); - } -# 424 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -} - -template<class T> -inline bool (isnormal)(T x) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - - typedef typename tools::promote_args_permissive<T>::type value_type; - return detail::isnormal_impl(static_cast<value_type>(x), method()); -} -# 450 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -namespace detail { - - - template<class T> - inline bool isinf_impl(T x, native_tag const&) - { - return (std::isinf)(x); - } - - - template<class T> - inline bool isinf_impl(T x, generic_tag<true> const&) - { - (void)x; - return std::numeric_limits<T>::has_infinity - && ( x == std::numeric_limits<T>::infinity() - || x == -std::numeric_limits<T>::infinity()); - } - - template<class T> - inline bool isinf_impl(T x, generic_tag<false> const&) - { - - - - - (void)x; - return false; - } - - template<class T> - inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::significand; - return a == traits::exponent; - } - - template<class T> - inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::significand; - if(a != traits::exponent) - return false; - - traits::set_bits(x,0); - return x == 0; - } -# 513 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -} - -template<class T> -inline bool (isinf)(T x) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - - typedef typename tools::promote_args_permissive<T>::type value_type; - return detail::isinf_impl(static_cast<value_type>(x), method()); -} -# 537 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -template<> -inline bool (isinf)(__float128 x) -{ - return ::isinfq(x); -} - - - - -namespace detail { - - - template<class T> - inline bool isnan_impl(T x, native_tag const&) - { - return (std::isnan)(x); - } - - - template<class T> - inline bool isnan_impl(T x, generic_tag<true> const&) - { - return std::numeric_limits<T>::has_infinity - ? !(x <= std::numeric_limits<T>::infinity()) - : x != x; - } - - template<class T> - inline bool isnan_impl(T x, generic_tag<false> const&) - { - - - - - (void)x; - return false; - } - - template<class T> - inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::significand; - return a > traits::exponent; - } - - template<class T> - inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) - { - typedef typename fp_traits<T>::type traits; - - typename traits::bits a; - traits::get_bits(x,a); - - a &= traits::exponent | traits::significand; - if(a < traits::exponent) - return false; - - a &= traits::significand; - traits::set_bits(x,a); - return x != 0; - } - -} - -template<class T> -inline bool (isnan)(T x) -{ - typedef typename detail::fp_traits<T>::type traits; - typedef typename traits::method method; - - return detail::isnan_impl(x, method()); -} -# 629 "/usr/include/boost/math/special_functions/fpclassify.hpp" 3 4 -template<> -inline bool (isnan)(__float128 x) -{ - return ::isnanq(x); -} - - -} -} -# 36 "/usr/include/boost/lexical_cast/detail/inf_nan.hpp" 2 3 4 - - - -namespace boost { - namespace detail - { - template <class CharT> - bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) noexcept { - for( unsigned int i=0; i < len; ++i ) { - if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false; - } - - return true; - } - - - template <class CharT, class T> - inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value - , const CharT* lc_NAN, const CharT* lc_nan - , const CharT* lc_INFINITY, const CharT* lc_infinity - , const CharT opening_brace, const CharT closing_brace) noexcept - { - using namespace std; - if (begin == end) return false; - const CharT minus = lcast_char_constants<CharT>::minus; - const CharT plus = lcast_char_constants<CharT>::plus; - const int inifinity_size = 8; - - - bool const has_minus = (*begin == minus); - if (has_minus || *begin == plus) { - ++ begin; - } - - if (end - begin < 3) return false; - if (lc_iequal(begin, lc_nan, lc_NAN, 3)) { - begin += 3; - if (end != begin) { - - - if (end - begin < 2) return false; - -- end; - if (*begin != opening_brace || *end != closing_brace) return false; - } - - if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN(); - else value = (boost::math::changesign) (std::numeric_limits<T>::quiet_NaN()); - return true; - } else if ( - ( - end - begin == 3 - && lc_iequal(begin, lc_infinity, lc_INFINITY, 3) - ) - || - ( - end - begin == inifinity_size - && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size) - ) - ) - { - if( !has_minus ) value = std::numeric_limits<T>::infinity(); - else value = (boost::math::changesign) (std::numeric_limits<T>::infinity()); - return true; - } - - return false; - } - - template <class CharT, class T> - bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value - , const CharT* lc_nan - , const CharT* lc_infinity) noexcept - { - using namespace std; - const CharT minus = lcast_char_constants<CharT>::minus; - if ((boost::math::isnan)(value)) { - if ((boost::math::signbit)(value)) { - *begin = minus; - ++ begin; - } - - memcpy(begin, lc_nan, 3 * sizeof(CharT)); - end = begin + 3; - return true; - } else if ((boost::math::isinf)(value)) { - if ((boost::math::signbit)(value)) { - *begin = minus; - ++ begin; - } - - memcpy(begin, lc_infinity, 3 * sizeof(CharT)); - end = begin + 3; - return true; - } - - return false; - } - - - - template <class T> - bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) noexcept { - return parse_inf_nan_impl(begin, end, value - , L"NAN", L"nan" - , L"INFINITY", L"infinity" - , L'(', L')'); - } - - template <class T> - bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) noexcept { - return put_inf_nan_impl(begin, end, value, L"nan", L"infinity"); - } - - - - template <class T> - bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) noexcept { - return parse_inf_nan_impl(begin, end, value - , u"NAN", u"nan" - , u"INFINITY", u"infinity" - , u'(', u')'); - } - - template <class T> - bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) noexcept { - return put_inf_nan_impl(begin, end, value, u"nan", u"infinity"); - } - - - template <class T> - bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) noexcept { - return parse_inf_nan_impl(begin, end, value - , U"NAN", U"nan" - , U"INFINITY", U"infinity" - , U'(', U')'); - } - - template <class T> - bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) noexcept { - return put_inf_nan_impl(begin, end, value, U"nan", U"infinity"); - } - - - template <class CharT, class T> - bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) noexcept { - return parse_inf_nan_impl(begin, end, value - , "NAN", "nan" - , "INFINITY", "infinity" - , '(', ')'); - } - - template <class CharT, class T> - bool put_inf_nan(CharT* begin, CharT*& end, const T& value) noexcept { - return put_inf_nan_impl(begin, end, value, "nan", "infinity"); - } - } -} -# 64 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 77 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 -# 1 "/usr/include/boost/integer.hpp" 1 3 4 -# 18 "/usr/include/boost/integer.hpp" 3 4 -# 1 "/usr/include/boost/integer_fwd.hpp" 1 3 4 -# 12 "/usr/include/boost/integer_fwd.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/climits" 2 3 -# 13 "/usr/include/boost/integer_fwd.hpp" 2 3 4 - - - - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 18 "/usr/include/boost/integer_fwd.hpp" 2 3 4 - - -namespace boost -{ - - - - - - - - typedef boost::uintmax_t static_min_max_unsigned_type; - typedef boost::intmax_t static_min_max_signed_type; - typedef boost::uintmax_t static_log2_argument_type; - typedef int static_log2_result_type; -# 42 "/usr/include/boost/integer_fwd.hpp" 3 4 -template < class T > - class integer_traits; - -template < > - class integer_traits< bool >; - -template < > - class integer_traits< char >; - -template < > - class integer_traits< signed char >; - -template < > - class integer_traits< unsigned char >; - - -template < > - class integer_traits< wchar_t >; - - -template < > - class integer_traits< short >; - -template < > - class integer_traits< unsigned short >; - -template < > - class integer_traits< int >; - -template < > - class integer_traits< unsigned int >; - -template < > - class integer_traits< long >; - -template < > - class integer_traits< unsigned long >; - - -template < > -class integer_traits< ::boost::long_long_type>; - -template < > -class integer_traits< ::boost::ulong_long_type >; -# 97 "/usr/include/boost/integer_fwd.hpp" 3 4 -template < typename LeastInt > - struct int_fast_t; - -template< int Bits > - struct int_t; - -template< int Bits > - struct uint_t; - - - template< boost::long_long_type MaxValue > - - - - struct int_max_value_t; - - - template< boost::long_long_type MinValue > - - - - struct int_min_value_t; - - - template< boost::ulong_long_type MaxValue > - - - - struct uint_value_t; - - - - -template < std::size_t Bit > - struct high_bit_mask_t; - -template < std::size_t Bits > - struct low_bits_mask_t; - -template < > - struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >; - - - -template <static_log2_argument_type Value > - struct static_log2; - -template <> struct static_log2<0u>; - - - - -template <static_min_max_signed_type Value1, static_min_max_signed_type Value2> - struct static_signed_min; - -template <static_min_max_signed_type Value1, static_min_max_signed_type Value2> - struct static_signed_max; - -template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2> - struct static_unsigned_min; - -template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2> - struct static_unsigned_max; - - -namespace integer -{ - - - - - - typedef boost::uintmax_t static_gcd_type; - - -template < static_gcd_type Value1, static_gcd_type Value2 > - struct static_gcd; -template < static_gcd_type Value1, static_gcd_type Value2 > - struct static_lcm; - - - - -template < typename IntegerType > - class gcd_evaluator; -template < typename IntegerType > - class lcm_evaluator; - -} - -} -# 19 "/usr/include/boost/integer.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 23 "/usr/include/boost/integer.hpp" 2 3 4 -# 34 "/usr/include/boost/integer.hpp" 3 4 - -# 35 "/usr/include/boost/integer.hpp" 3 - - -namespace boost -{ - - - - - - template< typename LeastInt > - struct int_fast_t - { - typedef LeastInt fast; - typedef fast type; - }; - - namespace detail{ - - - template< int Category > struct int_least_helper {}; - template< int Category > struct uint_least_helper {}; - - - - - - template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; - - - - template<> struct int_least_helper<2> { typedef long least; }; - template<> struct int_least_helper<3> { typedef int least; }; - template<> struct int_least_helper<4> { typedef short least; }; - template<> struct int_least_helper<5> { typedef signed char least; }; - - template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; - - - - template<> struct uint_least_helper<2> { typedef unsigned long least; }; - template<> struct uint_least_helper<3> { typedef unsigned int least; }; - template<> struct uint_least_helper<4> { typedef unsigned short least; }; - template<> struct uint_least_helper<5> { typedef unsigned char least; }; - - template <int Bits> - struct exact_signed_base_helper{}; - template <int Bits> - struct exact_unsigned_base_helper{}; - - template <> struct exact_signed_base_helper<sizeof(signed char)* 8> { typedef signed char exact; }; - template <> struct exact_unsigned_base_helper<sizeof(unsigned char)* 8> { typedef unsigned char exact; }; - - template <> struct exact_signed_base_helper<sizeof(short)* 8> { typedef short exact; }; - template <> struct exact_unsigned_base_helper<sizeof(unsigned short)* 8> { typedef unsigned short exact; }; - - - template <> struct exact_signed_base_helper<sizeof(int)* 8> { typedef int exact; }; - template <> struct exact_unsigned_base_helper<sizeof(unsigned int)* 8> { typedef unsigned int exact; }; - - - - template <> struct exact_signed_base_helper<sizeof(long)* 8> { typedef long exact; }; - template <> struct exact_unsigned_base_helper<sizeof(unsigned long)* 8> { typedef unsigned long exact; }; -# 109 "/usr/include/boost/integer.hpp" 3 - } - - - - - template< int Bits > - struct int_t : public boost::detail::exact_signed_base_helper<Bits> - { - static_assert(Bits <= (int)(sizeof(boost::intmax_t) * 8), "No suitable signed integer type with the requested number of bits is available.") - ; - typedef typename boost::detail::int_least_helper - < - - (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + - - - - (Bits-1 <= ::std::numeric_limits<long>::digits) + - (Bits-1 <= ::std::numeric_limits<int>::digits) + - (Bits-1 <= ::std::numeric_limits<short>::digits) + - (Bits-1 <= ::std::numeric_limits<signed char>::digits) - >::least least; - typedef typename int_fast_t<least>::type fast; - }; - - - template< int Bits > - struct uint_t : public boost::detail::exact_unsigned_base_helper<Bits> - { - static_assert(Bits <= (int)(sizeof(boost::uintmax_t) * 8), "No suitable unsigned integer type with the requested number of bits is available.") - ; -# 150 "/usr/include/boost/integer.hpp" 3 - typedef typename boost::detail::uint_least_helper - < - - (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + - - - - (Bits <= ::std::numeric_limits<unsigned long>::digits) + - (Bits <= ::std::numeric_limits<unsigned int>::digits) + - (Bits <= ::std::numeric_limits<unsigned short>::digits) + - (Bits <= ::std::numeric_limits<unsigned char>::digits) - >::least least; - - typedef typename int_fast_t<least>::type fast; - - }; - - - - - - template< boost::long_long_type MaxValue > - - - - struct int_max_value_t - { - typedef typename boost::detail::int_least_helper - < - - (MaxValue <= ::boost::integer_traits<boost::long_long_type>::const_max) + - - - - (MaxValue <= ::boost::integer_traits<long>::const_max) + - (MaxValue <= ::boost::integer_traits<int>::const_max) + - (MaxValue <= ::boost::integer_traits<short>::const_max) + - (MaxValue <= ::boost::integer_traits<signed char>::const_max) - >::least least; - typedef typename int_fast_t<least>::type fast; - }; - - - template< boost::long_long_type MinValue > - - - - struct int_min_value_t - { - typedef typename boost::detail::int_least_helper - < - - (MinValue >= ::boost::integer_traits<boost::long_long_type>::const_min) + - - - - (MinValue >= ::boost::integer_traits<long>::const_min) + - (MinValue >= ::boost::integer_traits<int>::const_min) + - (MinValue >= ::boost::integer_traits<short>::const_min) + - (MinValue >= ::boost::integer_traits<signed char>::const_min) - >::least least; - typedef typename int_fast_t<least>::type fast; - }; - - - - template< boost::ulong_long_type MaxValue > - - - - struct uint_value_t - { -# 243 "/usr/include/boost/integer.hpp" 3 - typedef typename boost::detail::uint_least_helper - < - - (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) + - - - - (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) + - (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) + - (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) + - (MaxValue <= ::boost::integer_traits<unsigned char>::const_max) - >::least least; - - typedef typename int_fast_t<least>::type fast; - }; - - -} -# 78 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 -# 1 "/usr/include/boost/detail/basic_pointerbuf.hpp" 1 3 4 -# 24 "/usr/include/boost/detail/basic_pointerbuf.hpp" 3 4 -namespace boost { namespace detail { - - - - - -template <class charT, class BufferT > -class basic_pointerbuf : public BufferT { -protected: - typedef BufferT base_type; - typedef basic_pointerbuf<charT, BufferT> this_type; - typedef typename base_type::int_type int_type; - typedef typename base_type::char_type char_type; - typedef typename base_type::pos_type pos_type; - typedef ::std::streamsize streamsize; - typedef typename base_type::off_type off_type; - -public: - basic_pointerbuf() : base_type() { this_type::setbuf(0, 0); } - const charT* getnext() { return this->gptr(); } - - - using base_type::pptr; - using base_type::pbase; - - - - - -protected: - - - - - inline base_type* setbuf(char_type* s, streamsize n); - inline typename this_type::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); - inline typename this_type::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); - -private: - basic_pointerbuf& operator=(const basic_pointerbuf&); - basic_pointerbuf(const basic_pointerbuf&); -}; - -template<class charT, class BufferT> -BufferT* -basic_pointerbuf<charT, BufferT>::setbuf(char_type* s, streamsize n) -{ - this->setg(s, s, s + n); - return this; -} - -template<class charT, class BufferT> -typename basic_pointerbuf<charT, BufferT>::pos_type -basic_pointerbuf<charT, BufferT>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) -{ - typedef typename boost::int_t<sizeof(way) * 8>::least cast_type; - - if(which & ::std::ios_base::out) - return pos_type(off_type(-1)); - std::ptrdiff_t size = this->egptr() - this->eback(); - std::ptrdiff_t pos = this->gptr() - this->eback(); - charT* g = this->eback(); - switch(static_cast<cast_type>(way)) - { - case ::std::ios_base::beg: - if((off < 0) || (off > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + off, g + size); - break; - case ::std::ios_base::end: - if((off < 0) || (off > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + size - off, g + size); - break; - case ::std::ios_base::cur: - { - std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off); - if((newpos < 0) || (newpos > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + newpos, g + size); - break; - } - default: ; - } - - - - - return static_cast<pos_type>(this->gptr() - this->eback()); - - - -} - -template<class charT, class BufferT> -typename basic_pointerbuf<charT, BufferT>::pos_type -basic_pointerbuf<charT, BufferT>::seekpos(pos_type sp, ::std::ios_base::openmode which) -{ - if(which & ::std::ios_base::out) - return pos_type(off_type(-1)); - off_type size = static_cast<off_type>(this->egptr() - this->eback()); - charT* g = this->eback(); - if(off_type(sp) <= size) - { - this->setg(g, g + off_type(sp), g + size); - } - return pos_type(off_type(-1)); -} - -}} -# 79 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 - - -# 1 "/usr/include/c++/9.2.0/cwchar" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cwchar" 3 4 - -# 40 "/usr/include/c++/9.2.0/cwchar" 3 -# 82 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 2 3 4 - - -namespace boost { - - namespace detail - { - - - template <class BufferType, class CharT> - class basic_unlockedbuf : public basic_pointerbuf<CharT, BufferType> { - public: - typedef basic_pointerbuf<CharT, BufferType> base_type; - typedef typename base_type::streamsize streamsize; - - - using base_type::pptr; - using base_type::pbase; - using base_type::setbuf; - - - - - - }; - } - - namespace detail - { - struct do_not_construct_out_buffer_t{}; - struct do_not_construct_out_stream_t{ - do_not_construct_out_stream_t(do_not_construct_out_buffer_t*){} - }; - - template <class CharT, class Traits> - struct out_stream_helper_trait { -# 125 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 - typedef std::basic_ostream<CharT, Traits> out_stream_t; - typedef basic_unlockedbuf<std::basic_stringbuf<CharT, Traits>, CharT> stringbuffer_t; - typedef basic_unlockedbuf<std::basic_streambuf<CharT, Traits>, CharT> buffer_t; - - }; - } - - namespace detail - { - template< class CharT - , class Traits - , bool RequiresStringbuffer - , std::size_t CharacterBufferSize - > - class lexical_istream_limited_src: boost::noncopyable { - typedef typename boost::conditional< - RequiresStringbuffer, - typename out_stream_helper_trait<CharT, Traits>::out_stream_t, - do_not_construct_out_stream_t - >::type deduced_out_stream_t; - - typedef typename boost::conditional< - RequiresStringbuffer, - typename out_stream_helper_trait<CharT, Traits>::stringbuffer_t, - do_not_construct_out_buffer_t - >::type deduced_out_buffer_t; - - deduced_out_buffer_t out_buffer; - deduced_out_stream_t out_stream; - CharT buffer[CharacterBufferSize]; - - - - const CharT* start; - const CharT* finish; - - public: - lexical_istream_limited_src() noexcept - : out_buffer() - , out_stream(&out_buffer) - , start(buffer) - , finish(buffer + CharacterBufferSize) - {} - - const CharT* cbegin() const noexcept { - return start; - } - - const CharT* cend() const noexcept { - return finish; - } - - private: - - bool shl_char(CharT ch) noexcept { - Traits::assign(buffer[0], ch); - finish = start + 1; - return true; - } - - - template <class T> - bool shl_char(T ch) { - static_assert(( sizeof(T) <= sizeof(CharT)) , "boost::lexical_cast does not support narrowing of char types." "Use boost::locale instead") - - ; - - std::locale loc; - CharT const w = std::use_facet< std::ctype<CharT> >(loc).widen(ch); - - - - Traits::assign(buffer[0], w); - finish = start + 1; - return true; - } - - - bool shl_char_array(CharT const* str_value) noexcept { - start = str_value; - finish = start + Traits::length(str_value); - return true; - } - - template <class T> - bool shl_char_array(T const* str_value) { - static_assert(( sizeof(T) <= sizeof(CharT)), "boost::lexical_cast does not support narrowing of char types." "Use boost::locale instead") - - ; - return shl_input_streamable(str_value); - } - - bool shl_char_array_limited(CharT const* str, std::size_t max_size) noexcept { - start = str; - finish = std::find(start, start + max_size, Traits::to_char_type(0)); - return true; - } - - template<typename InputStreamable> - bool shl_input_streamable(InputStreamable& input) { - - - - - - - - out_stream.exceptions(std::ios::badbit); - try { - - bool const result = !(out_stream << input).fail(); - const deduced_out_buffer_t* const p = static_cast<deduced_out_buffer_t*>( - out_stream.rdbuf() - ); - start = p->pbase(); - finish = p->pptr(); - return result; - - } catch (const ::std::ios_base::failure& ) { - return false; - } - - } - - template <class T> - inline bool shl_unsigned(const T n) { - CharT* tmp_finish = buffer + CharacterBufferSize; - start = lcast_put_unsigned<Traits, T, CharT>(n, tmp_finish).convert(); - finish = tmp_finish; - return true; - } - - template <class T> - inline bool shl_signed(const T n) { - CharT* tmp_finish = buffer + CharacterBufferSize; - typedef typename boost::make_unsigned<T>::type utype; - CharT* tmp_start = lcast_put_unsigned<Traits, utype, CharT>(lcast_to_unsigned(n), tmp_finish).convert(); - if (n < 0) { - --tmp_start; - CharT const minus = lcast_char_constants<CharT>::minus; - Traits::assign(*tmp_start, minus); - } - start = tmp_start; - finish = tmp_finish; - return true; - } - - template <class T, class SomeCharT> - bool shl_real_type(const T& val, SomeCharT* ) { - lcast_set_precision(out_stream, &val); - return shl_input_streamable(val); - } - - bool shl_real_type(float val, char* begin) { - using namespace std; - const double val_as_double = val; - finish = start + - - - - sprintf(begin, - - "%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double); - return finish > start; - } - - bool shl_real_type(double val, char* begin) { - using namespace std; - finish = start + - - - - sprintf(begin, - - "%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val); - return finish > start; - } - - - bool shl_real_type(long double val, char* begin) { - using namespace std; - finish = start + - - - - sprintf(begin, - - "%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double>()), val ); - return finish > start; - } - - - - - bool shl_real_type(float val, wchar_t* begin) { - using namespace std; - const double val_as_double = val; - finish = start + swprintf(begin, CharacterBufferSize, - L"%.*g", - static_cast<int>(boost::detail::lcast_get_precision<float >()), - val_as_double ); - return finish > start; - } - - bool shl_real_type(double val, wchar_t* begin) { - using namespace std; - finish = start + swprintf(begin, CharacterBufferSize, - L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val ); - return finish > start; - } - - bool shl_real_type(long double val, wchar_t* begin) { - using namespace std; - finish = start + swprintf(begin, CharacterBufferSize, - L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val ); - return finish > start; - } - - template <class T> - bool shl_real(T val) { - CharT* tmp_finish = buffer + CharacterBufferSize; - if (put_inf_nan(buffer, tmp_finish, val)) { - finish = tmp_finish; - return true; - } - - return shl_real_type(val, static_cast<CharT*>(buffer)); - } - - - public: - template<class Alloc> - bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) noexcept { - start = str.data(); - finish = start + str.length(); - return true; - } - - template<class Alloc> - bool operator<<(boost::container::basic_string<CharT,Traits,Alloc> const& str) noexcept { - start = str.data(); - finish = start + str.length(); - return true; - } - - bool operator<<(bool value) noexcept { - CharT const czero = lcast_char_constants<CharT>::zero; - Traits::assign(buffer[0], Traits::to_char_type(czero + value)); - finish = start + 1; - return true; - } - - template <class C> - typename boost::disable_if<boost::is_const<C>, bool>::type - operator<<(const iterator_range<C*>& rng) noexcept { - return (*this) << iterator_range<const C*>(rng.begin(), rng.end()); - } - - bool operator<<(const iterator_range<const CharT*>& rng) noexcept { - start = rng.begin(); - finish = rng.end(); - return true; - } - - bool operator<<(const iterator_range<const signed char*>& rng) noexcept { - return (*this) << iterator_range<const char*>( - reinterpret_cast<const char*>(rng.begin()), - reinterpret_cast<const char*>(rng.end()) - ); - } - - bool operator<<(const iterator_range<const unsigned char*>& rng) noexcept { - return (*this) << iterator_range<const char*>( - reinterpret_cast<const char*>(rng.begin()), - reinterpret_cast<const char*>(rng.end()) - ); - } - - bool operator<<(char ch) { return shl_char(ch); } - bool operator<<(unsigned char ch) { return ((*this) << static_cast<char>(ch)); } - bool operator<<(signed char ch) { return ((*this) << static_cast<char>(ch)); } - - bool operator<<(wchar_t const* str) { return shl_char_array(str); } - bool operator<<(wchar_t * str) { return shl_char_array(str); } - - bool operator<<(wchar_t ch) { return shl_char(ch); } - - - - bool operator<<(char16_t ch) { return shl_char(ch); } - bool operator<<(char16_t * str) { return shl_char_array(str); } - bool operator<<(char16_t const * str) { return shl_char_array(str); } - - - bool operator<<(char32_t ch) { return shl_char(ch); } - bool operator<<(char32_t * str) { return shl_char_array(str); } - bool operator<<(char32_t const * str) { return shl_char_array(str); } - - bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); } - bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); } - bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); } - bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); } - bool operator<<(char const* str_value) { return shl_char_array(str_value); } - bool operator<<(char* str_value) { return shl_char_array(str_value); } - bool operator<<(short n) { return shl_signed(n); } - bool operator<<(int n) { return shl_signed(n); } - bool operator<<(long n) { return shl_signed(n); } - bool operator<<(unsigned short n) { return shl_unsigned(n); } - bool operator<<(unsigned int n) { return shl_unsigned(n); } - bool operator<<(unsigned long n) { return shl_unsigned(n); } - - - bool operator<<(boost::ulong_long_type n) { return shl_unsigned(n); } - bool operator<<(boost::long_long_type n) { return shl_signed(n); } - - - - - - - bool operator<<(const boost::uint128_type& n) { return shl_unsigned(n); } - bool operator<<(const boost::int128_type& n) { return shl_signed(n); } - - bool operator<<(float val) { return shl_real(val); } - bool operator<<(double val) { return shl_real(val); } - bool operator<<(long double val) { - - return shl_real(val); - - - - } - - - template <class C, std::size_t N> - typename boost::disable_if<boost::is_const<C>, bool>::type - operator<<(boost::array<C, N> const& input) noexcept { - static_assert((sizeof(boost::array<const C, N>) == sizeof(boost::array<C, N>)), "boost::array<C, N> and boost::array<const C, N> must have exactly the same layout.") - - - ; - return ((*this) << reinterpret_cast<boost::array<const C, N> const& >(input)); - } - - template <std::size_t N> - bool operator<<(boost::array<const CharT, N> const& input) noexcept { - return shl_char_array_limited(input.data(), N); - } - - template <std::size_t N> - bool operator<<(boost::array<const unsigned char, N> const& input) noexcept { - return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); - } - - template <std::size_t N> - bool operator<<(boost::array<const signed char, N> const& input) noexcept { - return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); - } - - - - template <class C, std::size_t N> - bool operator<<(std::array<C, N> const& input) noexcept { - static_assert((sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)), "std::array and boost::array must have exactly the same layout. " "Bug in implementation of std::array or boost::array.") - - - - ; - return ((*this) << reinterpret_cast<boost::array<C, N> const& >(input)); - } - - template <class InStreamable> - bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } - }; - - - template <class CharT, class Traits> - class lexical_ostream_limited_src: boost::noncopyable { - - const CharT* start; - const CharT* const finish; - - public: - lexical_ostream_limited_src(const CharT* begin, const CharT* end) noexcept - : start(begin) - , finish(end) - {} - - - private: - template <typename Type> - bool shr_unsigned(Type& output) { - if (start == finish) return false; - CharT const minus = lcast_char_constants<CharT>::minus; - CharT const plus = lcast_char_constants<CharT>::plus; - bool const has_minus = Traits::eq(minus, *start); - - - if (has_minus || Traits::eq(plus, *start)) { - ++start; - } - - bool const succeed = lcast_ret_unsigned<Traits, Type, CharT>(output, start, finish).convert(); - - if (has_minus) { - output = static_cast<Type>(0u - output); - } - - return succeed; - } - - template <typename Type> - bool shr_signed(Type& output) { - if (start == finish) return false; - CharT const minus = lcast_char_constants<CharT>::minus; - CharT const plus = lcast_char_constants<CharT>::plus; - typedef typename make_unsigned<Type>::type utype; - utype out_tmp = 0; - bool const has_minus = Traits::eq(minus, *start); - - - if (has_minus || Traits::eq(plus, *start)) { - ++start; - } - - bool succeed = lcast_ret_unsigned<Traits, utype, CharT>(out_tmp, start, finish).convert(); - if (has_minus) { - utype const comp_val = (static_cast<utype>(1) << std::numeric_limits<Type>::digits); - succeed = succeed && out_tmp<=comp_val; - output = static_cast<Type>(0u - out_tmp); - } else { - utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)()); - succeed = succeed && out_tmp<=comp_val; - output = static_cast<Type>(out_tmp); - } - return succeed; - } - - template<typename InputStreamable> - bool shr_using_base_class(InputStreamable& output) - { - static_assert((!boost::is_pointer<InputStreamable>::value), "boost::lexical_cast can not convert to pointers") - - - ; -# 581 "/usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp" 3 4 - typedef typename out_stream_helper_trait<CharT, Traits>::buffer_t buffer_t; - buffer_t buf; - - - buf.setbuf(const_cast<CharT*>(start), static_cast<typename buffer_t::streamsize>(finish - start)); - - - - std::basic_istream<CharT, Traits> stream(&buf); - - - - - stream.exceptions(std::ios::badbit); - try { - - stream.unsetf(std::ios::skipws); - lcast_set_precision(stream, static_cast<InputStreamable*>(0)); - - return (stream >> output) - && (stream.get() == Traits::eof()); - - - } catch (const ::std::ios_base::failure& ) { - return false; - } - - } - - template<class T> - inline bool shr_xchar(T& output) noexcept { - static_assert(( sizeof(CharT) == sizeof(T) ), "boost::lexical_cast does not support narrowing of character types." "Use boost::locale instead") - - ; - bool const ok = (finish - start == 1); - if (ok) { - CharT out; - Traits::assign(out, *start); - output = static_cast<T>(out); - } - return ok; - } - - template <std::size_t N, class ArrayT> - bool shr_std_array(ArrayT& output) noexcept { - using namespace std; - const std::size_t size = static_cast<std::size_t>(finish - start); - if (size > N - 1) { - return false; - } - - memcpy(&output[0], start, size * sizeof(CharT)); - output[size] = Traits::to_char_type(0); - return true; - } - - - public: - bool operator>>(unsigned short& output) { return shr_unsigned(output); } - bool operator>>(unsigned int& output) { return shr_unsigned(output); } - bool operator>>(unsigned long int& output) { return shr_unsigned(output); } - bool operator>>(short& output) { return shr_signed(output); } - bool operator>>(int& output) { return shr_signed(output); } - bool operator>>(long int& output) { return shr_signed(output); } - - bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } - bool operator>>(boost::long_long_type& output) { return shr_signed(output); } - - - - - - - bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); } - bool operator>>(boost::int128_type& output) { return shr_signed(output); } - - - bool operator>>(char& output) { return shr_xchar(output); } - bool operator>>(unsigned char& output) { return shr_xchar(output); } - bool operator>>(signed char& output) { return shr_xchar(output); } - - bool operator>>(wchar_t& output) { return shr_xchar(output); } - - - bool operator>>(char16_t& output) { return shr_xchar(output); } - - - bool operator>>(char32_t& output) { return shr_xchar(output); } - - template<class Alloc> - bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { - str.assign(start, finish); return true; - } - - template<class Alloc> - bool operator>>(boost::container::basic_string<CharT,Traits,Alloc>& str) { - str.assign(start, finish); return true; - } - - template <std::size_t N> - bool operator>>(boost::array<CharT, N>& output) noexcept { - return shr_std_array<N>(output); - } - - template <std::size_t N> - bool operator>>(boost::array<unsigned char, N>& output) noexcept { - return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output)); - } - - template <std::size_t N> - bool operator>>(boost::array<signed char, N>& output) noexcept { - return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output)); - } - - - template <class C, std::size_t N> - bool operator>>(std::array<C, N>& output) noexcept { - static_assert((sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)), "std::array<C, N> and boost::array<C, N> must have exactly the same layout.") - - - ; - return ((*this) >> reinterpret_cast<boost::array<C, N>& >(output)); - } - - - bool operator>>(bool& output) noexcept { - output = false; - - if (start == finish) return false; - CharT const zero = lcast_char_constants<CharT>::zero; - CharT const plus = lcast_char_constants<CharT>::plus; - CharT const minus = lcast_char_constants<CharT>::minus; - - const CharT* const dec_finish = finish - 1; - output = Traits::eq(*dec_finish, zero + 1); - if (!output && !Traits::eq(*dec_finish, zero)) { - return false; - } - - if (start == dec_finish) return true; - - - if (Traits::eq(plus, *start) || (Traits::eq(minus, *start) && !output)) { - ++ start; - } - - - while (start != dec_finish) { - if (!Traits::eq(zero, *start)) { - return false; - } - - ++ start; - } - - return true; - } - - private: - - template <class T> - bool float_types_converter_internal(T& output) { - if (parse_inf_nan(start, finish, output)) return true; - bool const return_value = shr_using_base_class(output); - - - - - - - - CharT const minus = lcast_char_constants<CharT>::minus; - CharT const plus = lcast_char_constants<CharT>::plus; - CharT const capital_e = lcast_char_constants<CharT>::capital_e; - CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e; - if ( return_value && - ( - Traits::eq(*(finish-1), lowercase_e) - || Traits::eq(*(finish-1), capital_e) - || Traits::eq(*(finish-1), minus) - || Traits::eq(*(finish-1), plus) - ) - ) return false; - - return return_value; - } - - public: - bool operator>>(float& output) { return float_types_converter_internal(output); } - bool operator>>(double& output) { return float_types_converter_internal(output); } - bool operator>>(long double& output) { return float_types_converter_internal(output); } - - - - template <typename InputStreamable> - bool operator>>(InputStreamable& output) { - return shr_using_base_class(output); - } - }; - } -} -# 55 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 2 3 4 - -namespace boost { - - namespace detail - { - - template < class Char > - struct normalize_single_byte_char - { - typedef Char type; - }; - - template <> - struct normalize_single_byte_char< signed char > - { - typedef char type; - }; - - template <> - struct normalize_single_byte_char< unsigned char > - { - typedef char type; - }; - } - - namespace detail - { - - - template < class T > struct deduce_character_type_later {}; - } - - namespace detail - { - - - - template < typename Type > - struct stream_char_common: public boost::conditional< - boost::detail::is_character< Type >::value, - Type, - boost::detail::deduce_character_type_later< Type > - > {}; - - template < typename Char > - struct stream_char_common< Char* >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< Char* > - > {}; - - template < typename Char > - struct stream_char_common< const Char* >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< const Char* > - > {}; - - template < typename Char > - struct stream_char_common< boost::iterator_range< Char* > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::iterator_range< Char* > > - > {}; - - template < typename Char > - struct stream_char_common< boost::iterator_range< const Char* > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > > - > {}; - - template < class Char, class Traits, class Alloc > - struct stream_char_common< std::basic_string< Char, Traits, Alloc > > - { - typedef Char type; - }; - - template < class Char, class Traits, class Alloc > - struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > > - { - typedef Char type; - }; - - template < typename Char, std::size_t N > - struct stream_char_common< boost::array< Char, N > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::array< Char, N > > - > {}; - - template < typename Char, std::size_t N > - struct stream_char_common< boost::array< const Char, N > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::array< const Char, N > > - > {}; - - - template < typename Char, std::size_t N > - struct stream_char_common< std::array<Char, N > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< std::array< Char, N > > - > {}; - - template < typename Char, std::size_t N > - struct stream_char_common< std::array< const Char, N > >: public boost::conditional< - boost::detail::is_character< Char >::value, - Char, - boost::detail::deduce_character_type_later< std::array< const Char, N > > - > {}; - - - - template <> struct stream_char_common< boost::int128_type >: public boost::type_identity< char > {}; - template <> struct stream_char_common< boost::uint128_type >: public boost::type_identity< char > {}; -# 181 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - } - - namespace detail - { - - - - - - template < class Char > - struct deduce_source_char_impl - { - typedef typename boost::detail::normalize_single_byte_char< Char >::type type; - }; - - template < class T > - struct deduce_source_char_impl< deduce_character_type_later< T > > - { - typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t; - - - - - - - typedef typename boost::conditional< - result_t::value, char, wchar_t - >::type type; - - static_assert((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value), "Source type is neither std::ostream`able nor std::wostream`able") - ; - - }; - } - - namespace detail - { - - - - - - template < class Char > - struct deduce_target_char_impl - { - typedef typename normalize_single_byte_char< Char >::type type; - }; - - template < class T > - struct deduce_target_char_impl< deduce_character_type_later<T> > - { - typedef boost::has_right_shift<std::basic_istream<char>, T > result_t; - - - - - - - typedef typename boost::conditional< - result_t::value, char, wchar_t - >::type type; - - static_assert((result_t::value || boost::has_right_shift<std::basic_istream<wchar_t>, T >::value), "Target type is neither std::istream`able nor std::wistream`able") - ; - - }; - } - - namespace detail - { -# 266 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - template < class T > - struct deduce_target_char - { - typedef typename stream_char_common< T >::type stage1_type; - typedef typename deduce_target_char_impl< stage1_type >::type stage2_type; - - typedef stage2_type type; - }; - - template < class T > - struct deduce_source_char - { - typedef typename stream_char_common< T >::type stage1_type; - typedef typename deduce_source_char_impl< stage1_type >::type stage2_type; - - typedef stage2_type type; - }; - } - - namespace detail - { - - - template < class Char, class T > - struct extract_char_traits - : boost::false_type - { - typedef std::char_traits< Char > trait_t; - }; - - template < class Char, class Traits, class Alloc > - struct extract_char_traits< Char, std::basic_string< Char, Traits, Alloc > > - : boost::true_type - { - typedef Traits trait_t; - }; - - template < class Char, class Traits, class Alloc> - struct extract_char_traits< Char, boost::container::basic_string< Char, Traits, Alloc > > - : boost::true_type - { - typedef Traits trait_t; - }; - } - - namespace detail - { - template<class T> - struct array_to_pointer_decay - { - typedef T type; - }; - - template<class T, std::size_t N> - struct array_to_pointer_decay<T[N]> - { - typedef const T * type; - }; - } - - namespace detail - { - - template< class Source, - class Enable = void - > - struct lcast_src_length - { - static const std::size_t value = 1; - }; -# 350 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - template <class Source> - struct lcast_src_length< - Source, typename boost::enable_if<boost::is_integral<Source> >::type - > - { - - static const std::size_t value = std::numeric_limits<Source>::is_signed + std::numeric_limits<Source>::is_specialized + std::numeric_limits<Source>::digits10 * 2 - - - - ; - - - - - }; -# 377 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - template<class Source> - struct lcast_src_length< - Source, typename boost::enable_if<boost::is_float<Source> >::type - > - { - - - static_assert(std::numeric_limits<Source>::max_exponent10 <= 999999L && std::numeric_limits<Source>::min_exponent10 >= -999999L, "std::numeric_limits<Source>::max_exponent10 <= 999999L && std::numeric_limits<Source>::min_exponent10 >= -999999L") - - - ; - - static const std::size_t value = 5 + lcast_precision<Source>::value + 6 - - ; - - - - }; - } - - namespace detail - { - template <class Source, class Target> - struct lexical_cast_stream_traits { - typedef typename boost::detail::array_to_pointer_decay<Source>::type src; - typedef typename boost::remove_cv<src>::type no_cv_src; - - typedef boost::detail::deduce_source_char<no_cv_src> deduce_src_char_metafunc; - typedef typename deduce_src_char_metafunc::type src_char_t; - typedef typename boost::detail::deduce_target_char<Target>::type target_char_t; - - typedef typename boost::detail::widest_char< - target_char_t, src_char_t - >::type char_type; -# 424 "/usr/include/boost/lexical_cast/detail/converter_lexical.hpp" 3 4 - typedef typename boost::conditional< - boost::detail::extract_char_traits<char_type, Target>::value, - typename boost::detail::extract_char_traits<char_type, Target>, - typename boost::detail::extract_char_traits<char_type, no_cv_src> - >::type::trait_t traits; - - typedef boost::integral_constant< - bool, - boost::is_same<char, src_char_t>::value && - (sizeof(char) != sizeof(target_char_t)) && - (!(boost::detail::is_character<no_cv_src>::value)) - > is_string_widening_required_t; - - typedef boost::integral_constant< - bool, - !(boost::is_integral<no_cv_src>::value || - boost::detail::is_character< - typename deduce_src_char_metafunc::stage1_type - >::value - ) - > is_source_input_not_optimized_t; - - - - static const bool requires_stringbuf = (is_string_widening_required_t::value || is_source_input_not_optimized_t::value) - - ; - - typedef boost::detail::lcast_src_length<no_cv_src> len_t; - }; - } - - namespace detail - { - template<typename Target, typename Source> - struct lexical_converter_impl - { - typedef lexical_cast_stream_traits<Source, Target> stream_trait; - - typedef detail::lexical_istream_limited_src< - typename stream_trait::char_type, - typename stream_trait::traits, - stream_trait::requires_stringbuf, - stream_trait::len_t::value + 1 - > i_interpreter_type; - - typedef detail::lexical_ostream_limited_src< - typename stream_trait::char_type, - typename stream_trait::traits - > o_interpreter_type; - - static inline bool try_convert(const Source& arg, Target& result) { - i_interpreter_type i_interpreter; - - - if (!(i_interpreter.operator <<(arg))) - return false; - - o_interpreter_type out(i_interpreter.cbegin(), i_interpreter.cend()); - - - if(!(out.operator >>(result))) - return false; - - return true; - } - }; - } - -} -# 45 "/usr/include/boost/lexical_cast/try_lexical_convert.hpp" 2 3 4 - - - - -namespace boost { - namespace detail - { - template<typename T> - struct is_stdstring - : boost::false_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_stdstring< std::basic_string<CharT, Traits, Alloc> > - : boost::true_type - {}; - - - - template<typename T> - struct is_booststring - : boost::false_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_booststring< boost::container::basic_string<CharT, Traits, Alloc> > - : boost::true_type - {}; - - template<typename Target, typename Source> - struct is_arithmetic_and_not_xchars - { - typedef boost::integral_constant< - bool, - !(boost::detail::is_character<Target>::value) && - !(boost::detail::is_character<Source>::value) && - boost::is_arithmetic<Source>::value && - boost::is_arithmetic<Target>::value - > type; - - static const bool value = ( type::value ) - - ; - }; - - - - - - template<typename Target, typename Source> - struct is_xchar_to_xchar - { - typedef boost::integral_constant< - bool, - sizeof(Source) == sizeof(Target) && - sizeof(Source) == sizeof(char) && - boost::detail::is_character<Target>::value && - boost::detail::is_character<Source>::value - > type; - - static const bool value = ( type::value ) - - ; - }; - - template<typename Target, typename Source> - struct is_char_array_to_stdstring - : boost::false_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, CharT* > - : boost::true_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, const CharT* > - : boost::true_type - {}; - - - - template<typename Target, typename Source> - struct is_char_array_to_booststring - : boost::false_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* > - : boost::true_type - {}; - - template<typename CharT, typename Traits, typename Alloc> - struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* > - : boost::true_type - {}; - - template <typename Target, typename Source> - struct copy_converter_impl - { - - - - template <class T> - static inline bool try_convert(T&& arg, Target& result) { - result = static_cast<T&&>(arg); - return true; - } - - - - - - - }; - } - - namespace conversion { namespace detail { - - template <typename Target, typename Source> - inline bool try_lexical_convert(const Source& arg, Target& result) - { - typedef typename boost::detail::array_to_pointer_decay<Source>::type src; - - typedef boost::integral_constant< - bool, - boost::detail::is_xchar_to_xchar<Target, src >::value || - boost::detail::is_char_array_to_stdstring<Target, src >::value || - boost::detail::is_char_array_to_booststring<Target, src >::value || - ( - boost::is_same<Target, src >::value && - (boost::detail::is_stdstring<Target >::value || boost::detail::is_booststring<Target >::value) - ) || - ( - boost::is_same<Target, src >::value && - boost::detail::is_character<Target >::value - ) - > shall_we_copy_t; - - typedef boost::detail::is_arithmetic_and_not_xchars<Target, src > - shall_we_copy_with_dynamic_check_t; - - - - typedef typename boost::conditional< - shall_we_copy_t::value, - boost::type_identity<boost::detail::copy_converter_impl<Target, src > >, - boost::conditional< - shall_we_copy_with_dynamic_check_t::value, - boost::detail::dynamic_num_converter_impl<Target, src >, - boost::detail::lexical_converter_impl<Target, src > - > - >::type caster_type_lazy; - - typedef typename caster_type_lazy::type caster_type; - - return caster_type::try_convert(arg, result); - } - - template <typename Target, typename CharacterT> - inline bool try_lexical_convert(const CharacterT* chars, std::size_t count, Target& result) - { - static_assert(boost::detail::is_character<CharacterT>::value, "This overload of try_lexical_convert is meant to be used only with arrays of characters.") - - - ; - return ::boost::conversion::detail::try_lexical_convert( - ::boost::iterator_range<const CharacterT*>(chars, chars + count), result - ); - } - - }} - - namespace conversion { - - using ::boost::conversion::detail::try_lexical_convert; - } - -} - - - - -#pragma GCC diagnostic pop -# 33 "/usr/include/boost/lexical_cast.hpp" 2 3 4 - -namespace boost -{ - template <typename Target, typename Source> - inline Target lexical_cast(const Source &arg) - { - Target result = Target(); - - if (!boost::conversion::detail::try_lexical_convert(arg, result)) { - boost::conversion::detail::throw_bad_cast<Source, Target>(); - } - - return result; - } - - template <typename Target> - inline Target lexical_cast(const char* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const char*>(chars, chars + count) - ); - } - - template <typename Target> - inline Target lexical_cast(const unsigned char* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const unsigned char*>(chars, chars + count) - ); - } - - template <typename Target> - inline Target lexical_cast(const signed char* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const signed char*>(chars, chars + count) - ); - } - - - template <typename Target> - inline Target lexical_cast(const wchar_t* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const wchar_t*>(chars, chars + count) - ); - } - - - template <typename Target> - inline Target lexical_cast(const char16_t* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const char16_t*>(chars, chars + count) - ); - } - - - template <typename Target> - inline Target lexical_cast(const char32_t* chars, std::size_t count) - { - return ::boost::lexical_cast<Target>( - ::boost::iterator_range<const char32_t*>(chars, chars + count) - ); - } - - -} -# 19 "/usr/include/boost/multiprecision/detail/number_base.hpp" 2 3 4 -# 55 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 -namespace boost{ - - namespace serialization - { - template <class T> - struct nvp; - template<class T> - const nvp< T > make_nvp(const char * name, T & t); - } - - namespace multiprecision{ - -enum expression_template_option -{ - et_off = 0, - et_on = 1 -}; - -template <class Backend> -struct expression_template_default -{ - static const expression_template_option value = et_on; -}; - -template <class Backend, expression_template_option ExpressionTemplates = expression_template_default<Backend>::value> -class number; - -template <class T> -struct is_number : public mpl::false_ {}; - -template <class Backend, expression_template_option ExpressionTemplates> -struct is_number<number<Backend, ExpressionTemplates> > : public mpl::true_ {}; - -template <class T> -struct is_et_number : public mpl::false_ {}; - -template <class Backend> -struct is_et_number<number<Backend, et_on> > : public mpl::true_ {}; - -template <class T> -struct is_no_et_number : public mpl::false_ {}; - -template <class Backend> -struct is_no_et_number<number<Backend, et_off> > : public mpl::true_ {}; - -namespace detail{ - - -template<class tag, class Arg1 = void, class Arg2 = void, class Arg3 = void, class Arg4 = void> -struct expression; - -} - -template <class T> -struct is_number_expression : public mpl::false_ {}; - -template<class tag, class Arg1, class Arg2, class Arg3, class Arg4> -struct is_number_expression<detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > : public mpl::true_ {}; - -template <class T, class Num> -struct is_compatible_arithmetic_type - : public mpl::bool_< - is_convertible<T, Num>::value - && !is_same<T, Num>::value - && !is_number_expression<T>::value> -{}; - -namespace detail{ - - - -template <class T> -constexpr typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), T>::type abs(T t) noexcept -{ - - - - return t < 0 ? T(1u) + T(-(t + 1)) : t; -} -template <class T> -constexpr typename enable_if_c<(is_unsigned<T>::value), T>::type abs(T t) noexcept -{ - return t; -} - - - -template <class T> -constexpr typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), typename make_unsigned<T>::type>::type unsigned_abs(T t) noexcept -{ - - - - return t < 0 ? static_cast<typename make_unsigned<T>::type>(1u) + static_cast<typename make_unsigned<T>::type>(-(t + 1)) : static_cast<typename make_unsigned<T>::type>(t); -} -template <class T> -constexpr typename enable_if_c<(is_unsigned<T>::value), T>::type unsigned_abs(T t) noexcept -{ - return t; -} -# 165 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 -template <class T> -struct bits_of -{ - static_assert(is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized, "is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized"); - static const unsigned value = - std::numeric_limits<T>::is_specialized ? - std::numeric_limits<T>::digits - : sizeof(T) * 8 - (is_signed<T>::value ? 1 : 0); -}; - - -template<> struct bits_of<__float128> { static const unsigned value = 113; }; - - -template <int b> -struct has_enough_bits -{ - template <class T> - struct type : public mpl::bool_<bits_of<T>::value>= b>{}; -}; - -template <class Val, class Backend, class Tag> -struct canonical_imp -{ - typedef typename remove_cv<typename decay<const Val>::type>::type type; -}; -template <class B, class Backend, class Tag> -struct canonical_imp<number<B, et_on>, Backend, Tag> -{ - typedef B type; -}; -template <class B, class Backend, class Tag> -struct canonical_imp<number<B, et_off>, Backend, Tag> -{ - typedef B type; -}; -# 213 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 -template <class Val, class Backend> -struct canonical_imp<Val, Backend, mpl::int_<0> > -{ - typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type; - typedef typename mpl::find_if< - typename Backend::signed_types, - pred_type - >::type iter_type; - typedef typename mpl::end<typename Backend::signed_types>::type end_type; - typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type; -}; -template <class Val, class Backend> -struct canonical_imp<Val, Backend, mpl::int_<1> > -{ - typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type; - typedef typename mpl::find_if< - typename Backend::unsigned_types, - pred_type - >::type iter_type; - typedef typename mpl::end<typename Backend::unsigned_types>::type end_type; - typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type; -}; -template <class Val, class Backend> -struct canonical_imp<Val, Backend, mpl::int_<2> > -{ - typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type; - typedef typename mpl::find_if< - typename Backend::float_types, - pred_type - >::type iter_type; - typedef typename mpl::end<typename Backend::float_types>::type end_type; - typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type; -}; -template <class Val, class Backend> -struct canonical_imp<Val, Backend, mpl::int_<3> > -{ - typedef const char* type; -}; - -template <class Val, class Backend> -struct canonical -{ - typedef typename mpl::if_< - is_signed<Val>, - mpl::int_<0>, - typename mpl::if_< - is_unsigned<Val>, - mpl::int_<1>, - typename mpl::if_< - is_floating_point<Val>, - mpl::int_<2>, - typename mpl::if_< - mpl::or_< - is_convertible<Val, const char*>, - is_same<Val, std::string> - >, - mpl::int_<3>, - mpl::int_<4> - >::type - >::type - >::type - >::type tag_type; - - typedef typename canonical_imp<Val, Backend, tag_type>::type type; -}; - -struct terminal{}; -struct negate{}; -struct plus{}; -struct minus{}; -struct multiplies{}; -struct divides{}; -struct modulus{}; -struct shift_left{}; -struct shift_right{}; -struct bitwise_and{}; -struct bitwise_or{}; -struct bitwise_xor{}; -struct bitwise_complement{}; -struct add_immediates{}; -struct subtract_immediates{}; -struct multiply_immediates{}; -struct divide_immediates{}; -struct modulus_immediates{}; -struct bitwise_and_immediates{}; -struct bitwise_or_immediates{}; -struct bitwise_xor_immediates{}; -struct complement_immediates{}; -struct function{}; -struct multiply_add{}; -struct multiply_subtract{}; - -template <class T> -struct backend_type; - -template <class T, expression_template_option ExpressionTemplates> -struct backend_type<number<T, ExpressionTemplates> > -{ - typedef T type; -}; - -template <class tag, class A1, class A2, class A3, class A4> -struct backend_type<expression<tag, A1, A2, A3, A4> > -{ - typedef typename backend_type<typename expression<tag, A1, A2, A3, A4>::result_type>::type type; -}; - - -template <class T1, class T2> -struct combine_expression -{ - - - - typedef decltype(T1() + T2()) type; - -}; - -template <class T1, expression_template_option ExpressionTemplates, class T2> -struct combine_expression<number<T1, ExpressionTemplates>, T2> -{ - typedef number<T1, ExpressionTemplates> type; -}; - -template <class T1, class T2, expression_template_option ExpressionTemplates> -struct combine_expression<T1, number<T2, ExpressionTemplates> > -{ - typedef number<T2, ExpressionTemplates> type; -}; - -template <class T, expression_template_option ExpressionTemplates> -struct combine_expression<number<T, ExpressionTemplates>, number<T, ExpressionTemplates> > -{ - typedef number<T, ExpressionTemplates> type; -}; - -template <class T1, expression_template_option ExpressionTemplates1, class T2, expression_template_option ExpressionTemplates2> -struct combine_expression<number<T1, ExpressionTemplates1>, number<T2, ExpressionTemplates2> > -{ - typedef typename mpl::if_c< - is_convertible<number<T2, ExpressionTemplates2>, number<T1, ExpressionTemplates2> >::value, - number<T1, ExpressionTemplates1>, - number<T2, ExpressionTemplates2> - >::type type; -}; - -template <class T> -struct arg_type -{ - typedef expression<terminal, T> type; -}; - -template <class Tag, class Arg1, class Arg2, class Arg3, class Arg4> -struct arg_type<expression<Tag, Arg1, Arg2, Arg3, Arg4> > -{ - typedef expression<Tag, Arg1, Arg2, Arg3, Arg4> type; -}; - -struct unmentionable -{ - unmentionable* proc(){ return 0; } -}; - -typedef unmentionable* (unmentionable::*unmentionable_type)(); - -template <class T, bool b> -struct expression_storage_base -{ - typedef const T& type; -}; - -template <class T> -struct expression_storage_base<T, true> -{ - typedef T type; -}; - -template <class T> -struct expression_storage : public expression_storage_base<T, boost::is_arithmetic<T>::value> {}; - -template <class T> -struct expression_storage<T*> -{ - typedef T* type; -}; - -template <class T> -struct expression_storage<const T*> -{ - typedef const T* type; -}; - -template <class tag, class A1, class A2, class A3, class A4> -struct expression_storage<expression<tag, A1, A2, A3, A4> > -{ - typedef expression<tag, A1, A2, A3, A4> type; -}; - -template<class tag, class Arg1> -struct expression<tag, Arg1, void, void, void> -{ - typedef mpl::int_<1> arity; - typedef typename arg_type<Arg1>::type left_type; - typedef typename left_type::result_type left_result_type; - typedef typename left_type::result_type result_type; - typedef tag tag_type; - - explicit expression(const Arg1& a) : arg(a) {} - - - - - - - template <class Other> - expression& operator=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator+=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator-=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator*=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator/=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator%=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator|=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator&=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator^=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator<<=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator>>=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - - - left_type left()const { return left_type(arg); } - - const Arg1& left_ref()const noexcept { return arg; } - - static const unsigned depth = left_type::depth + 1; -# 554 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T - -, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0 - -> - explicit operator T()const - { - return static_cast<T>(static_cast<result_type>(*this)); - } - inline explicit operator bool()const - { - result_type r(*this); - return static_cast<bool>(r); - } -# 580 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T> - T convert_to() - { - result_type r(*this); - return r.template convert_to<T>(); - } - -private: - typename expression_storage<Arg1>::type arg; - expression& operator=(const expression&); -}; - -template<class Arg1> -struct expression<terminal, Arg1, void, void, void> -{ - typedef mpl::int_<0> arity; - typedef Arg1 result_type; - typedef terminal tag_type; - - explicit expression(const Arg1& a) : arg(a) {} - - - - - - - template <class Other> - expression& operator=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator+=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator-=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator*=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator/=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator%=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator|=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator&=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator^=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator<<=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator>>=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - - - const Arg1& value()const noexcept { return arg; } - - static const unsigned depth = 0; -# 732 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T - -, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0 - -> - explicit operator T()const - { - return static_cast<T>(static_cast<result_type>(*this)); - } - inline explicit operator bool()const - { - result_type r(*this); - return static_cast<bool>(r); - } -# 757 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T> - T convert_to() - { - result_type r(*this); - return r.template convert_to<T>(); - } - -private: - typename expression_storage<Arg1>::type arg; - expression& operator=(const expression&); -}; - -template <class tag, class Arg1, class Arg2> -struct expression<tag, Arg1, Arg2, void, void> -{ - typedef mpl::int_<2> arity; - typedef typename arg_type<Arg1>::type left_type; - typedef typename arg_type<Arg2>::type right_type; - typedef typename left_type::result_type left_result_type; - typedef typename right_type::result_type right_result_type; - typedef typename combine_expression<left_result_type, right_result_type>::type result_type; - typedef tag tag_type; - - expression(const Arg1& a1, const Arg2& a2) : arg1(a1), arg2(a2) {} - - - - - - - template <class Other> - expression& operator=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator+=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator-=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator*=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator/=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator%=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator|=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator&=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator^=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator<<=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator>>=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - - - left_type left()const { return left_type(arg1); } - right_type right()const { return right_type(arg2); } - const Arg1& left_ref()const noexcept { return arg1; } - const Arg2& right_ref()const noexcept { return arg2; } -# 914 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T - -, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0 - -> - explicit operator T()const - { - return static_cast<T>(static_cast<result_type>(*this)); - } - inline explicit operator bool()const - { - result_type r(*this); - return static_cast<bool>(r); - } -# 939 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T> - T convert_to() - { - result_type r(*this); - return r.template convert_to<T>(); - } - - static const unsigned left_depth = left_type::depth + 1; - static const unsigned right_depth = right_type::depth + 1; - static const unsigned depth = left_depth > right_depth ? left_depth : right_depth; -private: - typename expression_storage<Arg1>::type arg1; - typename expression_storage<Arg2>::type arg2; - expression& operator=(const expression&); -}; - -template <class tag, class Arg1, class Arg2, class Arg3> -struct expression<tag, Arg1, Arg2, Arg3, void> -{ - typedef mpl::int_<3> arity; - typedef typename arg_type<Arg1>::type left_type; - typedef typename arg_type<Arg2>::type middle_type; - typedef typename arg_type<Arg3>::type right_type; - typedef typename left_type::result_type left_result_type; - typedef typename middle_type::result_type middle_result_type; - typedef typename right_type::result_type right_result_type; - typedef typename combine_expression< - left_result_type, - typename combine_expression<right_result_type, middle_result_type>::type - >::type result_type; - typedef tag tag_type; - - expression(const Arg1& a1, const Arg2& a2, const Arg3& a3) : arg1(a1), arg2(a2), arg3(a3) {} - - - - - - - template <class Other> - expression& operator=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator+=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator-=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator*=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator/=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator%=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator|=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator&=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator^=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator<<=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator>>=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - - - left_type left()const { return left_type(arg1); } - middle_type middle()const { return middle_type(arg2); } - right_type right()const { return right_type(arg3); } - const Arg1& left_ref()const noexcept { return arg1; } - const Arg2& middle_ref()const noexcept { return arg2; } - const Arg3& right_ref()const noexcept { return arg3; } -# 1107 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T - -, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0 - -> - explicit operator T()const - { - return static_cast<T>(static_cast<result_type>(*this)); - } - inline explicit operator bool()const - { - result_type r(*this); - return static_cast<bool>(r); - } -# 1132 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T> - T convert_to() - { - result_type r(*this); - return r.template convert_to<T>(); - } - - static const unsigned left_depth = left_type::depth + 1; - static const unsigned middle_depth = middle_type::depth + 1; - static const unsigned right_depth = right_type::depth + 1; - static const unsigned depth = left_depth > right_depth ? (left_depth > middle_depth ? left_depth : middle_depth) : (right_depth > middle_depth ? right_depth : middle_depth); -private: - typename expression_storage<Arg1>::type arg1; - typename expression_storage<Arg2>::type arg2; - typename expression_storage<Arg3>::type arg3; - expression& operator=(const expression&); -}; - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> -struct expression -{ - typedef mpl::int_<4> arity; - typedef typename arg_type<Arg1>::type left_type; - typedef typename arg_type<Arg2>::type left_middle_type; - typedef typename arg_type<Arg3>::type right_middle_type; - typedef typename arg_type<Arg4>::type right_type; - typedef typename left_type::result_type left_result_type; - typedef typename left_middle_type::result_type left_middle_result_type; - typedef typename right_middle_type::result_type right_middle_result_type; - typedef typename right_type::result_type right_result_type; - typedef typename combine_expression< - left_result_type, - typename combine_expression< - left_middle_result_type, - typename combine_expression<right_middle_result_type, right_result_type>::type - >::type - >::type result_type; - typedef tag tag_type; - - expression(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) : arg1(a1), arg2(a2), arg3(a3), arg4(a4) {} - - - - - - - template <class Other> - expression& operator=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator++(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--() - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - expression& operator--(int) - { - - static_assert(sizeof(*this) == 0x7fffffff, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator+=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator-=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator*=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator/=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator%=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator|=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator&=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator^=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator<<=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - template <class Other> - expression& operator>>=(const Other&) - { - - static_assert(sizeof(Other) == 0x7fffffff, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?"); - return *this; - } - - - left_type left()const { return left_type(arg1); } - left_middle_type left_middle()const { return left_middle_type(arg2); } - right_middle_type right_middle()const { return right_middle_type(arg3); } - right_type right()const { return right_type(arg4); } - const Arg1& left_ref()const noexcept { return arg1; } - const Arg2& left_middle_ref()const noexcept { return arg2; } - const Arg3& right_middle_ref()const noexcept { return arg3; } - const Arg4& right_ref()const noexcept { return arg4; } -# 1309 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T - -, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0 - -> - explicit operator T()const - { - return static_cast<T>(static_cast<result_type>(*this)); - } - inline explicit operator bool()const - { - result_type r(*this); - return static_cast<bool>(r); - } -# 1334 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 - template <class T> - T convert_to() - { - result_type r(*this); - return r.template convert_to<T>(); - } - - static const unsigned left_depth = left_type::depth + 1; - static const unsigned left_middle_depth = left_middle_type::depth + 1; - static const unsigned right_middle_depth = right_middle_type::depth + 1; - static const unsigned right_depth = right_type::depth + 1; - - static const unsigned left_max_depth = left_depth > left_middle_depth ? left_depth : left_middle_depth; - static const unsigned right_max_depth = right_depth > right_middle_depth ? right_depth : right_middle_depth; - - static const unsigned depth = left_max_depth > right_max_depth ? left_max_depth : right_max_depth; -private: - typename expression_storage<Arg1>::type arg1; - typename expression_storage<Arg2>::type arg2; - typename expression_storage<Arg3>::type arg3; - typename expression_storage<Arg4>::type arg4; - expression& operator=(const expression&); -}; - -template <class T> -struct digits2 -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert((std::numeric_limits<T>::radix == 2) || (std::numeric_limits<T>::radix == 10), "(std::numeric_limits<T>::radix == 2) || (std::numeric_limits<T>::radix == 10)"); - - static_assert(0x7fffffffffffffffL / 1000 > (std::numeric_limits<T>::digits + 1), "LONG_MAX / 1000 > (std::numeric_limits<T>::digits + 1)"); - static const long m_value = std::numeric_limits<T>::radix == 10 ? (((std::numeric_limits<T>::digits + 1) * 1000L) / 301L) : std::numeric_limits<T>::digits; - static inline constexpr long value()noexcept { return m_value; } -}; -# 1377 "/usr/include/boost/multiprecision/detail/number_base.hpp" 3 4 -template <class S> -void format_float_string(S& str, boost::intmax_t my_exp, boost::intmax_t digits, std::ios_base::fmtflags f, bool iszero) -{ - typedef typename S::size_type size_type; - bool scientific = (f & std::ios_base::scientific) == std::ios_base::scientific; - bool fixed = (f & std::ios_base::fixed) == std::ios_base::fixed; - bool showpoint = (f & std::ios_base::showpoint) == std::ios_base::showpoint; - bool showpos = (f & std::ios_base::showpos) == std::ios_base::showpos; - - bool neg = str.size() && (str[0] == '-'); - - if(neg) - str.erase(0, 1); - - if(digits == 0) - { - digits = (std::max)(str.size(), size_type(16)); - } - - if(iszero || str.empty() || (str.find_first_not_of('0') == S::npos)) - { - - - str = "0"; - if(scientific || fixed) - { - str.append(1, '.'); - str.append(size_type(digits), '0'); - if(scientific) - str.append("e+00"); - } - else - { - if(showpoint) - { - str.append(1, '.'); - if(digits > 1) - str.append(size_type(digits - 1), '0'); - } - } - if(neg) - str.insert(static_cast<std::string::size_type>(0), 1, '-'); - else if(showpos) - str.insert(static_cast<std::string::size_type>(0), 1, '+'); - return; - } - - if(!fixed && !scientific && !showpoint) - { - - - - std::string::iterator pos = str.end(); - while(pos != str.begin() && *--pos == '0'){} - if(pos != str.end()) - ++pos; - str.erase(pos, str.end()); - if(str.empty()) - str = '0'; - } - else if(!fixed || (my_exp >= 0)) - { - - - - boost::intmax_t chars = str.size(); - chars = digits - chars; - if(scientific) - ++chars; - if(chars > 0) - { - str.append(static_cast<std::string::size_type>(chars), '0'); - } - } - - if(fixed || (!scientific && (my_exp >= -4) && (my_exp < digits))) - { - if(1 + my_exp > static_cast<boost::intmax_t>(str.size())) - { - - str.append(static_cast<std::string::size_type>(1 + my_exp - str.size()), '0'); - if(showpoint || fixed) - str.append("."); - } - else if(my_exp + 1 < static_cast<boost::intmax_t>(str.size())) - { - if(my_exp < 0) - { - str.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(-1 - my_exp), '0'); - str.insert(static_cast<std::string::size_type>(0), "0."); - } - else - { - - str.insert(static_cast<std::string::size_type>(my_exp + 1), 1, '.'); - } - } - else if(showpoint || fixed) - str += "."; - - if(fixed) - { - - boost::intmax_t l = str.find('.') + 1; - l = digits - (str.size() - l); - if(l > 0) - str.append(size_type(l), '0'); - } - } - else - { - using boost::multiprecision::detail::abs; - - if(showpoint || (str.size() > 1)) - str.insert(static_cast<std::string::size_type>(1u), 1, '.'); - str.append(static_cast<std::string::size_type>(1u), 'e'); - S e = boost::lexical_cast<S>(abs(my_exp)); - if(e.size() < 2) - e.insert(static_cast<std::string::size_type>(0), 2 - e.size(), '0'); - if(my_exp < 0) - e.insert(static_cast<std::string::size_type>(0), 1, '-'); - else - e.insert(static_cast<std::string::size_type>(0), 1, '+'); - str.append(e); - } - if(neg) - str.insert(static_cast<std::string::size_type>(0), 1, '-'); - else if(showpos) - str.insert(static_cast<std::string::size_type>(0), 1, '+'); -} - -template <class V> -void check_shift_range(V val, const mpl::true_&, const mpl::true_&) -{ - if(val > (std::numeric_limits<std::size_t>::max)()) - ::boost::exception_detail::throw_exception_(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/number_base.hpp",1512); - if(val < 0) - ::boost::exception_detail::throw_exception_(std::out_of_range("Can not shift by a negative value."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/number_base.hpp",1514); -} -template <class V> -void check_shift_range(V val, const mpl::false_&, const mpl::true_&) -{ - if(val < 0) - ::boost::exception_detail::throw_exception_(std::out_of_range("Can not shift by a negative value."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/number_base.hpp",1520); -} -template <class V> -void check_shift_range(V val, const mpl::true_&, const mpl::false_&) -{ - if(val > (std::numeric_limits<std::size_t>::max)()) - ::boost::exception_detail::throw_exception_(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/number_base.hpp",1526); -} -template <class V> -void check_shift_range(V, const mpl::false_&, const mpl::false_&) noexcept{} - -template <class T> -const T& evaluate_if_expression(const T& val) { return val; } -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> -typename expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type evaluate_if_expression(const expression<tag, Arg1, Arg2, Arg3, Arg4>& val) { return val; } - - -} - - - - -enum number_category_type -{ - number_kind_unknown = -1, - number_kind_integer = 0, - number_kind_floating_point = 1, - number_kind_rational = 2, - number_kind_fixed_point = 3, - number_kind_complex = 4 -}; - -template <class Num, bool, bool> -struct number_category_base : public mpl::int_<number_kind_unknown> {}; -template <class Num> -struct number_category_base<Num, true, false> : public mpl::int_<std::numeric_limits<Num>::is_integer ? number_kind_integer : (std::numeric_limits<Num>::max_exponent ? number_kind_floating_point : number_kind_unknown)> {}; -template <class Num> -struct number_category : public number_category_base<Num, boost::is_class<Num>::value || boost::is_arithmetic<Num>::value, boost::is_abstract<Num>::value> {}; -template <class Backend, expression_template_option ExpressionTemplates> -struct number_category<number<Backend, ExpressionTemplates> > : public number_category<Backend>{}; -template <class tag, class A1, class A2, class A3, class A4> -struct number_category<detail::expression<tag, A1, A2, A3, A4> > : public number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{}; - - - - -template <> -struct number_category<boost::int128_type> : public mpl::int_<number_kind_integer> {}; -template <> -struct number_category<boost::uint128_type> : public mpl::int_<number_kind_integer> {}; - - -template <> -struct number_category<__float128> : public mpl::int_<number_kind_floating_point> {}; - - -template <class T> -struct component_type { typedef T type; }; -template <class tag, class A1, class A2, class A3, class A4> -struct component_type<detail::expression<tag, A1, A2, A3, A4> > : public component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{}; - -template <class T> -struct scalar_result_from_possible_complex -{ - typedef typename mpl::if_c<number_category<T>::value == number_kind_complex, - typename component_type<T>::type, T>::type type; -}; - -template <class T> -struct complex_result_from_scalar; - -template <class T> -struct is_unsigned_number : public mpl::false_{}; -template <class Backend, expression_template_option ExpressionTemplates> -struct is_unsigned_number<number<Backend, ExpressionTemplates> > : public is_unsigned_number<Backend> {}; -template <class T> -struct is_signed_number : public mpl::bool_<!is_unsigned_number<T>::value> {}; -template <class T> -struct is_interval_number : public mpl::false_ {}; -template <class Backend, expression_template_option ExpressionTemplates> -struct is_interval_number<number<Backend, ExpressionTemplates> > : public is_interval_number<Backend>{}; - -}} - -namespace boost{ namespace math{ namespace tools{ - -template <class T> -struct promote_arg; - -template <class tag, class A1, class A2, class A3, class A4> -struct promote_arg<boost::multiprecision::detail::expression<tag, A1, A2, A3, A4> > -{ - typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type type; -}; - -template <class R, class B, boost::multiprecision::expression_template_option ET> -inline R real_cast(const boost::multiprecision::number<B, ET>& val) -{ - return val.template convert_to<R>(); -} - -template <class R, class tag, class A1, class A2, class A3, class A4> -inline R real_cast(const boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>& val) -{ - typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type val_type; - return val_type(val).template convert_to<R>(); -} - - -} - -namespace constants{ - - template <class T> - struct is_explicitly_convertible_from_string; - - template <class B, boost::multiprecision::expression_template_option ET> - struct is_explicitly_convertible_from_string<boost::multiprecision::number<B, ET> > - { - static const bool value = true; - }; - -} - -}} -# 11 "/usr/include/boost/multiprecision/traits/is_variable_precision.hpp" 2 3 4 - -namespace boost{ namespace multiprecision{ namespace detail{ - - template <class Backend> - struct is_variable_precision : public false_type{}; - - template <class Backend, expression_template_option ExpressionTemplates> - struct is_variable_precision<number<Backend, ExpressionTemplates> > : public is_variable_precision<Backend> {}; - -} -} -} -# 10 "/usr/include/boost/multiprecision/detail/precision.hpp" 2 3 4 - -# 1 "/usr/include/boost/multiprecision/detail/digits.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/digits.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace detail{ - -inline unsigned long digits10_2_2(unsigned long d10) -{ - return (d10 * 1000uL) / 301uL + ((d10 * 1000uL) % 301 ? 2u : 1u); -} - -inline unsigned long digits2_2_10(unsigned long d2) -{ - return (d2 * 301uL) / 1000uL; -} - -}}} -# 12 "/usr/include/boost/multiprecision/detail/precision.hpp" 2 3 4 - -namespace boost{ namespace multiprecision{ namespace detail{ - - template <class B, boost::multiprecision::expression_template_option ET> - inline constexpr unsigned current_precision_of_last_chance_imp(const boost::multiprecision::number<B, ET>&, const mpl::false_&) - { - return std::numeric_limits<boost::multiprecision::number<B, ET> >::digits10; - } - template <class B, boost::multiprecision::expression_template_option ET> - inline unsigned current_precision_of_last_chance_imp(const boost::multiprecision::number<B, ET>& val, const mpl::true_&) - { - - - - - - - return val.is_zero() ? 1 : digits2_2_10(msb(abs(val)) - lsb(abs(val)) + 1); - } - - - template <class B, boost::multiprecision::expression_template_option ET> - inline unsigned current_precision_of_imp(const boost::multiprecision::number<B, ET>& n, const mpl::true_&) - { - return n.precision(); - } - template <class B, boost::multiprecision::expression_template_option ET> - inline constexpr unsigned current_precision_of_imp(const boost::multiprecision::number<B, ET>& val, const mpl::false_&) - { - return current_precision_of_last_chance_imp(val, - mpl::bool_< - std::numeric_limits<boost::multiprecision::number<B, ET> >::is_specialized - && std::numeric_limits<boost::multiprecision::number<B, ET> >::is_integer - && std::numeric_limits<boost::multiprecision::number<B, ET> >::is_exact - && !std::numeric_limits<boost::multiprecision::number<B, ET> >::is_modulo>()); - } - - template <class Terminal> - inline constexpr unsigned current_precision_of(const Terminal&) - { - return std::numeric_limits<Terminal>::digits10; - } - - template <class Terminal, std::size_t N> - inline constexpr unsigned current_precision_of(const Terminal(&)[N]) - { - return 0; - } - - template <class B, boost::multiprecision::expression_template_option ET> - inline constexpr unsigned current_precision_of(const boost::multiprecision::number<B, ET>& n) - { - return current_precision_of_imp(n, boost::multiprecision::detail::is_variable_precision<boost::multiprecision::number<B, ET> >()); - } - - template<class tag, class Arg1> - inline constexpr unsigned current_precision_of(const expression<tag, Arg1, void, void, void>& expr) - { - return current_precision_of(expr.left_ref()); - } - - template<class Arg1> - inline constexpr unsigned current_precision_of(const expression<terminal, Arg1, void, void, void>& expr) - { - return current_precision_of(expr.value()); - } - - template <class tag, class Arg1, class Arg2> - inline constexpr unsigned current_precision_of(const expression<tag, Arg1, Arg2, void, void>& expr) - { - return (std::max)(current_precision_of(expr.left_ref()), current_precision_of(expr.right_ref())); - } - - template <class tag, class Arg1, class Arg2, class Arg3> - inline constexpr unsigned current_precision_of(const expression<tag, Arg1, Arg2, Arg3, void>& expr) - { - return (std::max)((std::max)(current_precision_of(expr.left_ref()), current_precision_of(expr.right_ref())), current_precision_of(expr.middle_ref())); - } - - - - - - - template <class R, bool = boost::multiprecision::detail::is_variable_precision<R>::value> - struct scoped_default_precision - { - template <class T> - constexpr scoped_default_precision(const T&) {} - template <class T, class U> - constexpr scoped_default_precision(const T&, const U&) {} - template <class T, class U, class V> - constexpr scoped_default_precision(const T&, const U&, const V&) {} - - - - - unsigned precision()const - { - (static_cast <bool> ("This function should never be called!!" == 0) ? void (0) : __assert_fail ("\"This function should never be called!!\" == 0", "/usr/include/boost/multiprecision/detail/precision.hpp", 111, __extension__ __PRETTY_FUNCTION__)); - return 0; - } - }; - - - - - - template <class R> - struct scoped_default_precision<R, true> - { - template <class T> - constexpr scoped_default_precision(const T& a) - { - init(current_precision_of(a)); - } - template <class T, class U> - constexpr scoped_default_precision(const T& a, const U& b) - { - init((std::max)(current_precision_of(a), current_precision_of(b))); - } - template <class T, class U, class V> - constexpr scoped_default_precision(const T& a, const U& b, const V& c) - { - init((std::max)((std::max)(current_precision_of(a), current_precision_of(b)), current_precision_of(c))); - } - ~scoped_default_precision() - { - R::default_precision(m_old_prec); - } - constexpr unsigned precision()const - { - return m_new_prec; - } - private: - constexpr void init(unsigned p) - { - m_old_prec = R::default_precision(); - if (p) - { - R::default_precision(p); - m_new_prec = p; - } - else - m_new_prec = m_old_prec; - } - unsigned m_old_prec, m_new_prec; - }; - - template <class T> - inline void maybe_promote_precision(T*, const mpl::false_&){} - - template <class T> - inline void maybe_promote_precision(T* obj, const mpl::true_&) - { - if (obj->precision() != T::default_precision()) - { - obj->precision(T::default_precision()); - } - } - - template <class T> - inline void maybe_promote_precision(T* obj) - { - maybe_promote_precision(obj, boost::multiprecision::detail::is_variable_precision<T>()); - } -# 186 "/usr/include/boost/multiprecision/detail/precision.hpp" 3 4 -} -} -} -# 25 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 -# 1 "/usr/include/boost/math/policies/error_handling.hpp" 1 3 4 -# 14 "/usr/include/boost/math/policies/error_handling.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 15 "/usr/include/boost/math/policies/error_handling.hpp" 2 3 4 - -# 1 "/usr/include/c++/9.2.0/cerrno" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cerrno" 3 4 - -# 40 "/usr/include/c++/9.2.0/cerrno" 3 -# 17 "/usr/include/boost/math/policies/error_handling.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/math/tools/precision.hpp" 1 3 4 -# 14 "/usr/include/boost/math/tools/precision.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 15 "/usr/include/boost/math/tools/precision.hpp" 2 3 4 - - - - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 23 "/usr/include/boost/math/tools/precision.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/math.h" 1 3 4 -# 24 "/usr/include/boost/math/tools/precision.hpp" 2 3 4 - -namespace boost{ namespace math -{ -namespace tools -{ -# 41 "/usr/include/boost/math/tools/precision.hpp" 3 4 -template <class T> -inline constexpr int digits() noexcept -{ - - static_assert(::std::numeric_limits<T>::is_specialized, "::std::numeric_limits<T>::is_specialized"); - static_assert(::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10, "::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10"); - - - - - return std::numeric_limits<T>::radix == 2 - ? std::numeric_limits<T>::digits - : ((std::numeric_limits<T>::digits + 1) * 1000L) / 301L; -} - -template <class T> -inline constexpr T max_value() noexcept(std::is_floating_point<T>::value) -{ - - static_assert(::std::numeric_limits<T>::is_specialized, "::std::numeric_limits<T>::is_specialized"); - - - - return (std::numeric_limits<T>::max)(); -} - - -template <class T> -inline constexpr T min_value() noexcept(std::is_floating_point<T>::value) -{ - - static_assert(::std::numeric_limits<T>::is_specialized, "::std::numeric_limits<T>::is_specialized"); - - - - return (std::numeric_limits<T>::min)(); -} - -namespace detail{ -# 88 "/usr/include/boost/math/tools/precision.hpp" 3 4 -template <class T> -inline constexpr T log_max_value(const mpl::int_<128>& ) noexcept(std::is_floating_point<T>::value) -{ - return 88.0f; -} - -template <class T> -inline constexpr T log_min_value(const mpl::int_<128>& ) noexcept(std::is_floating_point<T>::value) -{ - return -87.0f; -} - - - -template <class T> -inline constexpr T log_max_value(const mpl::int_<1024>& ) noexcept(std::is_floating_point<T>::value) -{ - return 709.0; -} - -template <class T> -inline constexpr T log_min_value(const mpl::int_<1024>& ) noexcept(std::is_floating_point<T>::value) -{ - return -708.0; -} - - - -template <class T> -inline constexpr T log_max_value(const mpl::int_<16384>& ) noexcept(std::is_floating_point<T>::value) -{ - return 11356.0L; -} - -template <class T> -inline constexpr T log_min_value(const mpl::int_<16384>& ) noexcept(std::is_floating_point<T>::value) -{ - return -11355.0L; -} - -template <class T> -inline T log_max_value(const mpl::int_<0>& ) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - - static const T val = log(boost::math::tools::max_value<T>()); - - return val; -} - -template <class T> -inline T log_min_value(const mpl::int_<0>& ) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - - static const T val = log(boost::math::tools::min_value<T>()); - - return val; -} - -template <class T> -inline constexpr T epsilon(const mpl::true_& ) noexcept(std::is_floating_point<T>::value) -{ - return std::numeric_limits<T>::epsilon(); -} -# 180 "/usr/include/boost/math/tools/precision.hpp" 3 4 -template <class T> -inline T epsilon(const mpl::false_& ) -{ - - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - return ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >()); -} - -template <class T> -struct log_limit_traits -{ - typedef typename mpl::if_c< - (std::numeric_limits<T>::radix == 2) && - (std::numeric_limits<T>::max_exponent == 128 - || std::numeric_limits<T>::max_exponent == 1024 - || std::numeric_limits<T>::max_exponent == 16384), - mpl::int_<(std::numeric_limits<T>::max_exponent > 0x7fffffff ? 0x7fffffff : static_cast<int>(std::numeric_limits<T>::max_exponent))>, - mpl::int_<0> - >::type tag_type; - static const bool value = tag_type::value ? true : false; - static_assert(::std::numeric_limits<T>::is_specialized || (value == 0), "::std::numeric_limits<T>::is_specialized || (value == 0)"); -}; - -template <class T, bool b> struct log_limit_noexcept_traits_imp : public log_limit_traits<T> {}; -template <class T> struct log_limit_noexcept_traits_imp<T, false> : public boost::integral_constant<bool, false> {}; - -template <class T> -struct log_limit_noexcept_traits : public log_limit_noexcept_traits_imp<T, (std::is_floating_point<T>::value)> {}; - -} - - - - - - -template <class T> -inline constexpr T log_max_value() noexcept((detail::log_limit_noexcept_traits<T>::value)) -{ - - return detail::log_max_value<T>(typename detail::log_limit_traits<T>::tag_type()); - - - - - - -} - -template <class T> -inline constexpr T log_min_value() noexcept((detail::log_limit_noexcept_traits<T>::value)) -{ - - return detail::log_min_value<T>(typename detail::log_limit_traits<T>::tag_type()); - - - - - - -} - - - - - -template <class T> -inline constexpr T epsilon() noexcept(std::is_floating_point<T>::value) -{ - - return detail::epsilon<T>(mpl::bool_< ::std::numeric_limits<T>::is_specialized>()); - - - - - -} - -namespace detail{ - -template <class T> -inline constexpr T root_epsilon_imp(const mpl::int_<24>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.00034526698300124390839884978618400831996329879769945L); -} - -template <class T> -inline constexpr T root_epsilon_imp(const T*, const mpl::int_<53>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.1490116119384765625e-7L); -} - -template <class T> -inline constexpr T root_epsilon_imp(const T*, const mpl::int_<64>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.32927225399135962333569506281281311031656150598474e-9L); -} - -template <class T> -inline constexpr T root_epsilon_imp(const T*, const mpl::int_<113>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.1387778780781445675529539585113525390625e-16L); -} - -template <class T, class Tag> -inline T root_epsilon_imp(const T*, const Tag&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - static const T r_eps = sqrt(tools::epsilon<T>()); - return r_eps; -} - -template <class T> -inline T root_epsilon_imp(const T*, const mpl::int_<0>&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - return sqrt(tools::epsilon<T>()); -} - -template <class T> -inline constexpr T cbrt_epsilon_imp(const mpl::int_<24>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.0049215666011518482998719164346805794944150447839903L); -} - -template <class T> -inline constexpr T cbrt_epsilon_imp(const T*, const mpl::int_<53>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(6.05545445239333906078989272793696693569753008995e-6L); -} - -template <class T> -inline constexpr T cbrt_epsilon_imp(const T*, const mpl::int_<64>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(4.76837158203125e-7L); -} - -template <class T> -inline constexpr T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(5.7749313854154005630396773604745549542403508090496e-12L); -} - -template <class T, class Tag> -inline T cbrt_epsilon_imp(const T*, const Tag&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf;; - static const T cbrt_eps = pow(tools::epsilon<T>(), T(1) / 3); - return cbrt_eps; -} - -template <class T> -inline T cbrt_epsilon_imp(const T*, const mpl::int_<0>&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf;; - return pow(tools::epsilon<T>(), T(1) / 3); -} - -template <class T> -inline constexpr T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.018581361171917516667460937040007436176452688944747L); -} - -template <class T> -inline constexpr T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.0001220703125L); -} - -template <class T> -inline constexpr T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.18145860519450699870567321328132261891067079047605e-4L); -} - -template <class T> -inline constexpr T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) noexcept(std::is_floating_point<T>::value) -{ - return static_cast<T>(0.37252902984619140625e-8L); -} - -template <class T, class Tag> -inline T forth_root_epsilon_imp(const T*, const Tag&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - static const T r_eps = sqrt(sqrt(tools::epsilon<T>())); - return r_eps; -} - -template <class T> -inline T forth_root_epsilon_imp(const T*, const mpl::int_<0>&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - return sqrt(sqrt(tools::epsilon<T>())); -} - -template <class T> -struct root_epsilon_traits -{ - typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) && (::std::numeric_limits<T>::digits != 0x7fffffff) ? std::numeric_limits<T>::digits : 0> tag_type; - static const bool has_noexcept = (tag_type::value == 113) || (tag_type::value == 64) || (tag_type::value == 53) || (tag_type::value == 24); -}; - -} - -template <class T> -inline constexpr T root_epsilon() noexcept(((std::is_floating_point<T>::value) && detail::root_epsilon_traits<T>::has_noexcept)) -{ - return detail::root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type()); -} - -template <class T> -inline constexpr T cbrt_epsilon() noexcept(((std::is_floating_point<T>::value) && detail::root_epsilon_traits<T>::has_noexcept)) -{ - return detail::cbrt_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type()); -} - -template <class T> -inline constexpr T forth_root_epsilon() noexcept(((std::is_floating_point<T>::value) && detail::root_epsilon_traits<T>::has_noexcept)) -{ - return detail::forth_root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type()); -} - -} -} -} -# 23 "/usr/include/boost/math/policies/error_handling.hpp" 2 3 4 - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 25 "/usr/include/boost/math/policies/error_handling.hpp" 2 3 4 -# 37 "/usr/include/boost/math/policies/error_handling.hpp" 3 4 -namespace boost{ namespace math{ - -class evaluation_error : public std::runtime_error -{ -public: - evaluation_error(const std::string& s) : std::runtime_error(s){} -}; - -class rounding_error : public std::runtime_error -{ -public: - rounding_error(const std::string& s) : std::runtime_error(s){} -}; - -namespace policies{ - - - - -template <class T> -T user_domain_error(const char* function, const char* message, const T& val); -template <class T> -T user_pole_error(const char* function, const char* message, const T& val); -template <class T> -T user_overflow_error(const char* function, const char* message, const T& val); -template <class T> -T user_underflow_error(const char* function, const char* message, const T& val); -template <class T> -T user_denorm_error(const char* function, const char* message, const T& val); -template <class T> -T user_evaluation_error(const char* function, const char* message, const T& val); -template <class T, class TargetType> -T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t); -template <class T> -T user_indeterminate_result_error(const char* function, const char* message, const T& val); - -namespace detail -{ - -template <class T> -std::string prec_format(const T& val) -{ - typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type prec_type; - std::stringstream ss; - if(prec_type::value) - { - int prec = 2 + (prec_type::value * 30103UL) / 100000UL; - ss << std::setprecision(prec); - } - ss << val; - return ss.str(); -} - -inline void replace_all_in_string(std::string& result, const char* what, const char* with) -{ - std::string::size_type pos = 0; - std::string::size_type slen = std::strlen(what); - std::string::size_type rlen = std::strlen(with); - while((pos = result.find(what, pos)) != std::string::npos) - { - result.replace(pos, slen, with); - pos += rlen; - } -} - -template <class T> -inline const char* name_of() -{ - - return typeid(T).name(); - - - -} -template <> inline const char* name_of<float>(){ return "float"; } -template <> inline const char* name_of<double>(){ return "double"; } -template <> inline const char* name_of<long double>(){ return "long double"; } - - -template <> -inline const char* name_of<__float128>() -{ - return "__float128"; -} - - -template <class E, class T> -void raise_error(const char* pfunction, const char* message) -{ - if(pfunction == 0) - pfunction = "Unknown function operating on type %1%"; - if(message == 0) - message = "Cause unknown"; - - std::string function(pfunction); - std::string msg("Error in function "); - - replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>()); - - - - msg += function; - msg += ": "; - msg += message; - - E e(msg); - boost::throw_exception(e); -} - -template <class E, class T> -void raise_error(const char* pfunction, const char* pmessage, const T& val) -{ - if(pfunction == 0) - pfunction = "Unknown function operating on type %1%"; - if(pmessage == 0) - pmessage = "Cause unknown: error caused by bad argument with value %1%"; - - std::string function(pfunction); - std::string message(pmessage); - std::string msg("Error in function "); - - replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>()); - - - - msg += function; - msg += ": "; - - std::string sval = prec_format(val); - replace_all_in_string(message, "%1%", sval.c_str()); - msg += message; - - E e(msg); - boost::throw_exception(e); -} - -template <class T> -inline T raise_domain_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::domain_error, T>(function, message, val); - - return std::numeric_limits<T>::quiet_NaN(); -} - -template <class T> -inline constexpr T raise_domain_error( - const char* , - const char* , - const T& , - const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return std::numeric_limits<T>::quiet_NaN(); -} - -template <class T> -inline T raise_domain_error( - const char* , - const char* , - const T& , - const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 33; - - - return std::numeric_limits<T>::quiet_NaN(); -} - -template <class T> -inline T raise_domain_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::domain_error< ::boost::math::policies::user_error>&) -{ - return user_domain_error(function, message, val); -} - -template <class T> -inline T raise_pole_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::pole_error< ::boost::math::policies::throw_on_error>&) -{ - return boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>()); -} - -template <class T> -inline constexpr T raise_pole_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::pole_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>()); -} - -template <class T> -inline constexpr T raise_pole_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>()); -} - -template <class T> -inline T raise_pole_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::pole_error< ::boost::math::policies::user_error>&) -{ - return user_pole_error(function, message, val); -} - - -template <class T> -inline T raise_overflow_error( - const char* function, - const char* message, - const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::overflow_error, T>(function, message ? message : "numeric overflow"); - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline T raise_overflow_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::overflow_error, T>(function, message ? message : "numeric overflow", val); - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline constexpr T raise_overflow_error( - const char* , - const char* , - const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline constexpr T raise_overflow_error( - const char* , - const char* , - const T&, - const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline T raise_overflow_error( - const char* , - const char* , - const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline T raise_overflow_error( - const char* , - const char* , - const T&, - const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>(); -} - -template <class T> -inline T raise_overflow_error( - const char* function, - const char* message, - const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&) -{ - return user_overflow_error(function, message, std::numeric_limits<T>::infinity()); -} - -template <class T> -inline T raise_overflow_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&) -{ - std::string m(message ? message : ""); - std::string sval = prec_format(val); - replace_all_in_string(m, "%1%", sval.c_str()); - - return user_overflow_error(function, m.c_str(), std::numeric_limits<T>::infinity()); -} - -template <class T> -inline T raise_underflow_error( - const char* function, - const char* message, - const ::boost::math::policies::underflow_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::underflow_error, T>(function, message ? message : "numeric underflow"); - - return 0; -} - -template <class T> -inline constexpr T raise_underflow_error( - const char* , - const char* , - const ::boost::math::policies::underflow_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return T(0); -} - -template <class T> -inline T raise_underflow_error( - const char* , - const char* , - const ::boost::math::policies::underflow_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - return T(0); -} - -template <class T> -inline T raise_underflow_error( - const char* function, - const char* message, - const ::boost::math::policies::underflow_error< ::boost::math::policies::user_error>&) -{ - return user_underflow_error(function, message, T(0)); -} - -template <class T> -inline T raise_denorm_error( - const char* function, - const char* message, - const T& , - const ::boost::math::policies::denorm_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::underflow_error, T>(function, message ? message : "denormalised result"); - - return T(0); -} - -template <class T> -inline constexpr T raise_denorm_error( - const char* , - const char* , - const T& val, - const ::boost::math::policies::denorm_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return val; -} - -template <class T> -inline T raise_denorm_error( - const char* , - const char* , - const T& val, - const ::boost::math::policies::denorm_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - return val; -} - -template <class T> -inline T raise_denorm_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::denorm_error< ::boost::math::policies::user_error>&) -{ - return user_denorm_error(function, message, val); -} - -template <class T> -inline T raise_evaluation_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::evaluation_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<boost::math::evaluation_error, T>(function, message, val); - - return T(0); -} - -template <class T> -inline constexpr T raise_evaluation_error( - const char* , - const char* , - const T& val, - const ::boost::math::policies::evaluation_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return val; -} - -template <class T> -inline T raise_evaluation_error( - const char* , - const char* , - const T& val, - const ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 33; - - - return val; -} - -template <class T> -inline T raise_evaluation_error( - const char* function, - const char* message, - const T& val, - const ::boost::math::policies::evaluation_error< ::boost::math::policies::user_error>&) -{ - return user_evaluation_error(function, message, val); -} - -template <class T, class TargetType> -inline TargetType raise_rounding_error( - const char* function, - const char* message, - const T& val, - const TargetType&, - const ::boost::math::policies::rounding_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<boost::math::rounding_error, T>(function, message, val); - - return TargetType(0); -} - -template <class T, class TargetType> -inline constexpr TargetType raise_rounding_error( - const char* , - const char* , - const T& val, - const TargetType&, - const ::boost::math::policies::rounding_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - static_assert(std::numeric_limits<TargetType>::is_specialized, "std::numeric_limits<TargetType>::is_specialized"); - return val > 0 ? (std::numeric_limits<TargetType>::max)() : (std::numeric_limits<TargetType>::is_integer ? (std::numeric_limits<TargetType>::min)() : -(std::numeric_limits<TargetType>::max)()); -} - -template <class T, class TargetType> -inline TargetType raise_rounding_error( - const char* , - const char* , - const T& val, - const TargetType&, - const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - static_assert(std::numeric_limits<TargetType>::is_specialized, "std::numeric_limits<TargetType>::is_specialized"); - return val > 0 ? (std::numeric_limits<TargetType>::max)() : (std::numeric_limits<TargetType>::is_integer ? (std::numeric_limits<TargetType>::min)() : -(std::numeric_limits<TargetType>::max)()); -} - -template <class T> -inline T raise_rounding_error( - const char* , - const char* , - const T& val, - const T&, - const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) noexcept(std::is_floating_point<T>::value) -{ - (*__errno_location ()) = 34; - - - return val > 0 ? boost::math::tools::max_value<T>() : -boost::math::tools::max_value<T>(); -} - -template <class T, class TargetType> -inline TargetType raise_rounding_error( - const char* function, - const char* message, - const T& val, - const TargetType& t, - const ::boost::math::policies::rounding_error< ::boost::math::policies::user_error>&) -{ - return user_rounding_error(function, message, val, t); -} - -template <class T, class R> -inline T raise_indeterminate_result_error( - const char* function, - const char* message, - const T& val, - const R& , - const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::throw_on_error>&) -{ - raise_error<std::domain_error, T>(function, message, val); - - return std::numeric_limits<T>::quiet_NaN(); -} - -template <class T, class R> -inline constexpr T raise_indeterminate_result_error( - const char* , - const char* , - const T& , - const R& result, - const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::ignore_error>&) noexcept(std::is_floating_point<T>::value) -{ - - - return result; -} - -template <class T, class R> -inline T raise_indeterminate_result_error( - const char* , - const char* , - const T& , - const R& result, - const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::errno_on_error>&) -{ - (*__errno_location ()) = 33; - - - return result; -} - -template <class T, class R> -inline T raise_indeterminate_result_error( - const char* function, - const char* message, - const T& val, - const R& , - const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::user_error>&) -{ - return user_indeterminate_result_error(function, message, val); -} - -} - -template <class T, class Policy> -inline constexpr T raise_domain_error(const char* function, const char* message, const T& val, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::domain_error_type policy_type; - return detail::raise_domain_error( - function, message ? message : "Domain Error evaluating function at %1%", - val, policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_pole_error(const char* function, const char* message, const T& val, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::pole_error_type policy_type; - return detail::raise_pole_error( - function, message ? message : "Evaluation of function at pole %1%", - val, policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_overflow_error(const char* function, const char* message, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::overflow_error_type policy_type; - return detail::raise_overflow_error<T>( - function, message ? message : "Overflow Error", - policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_overflow_error(const char* function, const char* message, const T& val, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::overflow_error_type policy_type; - return detail::raise_overflow_error( - function, message ? message : "Overflow evaluating function at %1%", - val, policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_underflow_error(const char* function, const char* message, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::underflow_error_type policy_type; - return detail::raise_underflow_error<T>( - function, message ? message : "Underflow Error", - policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_denorm_error(const char* function, const char* message, const T& val, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::denorm_error_type policy_type; - return detail::raise_denorm_error<T>( - function, message ? message : "Denorm Error", - val, - policy_type()); -} - -template <class T, class Policy> -inline constexpr T raise_evaluation_error(const char* function, const char* message, const T& val, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::evaluation_error_type policy_type; - return detail::raise_evaluation_error( - function, message ? message : "Internal Evaluation Error, best value so far was %1%", - val, policy_type()); -} - -template <class T, class TargetType, class Policy> -inline constexpr TargetType raise_rounding_error(const char* function, const char* message, const T& val, const TargetType& t, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::rounding_error_type policy_type; - return detail::raise_rounding_error( - function, message ? message : "Value %1% can not be represented in the target integer type.", - val, t, policy_type()); -} - -template <class T, class R, class Policy> -inline constexpr T raise_indeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) noexcept((is_noexcept_error_policy<Policy>::value && (std::is_floating_point<T>::value))) -{ - typedef typename Policy::indeterminate_result_error_type policy_type; - return detail::raise_indeterminate_result_error( - function, message ? message : "Indeterminate result with value %1%", - val, result, policy_type()); -} - - - - -namespace detail -{ - -template <class R, class T, class Policy> -inline bool check_overflow(T val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - if(fabs(val) > tools::max_value<R>()) - { - boost::math::policies::detail::raise_overflow_error<R>(function, 0, pol); - *result = static_cast<R>(val); - return true; - } - return false; -} -template <class R, class T, class Policy> -inline bool check_overflow(std::complex<T> val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - typedef typename R::value_type r_type; - r_type re, im; - bool r = check_overflow<r_type>(val.real(), &re, function, pol); - r = check_overflow<r_type>(val.imag(), &im, function, pol) || r; - *result = R(re, im); - return r; -} -template <class R, class T, class Policy> -inline bool check_underflow(T val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - if((val != 0) && (static_cast<R>(val) == 0)) - { - *result = static_cast<R>(boost::math::policies::detail::raise_underflow_error<R>(function, 0, pol)); - return true; - } - return false; -} -template <class R, class T, class Policy> -inline bool check_underflow(std::complex<T> val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - typedef typename R::value_type r_type; - r_type re, im; - bool r = check_underflow<r_type>(val.real(), &re, function, pol); - r = check_underflow<r_type>(val.imag(), &im, function, pol) || r; - *result = R(re, im); - return r; -} -template <class R, class T, class Policy> -inline bool check_denorm(T val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - if((fabs(val) < static_cast<T>(tools::min_value<R>())) && (static_cast<R>(val) != 0)) - { - *result = static_cast<R>(boost::math::policies::detail::raise_denorm_error<R>(function, 0, static_cast<R>(val), pol)); - return true; - } - return false; -} -template <class R, class T, class Policy> -inline bool check_denorm(std::complex<T> val, R* result, const char* function, const Policy& pol) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && (Policy::value != throw_on_error) && (Policy::value != user_error))) -{ - typedef typename R::value_type r_type; - r_type re, im; - bool r = check_denorm<r_type>(val.real(), &re, function, pol); - r = check_denorm<r_type>(val.imag(), &im, function, pol) || r; - *result = R(re, im); - return r; -} - - -template <class R, class T> -inline constexpr bool check_overflow(T , R* , const char* , const overflow_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } -template <class R, class T> -inline constexpr bool check_overflow(std::complex<T> , R* , const char* , const overflow_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } -template <class R, class T> -inline constexpr bool check_underflow(T , R* , const char* , const underflow_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } -template <class R, class T> -inline constexpr bool check_underflow(std::complex<T> , R* , const char* , const underflow_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } -template <class R, class T> -inline constexpr bool check_denorm(T , R* , const char* , const denorm_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } -template <class R, class T> -inline constexpr bool check_denorm(std::complex<T> , R* , const char* , const denorm_error<ignore_error>&) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value))) -{ return false; } - -} - -template <class R, class Policy, class T> -inline R checked_narrowing_cast(T val, const char* function) noexcept(((std::is_floating_point<R>::value) && (std::is_floating_point<T>::value) && is_noexcept_error_policy<Policy>::value)) -{ - typedef typename Policy::overflow_error_type overflow_type; - typedef typename Policy::underflow_error_type underflow_type; - typedef typename Policy::denorm_error_type denorm_type; - - - - R result = 0; - if(detail::check_overflow<R>(val, &result, function, overflow_type())) - return result; - if(detail::check_underflow<R>(val, &result, function, underflow_type())) - return result; - if(detail::check_denorm<R>(val, &result, function, denorm_type())) - return result; - - return static_cast<R>(val); -} - -template <class T, class Policy> -inline void check_series_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) noexcept(((std::is_floating_point<T>::value) && is_noexcept_error_policy<Policy>::value)) -{ - if(max_iter >= policies::get_max_series_iterations<Policy>()) - raise_evaluation_error<T>( - function, - "Series evaluation exceeded %1% iterations, giving up now.", static_cast<T>(static_cast<double>(max_iter)), pol); -} - -template <class T, class Policy> -inline void check_root_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) noexcept(((std::is_floating_point<T>::value) && is_noexcept_error_policy<Policy>::value)) -{ - if(max_iter >= policies::get_max_root_iterations<Policy>()) - raise_evaluation_error<T>( - function, - "Root finding evaluation exceeded %1% iterations, giving up now.", static_cast<T>(static_cast<double>(max_iter)), pol); -} - -} - -namespace detail{ - - - - - -template <class T> -std::pair<T, T> pair_from_single(const T& val) noexcept(std::is_floating_point<T>::value) -{ - return std::make_pair(val, val); -} - -} - - - - - -}} -# 10 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 - - -# 1 "/usr/include/boost/math/special_functions/next.hpp" 1 3 4 -# 17 "/usr/include/boost/math/special_functions/next.hpp" 3 4 -# 1 "/usr/include/boost/math/special_functions/trunc.hpp" 1 3 4 -# 20 "/usr/include/boost/math/special_functions/trunc.hpp" 3 4 -namespace boost{ namespace math{ namespace detail{ - -template <class T, class Policy> -inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol, const mpl::false_&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - typedef typename tools::promote_args<T>::type result_type; - if(!(boost::math::isfinite)(v)) - return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol); - return (v >= 0) ? static_cast<result_type>(floor(v)) : static_cast<result_type>(ceil(v)); -} - -template <class T, class Policy> -inline typename tools::promote_args<T>::type trunc(const T& v, const Policy&, const mpl::true_&) -{ - return v; -} - -} - -template <class T, class Policy> -inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol) -{ - return detail::trunc(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>()); -} -template <class T> -inline typename tools::promote_args<T>::type trunc(const T& v) -{ - return trunc(v, policies::policy<>()); -} -# 59 "/usr/include/boost/math/special_functions/trunc.hpp" 3 4 -template <class T, class Policy> -inline int itrunc(const T& v, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - typedef typename tools::promote_args<T>::type result_type; - result_type r = boost::math::trunc(v, pol); - if((r > (std::numeric_limits<int>::max)()) || (r < (std::numeric_limits<int>::min)())) - return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0, pol)); - return static_cast<int>(r); -} -template <class T> -inline int itrunc(const T& v) -{ - return itrunc(v, policies::policy<>()); -} - -template <class T, class Policy> -inline long ltrunc(const T& v, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - typedef typename tools::promote_args<T>::type result_type; - result_type r = boost::math::trunc(v, pol); - if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)())) - return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0L, pol)); - return static_cast<long>(r); -} -template <class T> -inline long ltrunc(const T& v) -{ - return ltrunc(v, policies::policy<>()); -} - - - -template <class T, class Policy> -inline boost::long_long_type lltrunc(const T& v, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - typedef typename tools::promote_args<T>::type result_type; - result_type r = boost::math::trunc(v, pol); - if((r > (std::numeric_limits<boost::long_long_type>::max)()) || (r < (std::numeric_limits<boost::long_long_type>::min)())) - return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, static_cast<boost::long_long_type>(0), pol)); - return static_cast<boost::long_long_type>(r); -} -template <class T> -inline boost::long_long_type lltrunc(const T& v) -{ - return lltrunc(v, policies::policy<>()); -} - - - -template <class T, class Policy> -inline typename boost::enable_if_c<boost::is_constructible<int, T>::value, int>::type - iconvert(const T& v, const Policy&) -{ - return static_cast<int>(v); -} - -template <class T, class Policy> -inline typename boost::disable_if_c<boost::is_constructible<int, T>::value, int>::type - iconvert(const T& v, const Policy& pol) -{ - using boost::math::itrunc; - return itrunc(v, pol); -} - -template <class T, class Policy> -inline typename boost::enable_if_c<boost::is_constructible<long, T>::value, long>::type - lconvert(const T& v, const Policy&) -{ - return static_cast<long>(v); -} - -template <class T, class Policy> -inline typename boost::disable_if_c<boost::is_constructible<long, T>::value, long>::type - lconvert(const T& v, const Policy& pol) -{ - using boost::math::ltrunc; - return ltrunc(v, pol); -} - - - -template <class T, class Policy> -inline typename boost::enable_if_c<boost::is_constructible<boost::long_long_type, T>::value, boost::long_long_type>::type - llconvertert(const T& v, const Policy&) -{ - return static_cast<boost::long_long_type>(v); -} - -template <class T, class Policy> -inline typename boost::disable_if_c<boost::is_constructible<boost::long_long_type, T>::value, boost::long_long_type>::type - llconvertert(const T& v, const Policy& pol) -{ - using boost::math::lltrunc; - return lltrunc(v, pol); -} - - - -}} -# 18 "/usr/include/boost/math/special_functions/next.hpp" 2 3 4 - - - - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 1 3 4 -# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mmintrin.h" 1 3 4 -# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mmintrin.h" 3 4 -typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); - - -typedef int __m64_u __attribute__ ((__vector_size__ (8), __may_alias__, __aligned__ (1))); - - -typedef int __v2si __attribute__ ((__vector_size__ (8))); -typedef short __v4hi __attribute__ ((__vector_size__ (8))); -typedef char __v8qi __attribute__ ((__vector_size__ (8))); -typedef long long __v1di __attribute__ ((__vector_size__ (8))); -typedef float __v2sf __attribute__ ((__vector_size__ (8))); - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_empty (void) -{ - __builtin_ia32_emms (); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_empty (void) -{ - _mm_empty (); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi32_si64 (int __i) -{ - return (__m64) __builtin_ia32_vec_init_v2si (__i, 0); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_from_int (int __i) -{ - return _mm_cvtsi32_si64 (__i); -} - - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_from_int64 (long long __i) -{ - return (__m64) __i; -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_m64 (long long __i) -{ - return (__m64) __i; -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64x_si64 (long long __i) -{ - return (__m64) __i; -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pi64x (long long __i) -{ - return (__m64) __i; -} - - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_si32 (__m64 __i) -{ - return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_to_int (__m64 __i) -{ - return _mm_cvtsi64_si32 (__i); -} - - - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_to_int64 (__m64 __i) -{ - return (long long)__i; -} - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtm64_si64 (__m64 __i) -{ - return (long long)__i; -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_si64x (__m64 __i) -{ - return (long long)__i; -} - - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packs_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_packsswb (__m64 __m1, __m64 __m2) -{ - return _mm_packs_pi16 (__m1, __m2); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packs_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_packssdw (__m64 __m1, __m64 __m2) -{ - return _mm_packs_pi32 (__m1, __m2); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packs_pu16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_packuswb (__m64 __m1, __m64 __m2) -{ - return _mm_packs_pu16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpckhbw (__m64 __m1, __m64 __m2) -{ - return _mm_unpackhi_pi8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpckhwd (__m64 __m1, __m64 __m2) -{ - return _mm_unpackhi_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpckhdq (__m64 __m1, __m64 __m2) -{ - return _mm_unpackhi_pi32 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpcklbw (__m64 __m1, __m64 __m2) -{ - return _mm_unpacklo_pi8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpcklwd ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpcklwd (__m64 __m1, __m64 __m2) -{ - return _mm_unpacklo_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_punpckldq ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_punpckldq (__m64 __m1, __m64 __m2) -{ - return _mm_unpacklo_pi32 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddb (__m64 __m1, __m64 __m2) -{ - return _mm_add_pi8 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddw (__m64 __m1, __m64 __m2) -{ - return _mm_add_pi16 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddd ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddd (__m64 __m1, __m64 __m2) -{ - return _mm_add_pi32 (__m1, __m2); -} -# 322 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mmintrin.h" 3 4 -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_si64 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddq ((__v1di)__m1, (__v1di)__m2); -} - - - - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddsb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddsb (__m64 __m1, __m64 __m2) -{ - return _mm_adds_pi8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddsw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddsw (__m64 __m1, __m64 __m2) -{ - return _mm_adds_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_pu8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddusb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddusb (__m64 __m1, __m64 __m2) -{ - return _mm_adds_pu8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_pu16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_paddusw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_paddusw (__m64 __m1, __m64 __m2) -{ - return _mm_adds_pu16 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubb (__m64 __m1, __m64 __m2) -{ - return _mm_sub_pi8 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubw (__m64 __m1, __m64 __m2) -{ - return _mm_sub_pi16 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubd ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubd (__m64 __m1, __m64 __m2) -{ - return _mm_sub_pi32 (__m1, __m2); -} -# 434 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mmintrin.h" 3 4 -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_si64 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubq ((__v1di)__m1, (__v1di)__m2); -} - - - - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubsb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubsb (__m64 __m1, __m64 __m2) -{ - return _mm_subs_pi8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubsw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubsw (__m64 __m1, __m64 __m2) -{ - return _mm_subs_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_pu8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubusb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubusb (__m64 __m1, __m64 __m2) -{ - return _mm_subs_pu8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_pu16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_psubusw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psubusw (__m64 __m1, __m64 __m2) -{ - return _mm_subs_pu16 (__m1, __m2); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_madd_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pmaddwd ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmaddwd (__m64 __m1, __m64 __m2) -{ - return _mm_madd_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mulhi_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pmulhw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmulhw (__m64 __m1, __m64 __m2) -{ - return _mm_mulhi_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mullo_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pmullw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmullw (__m64 __m1, __m64 __m2) -{ - return _mm_mullo_pi16 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_pi16 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psllw ((__v4hi)__m, (__v4hi)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psllw (__m64 __m, __m64 __count) -{ - return _mm_sll_pi16 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_pi16 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psllwi ((__v4hi)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psllwi (__m64 __m, int __count) -{ - return _mm_slli_pi16 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_pi32 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_pslld ((__v2si)__m, (__v2si)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pslld (__m64 __m, __m64 __count) -{ - return _mm_sll_pi32 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_pi32 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_pslldi ((__v2si)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pslldi (__m64 __m, int __count) -{ - return _mm_slli_pi32 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_si64 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psllq ((__v1di)__m, (__v1di)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psllq (__m64 __m, __m64 __count) -{ - return _mm_sll_si64 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_si64 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psllqi ((__v1di)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psllqi (__m64 __m, int __count) -{ - return _mm_slli_si64 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sra_pi16 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psraw ((__v4hi)__m, (__v4hi)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psraw (__m64 __m, __m64 __count) -{ - return _mm_sra_pi16 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srai_pi16 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psrawi ((__v4hi)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrawi (__m64 __m, int __count) -{ - return _mm_srai_pi16 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sra_pi32 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psrad ((__v2si)__m, (__v2si)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrad (__m64 __m, __m64 __count) -{ - return _mm_sra_pi32 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srai_pi32 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psradi ((__v2si)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psradi (__m64 __m, int __count) -{ - return _mm_srai_pi32 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_pi16 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psrlw ((__v4hi)__m, (__v4hi)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrlw (__m64 __m, __m64 __count) -{ - return _mm_srl_pi16 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_pi16 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psrlwi ((__v4hi)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrlwi (__m64 __m, int __count) -{ - return _mm_srli_pi16 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_pi32 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psrld ((__v2si)__m, (__v2si)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrld (__m64 __m, __m64 __count) -{ - return _mm_srl_pi32 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_pi32 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psrldi ((__v2si)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrldi (__m64 __m, int __count) -{ - return _mm_srli_pi32 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_si64 (__m64 __m, __m64 __count) -{ - return (__m64) __builtin_ia32_psrlq ((__v1di)__m, (__v1di)__count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrlq (__m64 __m, __m64 __count) -{ - return _mm_srl_si64 (__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_si64 (__m64 __m, int __count) -{ - return (__m64) __builtin_ia32_psrlqi ((__v1di)__m, __count); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psrlqi (__m64 __m, int __count) -{ - return _mm_srli_si64 (__m, __count); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_and_si64 (__m64 __m1, __m64 __m2) -{ - return __builtin_ia32_pand (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pand (__m64 __m1, __m64 __m2) -{ - return _mm_and_si64 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_andnot_si64 (__m64 __m1, __m64 __m2) -{ - return __builtin_ia32_pandn (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pandn (__m64 __m1, __m64 __m2) -{ - return _mm_andnot_si64 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_or_si64 (__m64 __m1, __m64 __m2) -{ - return __builtin_ia32_por (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_por (__m64 __m1, __m64 __m2) -{ - return _mm_or_si64 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_xor_si64 (__m64 __m1, __m64 __m2) -{ - return __builtin_ia32_pxor (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pxor (__m64 __m1, __m64 __m2) -{ - return _mm_xor_si64 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpeqb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpeqb (__m64 __m1, __m64 __m2) -{ - return _mm_cmpeq_pi8 (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_pi8 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpgtb ((__v8qi)__m1, (__v8qi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpgtb (__m64 __m1, __m64 __m2) -{ - return _mm_cmpgt_pi8 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpeqw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpeqw (__m64 __m1, __m64 __m2) -{ - return _mm_cmpeq_pi16 (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_pi16 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpgtw ((__v4hi)__m1, (__v4hi)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpgtw (__m64 __m1, __m64 __m2) -{ - return _mm_cmpgt_pi16 (__m1, __m2); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpeqd ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpeqd (__m64 __m1, __m64 __m2) -{ - return _mm_cmpeq_pi32 (__m1, __m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) -{ - return (__m64) __builtin_ia32_pcmpgtd ((__v2si)__m1, (__v2si)__m2); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pcmpgtd (__m64 __m1, __m64 __m2) -{ - return _mm_cmpgt_pi32 (__m1, __m2); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setzero_si64 (void) -{ - return (__m64)0LL; -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pi32 (int __i1, int __i0) -{ - return (__m64) __builtin_ia32_vec_init_v2si (__i0, __i1); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pi16 (short __w3, short __w2, short __w1, short __w0) -{ - return (__m64) __builtin_ia32_vec_init_v4hi (__w0, __w1, __w2, __w3); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pi8 (char __b7, char __b6, char __b5, char __b4, - char __b3, char __b2, char __b1, char __b0) -{ - return (__m64) __builtin_ia32_vec_init_v8qi (__b0, __b1, __b2, __b3, - __b4, __b5, __b6, __b7); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_pi32 (int __i0, int __i1) -{ - return _mm_set_pi32 (__i1, __i0); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_pi16 (short __w0, short __w1, short __w2, short __w3) -{ - return _mm_set_pi16 (__w3, __w2, __w1, __w0); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_pi8 (char __b0, char __b1, char __b2, char __b3, - char __b4, char __b5, char __b6, char __b7) -{ - return _mm_set_pi8 (__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_pi32 (int __i) -{ - return _mm_set_pi32 (__i, __i); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_pi16 (short __w) -{ - return _mm_set_pi16 (__w, __w, __w, __w); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_pi8 (char __b) -{ - return _mm_set_pi8 (__b, __b, __b, __b, __b, __b, __b, __b); -} -# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 2 3 4 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mm_malloc.h" 1 3 4 -# 27 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mm_malloc.h" 3 4 -# 1 "/usr/include/c++/9.2.0/stdlib.h" 1 3 4 -# 28 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/mm_malloc.h" 2 3 4 - - - - - - -extern "C" int posix_memalign (void **, size_t, size_t) throw (); - - -static __inline void * -_mm_malloc (size_t __size, size_t __alignment) -{ - void *__ptr; - if (__alignment == 1) - return malloc (__size); - if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4)) - __alignment = sizeof (void *); - if (posix_memalign (&__ptr, __alignment, __size) == 0) - return __ptr; - else - return __null; -} - -static __inline void -_mm_free (void *__ptr) -{ - free (__ptr); -} -# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 2 3 4 - - -enum _mm_hint -{ - - _MM_HINT_ET0 = 7, - _MM_HINT_ET1 = 6, - _MM_HINT_T0 = 3, - _MM_HINT_T1 = 2, - _MM_HINT_T2 = 1, - _MM_HINT_NTA = 0 -}; -# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); - - -typedef float __m128_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); - - -typedef float __v4sf __attribute__ ((__vector_size__ (16))); -# 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_undefined_ps (void) -{ - __m128 __Y = __Y; - return __Y; -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setzero_ps (void) -{ - return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f }; -} - - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_subss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_div_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_divss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sqrt_ss (__m128 __A) -{ - return (__m128) __builtin_ia32_sqrtss ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_rcp_ss (__m128 __A) -{ - return (__m128) __builtin_ia32_rcpss ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_rsqrt_ss (__m128 __A) -{ - return (__m128) __builtin_ia32_rsqrtss ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_minss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_maxss ((__v4sf)__A, (__v4sf)__B); -} - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_ps (__m128 __A, __m128 __B) -{ - return (__m128) ((__v4sf)__A + (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_ps (__m128 __A, __m128 __B) -{ - return (__m128) ((__v4sf)__A - (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_ps (__m128 __A, __m128 __B) -{ - return (__m128) ((__v4sf)__A * (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_div_ps (__m128 __A, __m128 __B) -{ - return (__m128) ((__v4sf)__A / (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sqrt_ps (__m128 __A) -{ - return (__m128) __builtin_ia32_sqrtps ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_rcp_ps (__m128 __A) -{ - return (__m128) __builtin_ia32_rcpps ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_rsqrt_ps (__m128 __A) -{ - return (__m128) __builtin_ia32_rsqrtps ((__v4sf)__A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_minps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_maxps ((__v4sf)__A, (__v4sf)__B); -} - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_and_ps (__m128 __A, __m128 __B) -{ - return __builtin_ia32_andps (__A, __B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_andnot_ps (__m128 __A, __m128 __B) -{ - return __builtin_ia32_andnps (__A, __B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_or_ps (__m128 __A, __m128 __B) -{ - return __builtin_ia32_orps (__A, __B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_xor_ps (__m128 __A, __m128 __B) -{ - return __builtin_ia32_xorps (__A, __B); -} - - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpeqss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpltss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmple_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpless ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movss ((__v4sf) __A, - (__v4sf) - __builtin_ia32_cmpltss ((__v4sf) __B, - (__v4sf) - __A)); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpge_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movss ((__v4sf) __A, - (__v4sf) - __builtin_ia32_cmpless ((__v4sf) __B, - (__v4sf) - __A)); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpneq_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpneqss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnlt_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpnltss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnle_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpnless ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpngt_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movss ((__v4sf) __A, - (__v4sf) - __builtin_ia32_cmpnltss ((__v4sf) __B, - (__v4sf) - __A)); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnge_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movss ((__v4sf) __A, - (__v4sf) - __builtin_ia32_cmpnless ((__v4sf) __B, - (__v4sf) - __A)); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpord_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpordss ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpunord_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpunordss ((__v4sf)__A, (__v4sf)__B); -} - - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpeqps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpltps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmple_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpleps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpge_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpneq_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpneqps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnlt_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpnltps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnle_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpnleps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpngt_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnge_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpngeps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpord_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpordps ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpunord_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_cmpunordps ((__v4sf)__A, (__v4sf)__B); -} - - - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comieq_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comieq ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comilt_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comilt ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comile_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comile ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comigt_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comigt ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comige_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comige ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comineq_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_comineq ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomieq_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomieq ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomilt_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomilt ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomile_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomile ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomigt_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomigt ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomige_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomige ((__v4sf)__A, (__v4sf)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomineq_ss (__m128 __A, __m128 __B) -{ - return __builtin_ia32_ucomineq ((__v4sf)__A, (__v4sf)__B); -} - - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtss_si32 (__m128 __A) -{ - return __builtin_ia32_cvtss2si ((__v4sf) __A); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvt_ss2si (__m128 __A) -{ - return _mm_cvtss_si32 (__A); -} - - - - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtss_si64 (__m128 __A) -{ - return __builtin_ia32_cvtss2si64 ((__v4sf) __A); -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtss_si64x (__m128 __A) -{ - return __builtin_ia32_cvtss2si64 ((__v4sf) __A); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtps_pi32 (__m128 __A) -{ - return (__m64) __builtin_ia32_cvtps2pi ((__v4sf) __A); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvt_ps2pi (__m128 __A) -{ - return _mm_cvtps_pi32 (__A); -} - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttss_si32 (__m128 __A) -{ - return __builtin_ia32_cvttss2si ((__v4sf) __A); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtt_ss2si (__m128 __A) -{ - return _mm_cvttss_si32 (__A); -} - - - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttss_si64 (__m128 __A) -{ - return __builtin_ia32_cvttss2si64 ((__v4sf) __A); -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttss_si64x (__m128 __A) -{ - return __builtin_ia32_cvttss2si64 ((__v4sf) __A); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttps_pi32 (__m128 __A) -{ - return (__m64) __builtin_ia32_cvttps2pi ((__v4sf) __A); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtt_ps2pi (__m128 __A) -{ - return _mm_cvttps_pi32 (__A); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi32_ss (__m128 __A, int __B) -{ - return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvt_si2ss (__m128 __A, int __B) -{ - return _mm_cvtsi32_ss (__A, __B); -} - - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_ss (__m128 __A, long long __B) -{ - return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64x_ss (__m128 __A, long long __B) -{ - return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); -} - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpi32_ps (__m128 __A, __m64 __B) -{ - return (__m128) __builtin_ia32_cvtpi2ps ((__v4sf) __A, (__v2si)__B); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvt_pi2ps (__m128 __A, __m64 __B) -{ - return _mm_cvtpi32_ps (__A, __B); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpi16_ps (__m64 __A) -{ - __v4hi __sign; - __v2si __hisi, __losi; - __v4sf __zero, __ra, __rb; - - - - - __sign = __builtin_ia32_pcmpgtw ((__v4hi)0LL, (__v4hi)__A); - - - __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); - __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, __sign); - - - __zero = (__v4sf) _mm_setzero_ps (); - __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); - __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); - - return (__m128) __builtin_ia32_movlhps (__ra, __rb); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpu16_ps (__m64 __A) -{ - __v2si __hisi, __losi; - __v4sf __zero, __ra, __rb; - - - __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); - __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, (__v4hi)0LL); - - - __zero = (__v4sf) _mm_setzero_ps (); - __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); - __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); - - return (__m128) __builtin_ia32_movlhps (__ra, __rb); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpi8_ps (__m64 __A) -{ - __v8qi __sign; - - - - - __sign = __builtin_ia32_pcmpgtb ((__v8qi)0LL, (__v8qi)__A); - - - __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, __sign); - - return _mm_cvtpi16_ps(__A); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpu8_ps(__m64 __A) -{ - __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, (__v8qi)0LL); - return _mm_cvtpu16_ps(__A); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpi32x2_ps(__m64 __A, __m64 __B) -{ - __v4sf __zero = (__v4sf) _mm_setzero_ps (); - __v4sf __sfa = __builtin_ia32_cvtpi2ps (__zero, (__v2si)__A); - __v4sf __sfb = __builtin_ia32_cvtpi2ps (__sfa, (__v2si)__B); - return (__m128) __builtin_ia32_movlhps (__sfa, __sfb); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtps_pi16(__m128 __A) -{ - __v4sf __hisf = (__v4sf)__A; - __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); - __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); - __v2si __losi = __builtin_ia32_cvtps2pi (__losf); - return (__m64) __builtin_ia32_packssdw (__hisi, __losi); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtps_pi8(__m128 __A) -{ - __v4hi __tmp = (__v4hi) _mm_cvtps_pi16 (__A); - return (__m64) __builtin_ia32_packsswb (__tmp, (__v4hi)0LL); -} -# 755 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_unpckhps ((__v4sf)__A, (__v4sf)__B); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_unpcklps ((__v4sf)__A, (__v4sf)__B); -} - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadh_pi (__m128 __A, __m64 const *__P) -{ - return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeh_pi (__m64 *__P, __m128 __A) -{ - __builtin_ia32_storehps ((__v2sf *)__P, (__v4sf)__A); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movehl_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movelh_ps (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B); -} - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadl_pi (__m128 __A, __m64 const *__P) -{ - return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storel_pi (__m64 *__P, __m128 __A) -{ - __builtin_ia32_storelps ((__v2sf *)__P, (__v4sf)__A); -} - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movemask_ps (__m128 __A) -{ - return __builtin_ia32_movmskps ((__v4sf)__A); -} - - -extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_getcsr (void) -{ - return __builtin_ia32_stmxcsr (); -} - - -extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_GET_EXCEPTION_STATE (void) -{ - return _mm_getcsr() & 0x003f; -} - -extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_GET_EXCEPTION_MASK (void) -{ - return _mm_getcsr() & 0x1f80; -} - -extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_GET_ROUNDING_MODE (void) -{ - return _mm_getcsr() & 0x6000; -} - -extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_GET_FLUSH_ZERO_MODE (void) -{ - return _mm_getcsr() & 0x8000; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setcsr (unsigned int __I) -{ - __builtin_ia32_ldmxcsr (__I); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_SET_EXCEPTION_STATE(unsigned int __mask) -{ - _mm_setcsr((_mm_getcsr() & ~0x003f) | __mask); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_SET_EXCEPTION_MASK (unsigned int __mask) -{ - _mm_setcsr((_mm_getcsr() & ~0x1f80) | __mask); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_SET_ROUNDING_MODE (unsigned int __mode) -{ - _mm_setcsr((_mm_getcsr() & ~0x6000) | __mode); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_MM_SET_FLUSH_ZERO_MODE (unsigned int __mode) -{ - _mm_setcsr((_mm_getcsr() & ~0x8000) | __mode); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_ss (float __F) -{ - return __extension__ (__m128)(__v4sf){ __F, 0.0f, 0.0f, 0.0f }; -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_ps (float __F) -{ - return __extension__ (__m128)(__v4sf){ __F, __F, __F, __F }; -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_ps1 (float __F) -{ - return _mm_set1_ps (__F); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_ss (float const *__P) -{ - return _mm_set_ss (*__P); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load1_ps (float const *__P) -{ - return _mm_set1_ps (*__P); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_ps1 (float const *__P) -{ - return _mm_load1_ps (__P); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_ps (float const *__P) -{ - return *(__m128 *)__P; -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadu_ps (float const *__P) -{ - return *(__m128_u *)__P; -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadr_ps (float const *__P) -{ - __v4sf __tmp = *(__v4sf *)__P; - return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_ps (const float __Z, const float __Y, const float __X, const float __W) -{ - return __extension__ (__m128)(__v4sf){ __W, __X, __Y, __Z }; -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_ps (float __Z, float __Y, float __X, float __W) -{ - return __extension__ (__m128)(__v4sf){ __Z, __Y, __X, __W }; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_ss (float *__P, __m128 __A) -{ - *__P = ((__v4sf)__A)[0]; -} - -extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtss_f32 (__m128 __A) -{ - return ((__v4sf)__A)[0]; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_ps (float *__P, __m128 __A) -{ - *(__m128 *)__P = __A; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeu_ps (float *__P, __m128 __A) -{ - *(__m128_u *)__P = __A; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store1_ps (float *__P, __m128 __A) -{ - __v4sf __va = (__v4sf)__A; - __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0))); - _mm_storeu_ps (__P, __tmp); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_ps1 (float *__P, __m128 __A) -{ - _mm_store1_ps (__P, __A); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storer_ps (float *__P, __m128 __A) -{ - __v4sf __va = (__v4sf)__A; - __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); - _mm_store_ps (__P, __tmp); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_move_ss (__m128 __A, __m128 __B) -{ - return (__m128) __builtin_shuffle ((__v4sf)__A, (__v4sf)__B, - __extension__ - (__attribute__((__vector_size__ (16))) int) - {4,1,2,3}); -} -# 1063 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_pi16 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pmaxsw ((__v4hi)__A, (__v4hi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmaxsw (__m64 __A, __m64 __B) -{ - return _mm_max_pi16 (__A, __B); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_pu8 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pmaxub ((__v8qi)__A, (__v8qi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmaxub (__m64 __A, __m64 __B) -{ - return _mm_max_pu8 (__A, __B); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_pi16 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pminsw ((__v4hi)__A, (__v4hi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pminsw (__m64 __A, __m64 __B) -{ - return _mm_min_pi16 (__A, __B); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_pu8 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pminub ((__v8qi)__A, (__v8qi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pminub (__m64 __A, __m64 __B) -{ - return _mm_min_pu8 (__A, __B); -} - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movemask_pi8 (__m64 __A) -{ - return __builtin_ia32_pmovmskb ((__v8qi)__A); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmovmskb (__m64 __A) -{ - return _mm_movemask_pi8 (__A); -} - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mulhi_pu16 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pmulhuw ((__v4hi)__A, (__v4hi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pmulhuw (__m64 __A, __m64 __B) -{ - return _mm_mulhi_pu16 (__A, __B); -} -# 1165 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_maskmove_si64 (__m64 __A, __m64 __N, char *__P) -{ - __builtin_ia32_maskmovq ((__v8qi)__A, (__v8qi)__N, __P); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_maskmovq (__m64 __A, __m64 __N, char *__P) -{ - _mm_maskmove_si64 (__A, __N, __P); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_avg_pu8 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pavgb ((__v8qi)__A, (__v8qi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pavgb (__m64 __A, __m64 __B) -{ - return _mm_avg_pu8 (__A, __B); -} - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_avg_pu16 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_pavgw ((__v4hi)__A, (__v4hi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_pavgw (__m64 __A, __m64 __B) -{ - return _mm_avg_pu16 (__A, __B); -} - - - - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sad_pu8 (__m64 __A, __m64 __B) -{ - return (__m64) __builtin_ia32_psadbw ((__v8qi)__A, (__v8qi)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_m_psadbw (__m64 __A, __m64 __B) -{ - return _mm_sad_pu8 (__A, __B); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_pi (__m64 *__P, __m64 __A) -{ - __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_ps (float *__P, __m128 __A) -{ - __builtin_ia32_movntps (__P, (__v4sf)__A); -} - - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sfence (void) -{ - __builtin_ia32_sfence (); -} -# 1255 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 1 3 4 -# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 1 3 4 -# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 2 3 4 -# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -typedef double __v2df __attribute__ ((__vector_size__ (16))); -typedef long long __v2di __attribute__ ((__vector_size__ (16))); -typedef unsigned long long __v2du __attribute__ ((__vector_size__ (16))); -typedef int __v4si __attribute__ ((__vector_size__ (16))); -typedef unsigned int __v4su __attribute__ ((__vector_size__ (16))); -typedef short __v8hi __attribute__ ((__vector_size__ (16))); -typedef unsigned short __v8hu __attribute__ ((__vector_size__ (16))); -typedef char __v16qi __attribute__ ((__vector_size__ (16))); -typedef signed char __v16qs __attribute__ ((__vector_size__ (16))); -typedef unsigned char __v16qu __attribute__ ((__vector_size__ (16))); - - - -typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); -typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); - - -typedef long long __m128i_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); -typedef double __m128d_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); - - - - - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_sd (double __F) -{ - return __extension__ (__m128d){ __F, 0.0 }; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_pd (double __F) -{ - return __extension__ (__m128d){ __F, __F }; -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pd1 (double __F) -{ - return _mm_set1_pd (__F); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_pd (double __W, double __X) -{ - return __extension__ (__m128d){ __X, __W }; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_pd (double __W, double __X) -{ - return __extension__ (__m128d){ __W, __X }; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_undefined_pd (void) -{ - __m128d __Y = __Y; - return __Y; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setzero_pd (void) -{ - return __extension__ (__m128d){ 0.0, 0.0 }; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_move_sd (__m128d __A, __m128d __B) -{ - return __extension__ (__m128d) __builtin_shuffle ((__v2df)__A, (__v2df)__B, (__v2di){2, 1}); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_pd (double const *__P) -{ - return *(__m128d *)__P; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadu_pd (double const *__P) -{ - return *(__m128d_u *)__P; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load1_pd (double const *__P) -{ - return _mm_set1_pd (*__P); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_sd (double const *__P) -{ - return _mm_set_sd (*__P); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_pd1 (double const *__P) -{ - return _mm_load1_pd (__P); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadr_pd (double const *__P) -{ - __m128d __tmp = _mm_load_pd (__P); - return __builtin_ia32_shufpd (__tmp, __tmp, (((0) << 1) | (1))); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_pd (double *__P, __m128d __A) -{ - *(__m128d *)__P = __A; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeu_pd (double *__P, __m128d __A) -{ - *(__m128d_u *)__P = __A; -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_sd (double *__P, __m128d __A) -{ - *__P = ((__v2df)__A)[0]; -} - -extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsd_f64 (__m128d __A) -{ - return ((__v2df)__A)[0]; -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storel_pd (double *__P, __m128d __A) -{ - _mm_store_sd (__P, __A); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeh_pd (double *__P, __m128d __A) -{ - *__P = ((__v2df)__A)[1]; -} - - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store1_pd (double *__P, __m128d __A) -{ - _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (0)))); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_pd1 (double *__P, __m128d __A) -{ - _mm_store1_pd (__P, __A); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storer_pd (double *__P, __m128d __A) -{ - _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (1)))); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi128_si32 (__m128i __A) -{ - return __builtin_ia32_vec_ext_v4si ((__v4si)__A, 0); -} - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi128_si64 (__m128i __A) -{ - return ((__v2di)__A)[0]; -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi128_si64x (__m128i __A) -{ - return ((__v2di)__A)[0]; -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_pd (__m128d __A, __m128d __B) -{ - return (__m128d) ((__v2df)__A + (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_pd (__m128d __A, __m128d __B) -{ - return (__m128d) ((__v2df)__A - (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_pd (__m128d __A, __m128d __B) -{ - return (__m128d) ((__v2df)__A * (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_div_pd (__m128d __A, __m128d __B) -{ - return (__m128d) ((__v2df)__A / (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_div_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sqrt_pd (__m128d __A) -{ - return (__m128d)__builtin_ia32_sqrtpd ((__v2df)__A); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sqrt_sd (__m128d __A, __m128d __B) -{ - __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); - return (__m128d)__builtin_ia32_sqrtsd ((__v2df)__tmp); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_minpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_minsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_maxpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_maxsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_and_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_andnot_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_or_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_xor_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpeqpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmple_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpge_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpneq_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpneqpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnlt_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpnltpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnle_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpnlepd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpngt_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnge_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpord_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpordpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpunord_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpunordpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpeqsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpltsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmple_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmplesd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_sd (__m128d __A, __m128d __B) -{ - return (__m128d) __builtin_ia32_movsd ((__v2df) __A, - (__v2df) - __builtin_ia32_cmpltsd ((__v2df) __B, - (__v2df) - __A)); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpge_sd (__m128d __A, __m128d __B) -{ - return (__m128d) __builtin_ia32_movsd ((__v2df) __A, - (__v2df) - __builtin_ia32_cmplesd ((__v2df) __B, - (__v2df) - __A)); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpneq_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpneqsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnlt_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpnltsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnle_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpnlesd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpngt_sd (__m128d __A, __m128d __B) -{ - return (__m128d) __builtin_ia32_movsd ((__v2df) __A, - (__v2df) - __builtin_ia32_cmpnltsd ((__v2df) __B, - (__v2df) - __A)); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpnge_sd (__m128d __A, __m128d __B) -{ - return (__m128d) __builtin_ia32_movsd ((__v2df) __A, - (__v2df) - __builtin_ia32_cmpnlesd ((__v2df) __B, - (__v2df) - __A)); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpord_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpordsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpunord_sd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_cmpunordsd ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comieq_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdeq ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comilt_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdlt ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comile_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdle ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comigt_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdgt ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comige_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdge ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_comineq_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_comisdneq ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomieq_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdeq ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomilt_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdlt ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomile_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdle ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomigt_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdgt ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomige_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdge ((__v2df)__A, (__v2df)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_ucomineq_sd (__m128d __A, __m128d __B) -{ - return __builtin_ia32_ucomisdneq ((__v2df)__A, (__v2df)__B); -} - - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_epi64x (long long __q1, long long __q0) -{ - return __extension__ (__m128i)(__v2di){ __q0, __q1 }; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_epi64 (__m64 __q1, __m64 __q0) -{ - return _mm_set_epi64x ((long long)__q1, (long long)__q0); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_epi32 (int __q3, int __q2, int __q1, int __q0) -{ - return __extension__ (__m128i)(__v4si){ __q0, __q1, __q2, __q3 }; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_epi16 (short __q7, short __q6, short __q5, short __q4, - short __q3, short __q2, short __q1, short __q0) -{ - return __extension__ (__m128i)(__v8hi){ - __q0, __q1, __q2, __q3, __q4, __q5, __q6, __q7 }; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set_epi8 (char __q15, char __q14, char __q13, char __q12, - char __q11, char __q10, char __q09, char __q08, - char __q07, char __q06, char __q05, char __q04, - char __q03, char __q02, char __q01, char __q00) -{ - return __extension__ (__m128i)(__v16qi){ - __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, - __q08, __q09, __q10, __q11, __q12, __q13, __q14, __q15 - }; -} - - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_epi64x (long long __A) -{ - return _mm_set_epi64x (__A, __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_epi64 (__m64 __A) -{ - return _mm_set_epi64 (__A, __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_epi32 (int __A) -{ - return _mm_set_epi32 (__A, __A, __A, __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_epi16 (short __A) -{ - return _mm_set_epi16 (__A, __A, __A, __A, __A, __A, __A, __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_set1_epi8 (char __A) -{ - return _mm_set_epi8 (__A, __A, __A, __A, __A, __A, __A, __A, - __A, __A, __A, __A, __A, __A, __A, __A); -} - - - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_epi64 (__m64 __q0, __m64 __q1) -{ - return _mm_set_epi64 (__q1, __q0); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_epi32 (int __q0, int __q1, int __q2, int __q3) -{ - return _mm_set_epi32 (__q3, __q2, __q1, __q0); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_epi16 (short __q0, short __q1, short __q2, short __q3, - short __q4, short __q5, short __q6, short __q7) -{ - return _mm_set_epi16 (__q7, __q6, __q5, __q4, __q3, __q2, __q1, __q0); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setr_epi8 (char __q00, char __q01, char __q02, char __q03, - char __q04, char __q05, char __q06, char __q07, - char __q08, char __q09, char __q10, char __q11, - char __q12, char __q13, char __q14, char __q15) -{ - return _mm_set_epi8 (__q15, __q14, __q13, __q12, __q11, __q10, __q09, __q08, - __q07, __q06, __q05, __q04, __q03, __q02, __q01, __q00); -} - - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_load_si128 (__m128i const *__P) -{ - return *__P; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadu_si128 (__m128i_u const *__P) -{ - return *__P; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadl_epi64 (__m128i_u const *__P) -{ - return _mm_set_epi64 ((__m64)0LL, *(__m64_u *)__P); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadu_si64 (void const *__P) -{ - return _mm_loadl_epi64 ((__m128i_u *)__P); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_store_si128 (__m128i *__P, __m128i __B) -{ - *__P = __B; -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeu_si128 (__m128i_u *__P, __m128i __B) -{ - *__P = __B; -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storel_epi64 (__m128i_u *__P, __m128i __B) -{ - *(__m64_u *)__P = (__m64) ((__v2di)__B)[0]; -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_storeu_si64 (void *__P, __m128i __B) -{ - _mm_storel_epi64 ((__m128i_u *)__P, __B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movepi64_pi64 (__m128i __B) -{ - return (__m64) ((__v2di)__B)[0]; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movpi64_epi64 (__m64 __A) -{ - return _mm_set_epi64 ((__m64)0LL, __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_move_epi64 (__m128i __A) -{ - return (__m128i)__builtin_ia32_movq128 ((__v2di) __A); -} - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_undefined_si128 (void) -{ - __m128i __Y = __Y; - return __Y; -} - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_setzero_si128 (void) -{ - return __extension__ (__m128i)(__v4si){ 0, 0, 0, 0 }; -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtepi32_pd (__m128i __A) -{ - return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtepi32_ps (__m128i __A) -{ - return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpd_epi32 (__m128d __A) -{ - return (__m128i)__builtin_ia32_cvtpd2dq ((__v2df) __A); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpd_pi32 (__m128d __A) -{ - return (__m64)__builtin_ia32_cvtpd2pi ((__v2df) __A); -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpd_ps (__m128d __A) -{ - return (__m128)__builtin_ia32_cvtpd2ps ((__v2df) __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttpd_epi32 (__m128d __A) -{ - return (__m128i)__builtin_ia32_cvttpd2dq ((__v2df) __A); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttpd_pi32 (__m128d __A) -{ - return (__m64)__builtin_ia32_cvttpd2pi ((__v2df) __A); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtpi32_pd (__m64 __A) -{ - return (__m128d)__builtin_ia32_cvtpi2pd ((__v2si) __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtps_epi32 (__m128 __A) -{ - return (__m128i)__builtin_ia32_cvtps2dq ((__v4sf) __A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttps_epi32 (__m128 __A) -{ - return (__m128i)__builtin_ia32_cvttps2dq ((__v4sf) __A); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtps_pd (__m128 __A) -{ - return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsd_si32 (__m128d __A) -{ - return __builtin_ia32_cvtsd2si ((__v2df) __A); -} - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsd_si64 (__m128d __A) -{ - return __builtin_ia32_cvtsd2si64 ((__v2df) __A); -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsd_si64x (__m128d __A) -{ - return __builtin_ia32_cvtsd2si64 ((__v2df) __A); -} - - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttsd_si32 (__m128d __A) -{ - return __builtin_ia32_cvttsd2si ((__v2df) __A); -} - - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttsd_si64 (__m128d __A) -{ - return __builtin_ia32_cvttsd2si64 ((__v2df) __A); -} - - -extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvttsd_si64x (__m128d __A) -{ - return __builtin_ia32_cvttsd2si64 ((__v2df) __A); -} - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsd_ss (__m128 __A, __m128d __B) -{ - return (__m128)__builtin_ia32_cvtsd2ss ((__v4sf) __A, (__v2df) __B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi32_sd (__m128d __A, int __B) -{ - return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B); -} - - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_sd (__m128d __A, long long __B) -{ - return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64x_sd (__m128d __A, long long __B) -{ - return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); -} - - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtss_sd (__m128d __A, __m128 __B) -{ - return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B); -} -# 931 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_pd (__m128d __A, __m128d __B) -{ - return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadh_pd (__m128d __A, double const *__B) -{ - return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, __B); -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_loadl_pd (__m128d __A, double const *__B) -{ - return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, __B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movemask_pd (__m128d __A) -{ - return __builtin_ia32_movmskpd ((__v2df)__A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packs_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_packsswb128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packs_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_packssdw128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_packus_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_packuswb128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpackhi_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_unpacklo_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v16qu)__A + (__v16qu)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hu)__A + (__v8hu)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v4su)__A + (__v4su)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_add_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v2du)__A + (__v2du)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_adds_epu16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v16qu)__A - (__v16qu)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hu)__A - (__v8hu)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v4su)__A - (__v4su)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sub_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v2du)__A - (__v2du)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_subs_epu16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_madd_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmaddwd128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mulhi_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmulhw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mullo_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hu)__A * (__v8hu)__B); -} - -extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_su32 (__m64 __A, __m64 __B) -{ - return (__m64)__builtin_ia32_pmuludq ((__v2si)__A, (__v2si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mul_epu32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmuludq128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_epi16 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psllwi128 ((__v8hi)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_epi32 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_pslldi128 ((__v4si)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_slli_epi64 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psllqi128 ((__v2di)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srai_epi16 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psrawi128 ((__v8hi)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srai_epi32 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psradi128 ((__v4si)__A, __B); -} -# 1218 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_epi16 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psrlwi128 ((__v8hi)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_epi32 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psrldi128 ((__v4si)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srli_epi64 (__m128i __A, int __B) -{ - return (__m128i)__builtin_ia32_psrlqi128 ((__v2di)__A, __B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psllw128((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pslld128((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sll_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psllq128((__v2di)__A, (__v2di)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sra_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psraw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sra_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psrad128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psrlw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psrld128 ((__v4si)__A, (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_srl_epi64 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psrlq128 ((__v2di)__A, (__v2di)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_and_si128 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v2du)__A & (__v2du)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_andnot_si128 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_or_si128 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v2du)__A | (__v2du)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_xor_si128 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v2du)__A ^ (__v2du)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v16qs)__A == (__v16qs)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hi)__A == (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpeq_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v4si)__A == (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v16qs)__A < (__v16qs)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hi)__A < (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmplt_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v4si)__A < (__v4si)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_epi8 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v16qs)__A > (__v16qs)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v8hi)__A > (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cmpgt_epi32 (__m128i __A, __m128i __B) -{ - return (__m128i) ((__v4si)__A > (__v4si)__B); -} -# 1382 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_max_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_epi16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_min_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_movemask_epi8 (__m128i __A) -{ - return __builtin_ia32_pmovmskb128 ((__v16qi)__A); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mulhi_epu16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pmulhuw128 ((__v8hi)__A, (__v8hi)__B); -} -# 1445 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/emmintrin.h" 3 4 -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_maskmoveu_si128 (__m128i __A, __m128i __B, char *__C) -{ - __builtin_ia32_maskmovdqu ((__v16qi)__A, (__v16qi)__B, __C); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_avg_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pavgb128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_avg_epu16 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_pavgw128 ((__v8hi)__A, (__v8hi)__B); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_sad_epu8 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_psadbw128 ((__v16qi)__A, (__v16qi)__B); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_si32 (int *__A, int __B) -{ - __builtin_ia32_movnti (__A, __B); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_si64 (long long int *__A, long long int __B) -{ - __builtin_ia32_movnti64 (__A, __B); -} - - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_si128 (__m128i *__A, __m128i __B) -{ - __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_stream_pd (double *__A, __m128d __B) -{ - __builtin_ia32_movntpd (__A, (__v2df)__B); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_clflush (void const *__A) -{ - __builtin_ia32_clflush (__A); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_lfence (void) -{ - __builtin_ia32_lfence (); -} - -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_mfence (void) -{ - __builtin_ia32_mfence (); -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi32_si128 (int __A) -{ - return _mm_set_epi32 (0, 0, 0, __A); -} - - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64_si128 (long long __A) -{ - return _mm_set_epi64x (0, __A); -} - - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtsi64x_si128 (long long __A) -{ - return _mm_set_epi64x (0, __A); -} - - - - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castpd_ps(__m128d __A) -{ - return (__m128) __A; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castpd_si128(__m128d __A) -{ - return (__m128i) __A; -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castps_pd(__m128 __A) -{ - return (__m128d) __A; -} - -extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castps_si128(__m128 __A) -{ - return (__m128i) __A; -} - -extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castsi128_ps(__m128i __A) -{ - return (__m128) __A; -} - -extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_castsi128_pd(__m128i __A) -{ - return (__m128d) __A; -} -# 1256 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 2 3 4 -# 1267 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/xmmintrin.h" 3 4 -extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_pause (void) -{ - __builtin_ia32_pause (); -} -# 24 "/usr/include/boost/math/special_functions/next.hpp" 2 3 4 - - - - -namespace boost{ namespace math{ - - namespace concepts { - - class real_concept; - class std_real_concept; - - } - -namespace detail{ - -template <class T> -struct has_hidden_guard_digits; -template <> -struct has_hidden_guard_digits<float> : public mpl::false_ {}; -template <> -struct has_hidden_guard_digits<double> : public mpl::false_ {}; -template <> -struct has_hidden_guard_digits<long double> : public mpl::false_ {}; - -template <> -struct has_hidden_guard_digits<__float128> : public mpl::false_ {}; - -template <> -struct has_hidden_guard_digits<boost::math::concepts::real_concept> : public mpl::false_ {}; -template <> -struct has_hidden_guard_digits<boost::math::concepts::std_real_concept> : public mpl::false_ {}; - -template <class T, bool b> -struct has_hidden_guard_digits_10 : public mpl::false_ {}; -template <class T> -struct has_hidden_guard_digits_10<T, true> : public mpl::bool_<(std::numeric_limits<T>::digits10 != std::numeric_limits<T>::max_digits10)> {}; - -template <class T> -struct has_hidden_guard_digits - : public has_hidden_guard_digits_10<T, - std::numeric_limits<T>::is_specialized - && (std::numeric_limits<T>::radix == 10) > -{}; - -template <class T> -inline const T& normalize_value(const T& val, const mpl::false_&) { return val; } -template <class T> -inline T normalize_value(const T& val, const mpl::true_&) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - boost::intmax_t shift = (boost::intmax_t)std::numeric_limits<T>::digits - (boost::intmax_t)ilogb(val) - 1; - T result = scalbn(val, shift); - result = round(result); - return scalbn(result, -shift); -} - -template <class T> -inline T get_smallest_value(mpl::true_ const&) -{ - - - - - - static const T m = std::numeric_limits<T>::denorm_min(); - - return (_mm_getcsr() & (0x8000 | 0x40)) ? tools::min_value<T>() : m;; - - - -} - -template <class T> -inline T get_smallest_value(mpl::false_ const&) -{ - return tools::min_value<T>(); -} - -template <class T> -inline T get_smallest_value() -{ - - - - return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present)>()); - -} - - - - - -template <class T> -T get_min_shift_value(); - -template <class T> -struct min_shift_initializer -{ - struct init - { - init() - { - do_init(); - } - static void do_init() - { - get_min_shift_value<T>(); - } - void force_instantiate()const{} - }; - static const init initializer; - static void force_instantiate() - { - initializer.force_instantiate(); - } -}; - -template <class T> -const typename min_shift_initializer<T>::init min_shift_initializer<T>::initializer; - -template <class T> -inline T calc_min_shifted(const mpl::true_&) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - return ldexp(tools::min_value<T>(), tools::digits<T>() + 1); -} -template <class T> -inline T calc_min_shifted(const mpl::false_&) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - return scalbn(tools::min_value<T>(), std::numeric_limits<T>::digits + 1); -} - - -template <class T> -inline T get_min_shift_value() -{ - static const T val = calc_min_shifted<T>(mpl::bool_<!std::numeric_limits<T>::is_specialized || std::numeric_limits<T>::radix == 2>()); - min_shift_initializer<T>::force_instantiate(); - - return val; -} - -template <class T, class Policy> -T float_next_imp(const T& val, const mpl::true_&, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - int expon; - static const char* function = "float_next<%1%>(%1%)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - { - if(val < 0) - return -tools::max_value<T>(); - return policies::raise_domain_error<T>( - function, - "Argument must be finite, but got %1%", val, pol); - } - - if(val >= tools::max_value<T>()) - return policies::raise_overflow_error<T>(function, 0, pol); - - if(val == 0) - return detail::get_smallest_value<T>(); - - if((fpclass != (int)3) && (fpclass != (int)2) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>())) - { - - - - - - return ldexp(float_next(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>()); - } - - if(-0.5f == frexp(val, &expon)) - --expon; - T diff = ldexp(T(1), expon - tools::digits<T>()); - if(diff == 0) - diff = detail::get_smallest_value<T>(); - return val + diff; -} - - - -template <class T, class Policy> -T float_next_imp(const T& val, const mpl::false_&, const Policy& pol) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - boost::intmax_t expon; - static const char* function = "float_next<%1%>(%1%)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - { - if(val < 0) - return -tools::max_value<T>(); - return policies::raise_domain_error<T>( - function, - "Argument must be finite, but got %1%", val, pol); - } - - if(val >= tools::max_value<T>()) - return policies::raise_overflow_error<T>(function, 0, pol); - - if(val == 0) - return detail::get_smallest_value<T>(); - - if((fpclass != (int)3) && (fpclass != (int)2) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>())) - { - - - - - - return scalbn(float_next(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits); - } - - expon = 1 + ilogb(val); - if(-1 == scalbn(val, -expon) * std::numeric_limits<T>::radix) - --expon; - T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits); - if(diff == 0) - diff = detail::get_smallest_value<T>(); - return val + diff; -} - -} - -template <class T, class Policy> -inline typename tools::promote_args<T>::type float_next(const T& val, const Policy& pol) -{ - typedef typename tools::promote_args<T>::type result_type; - return detail::float_next_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol); -} -# 293 "/usr/include/boost/math/special_functions/next.hpp" 3 4 -template <class T> -inline typename tools::promote_args<T>::type float_next(const T& val) -{ - return float_next(val, policies::policy<>()); -} - -namespace detail{ - -template <class T, class Policy> -T float_prior_imp(const T& val, const mpl::true_&, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - int expon; - static const char* function = "float_prior<%1%>(%1%)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - { - if(val > 0) - return tools::max_value<T>(); - return policies::raise_domain_error<T>( - function, - "Argument must be finite, but got %1%", val, pol); - } - - if(val <= -tools::max_value<T>()) - return -policies::raise_overflow_error<T>(function, 0, pol); - - if(val == 0) - return -detail::get_smallest_value<T>(); - - if((fpclass != (int)3) && (fpclass != (int)2) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>())) - { - - - - - - return ldexp(float_prior(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>()); - } - - T remain = frexp(val, &expon); - if(remain == 0.5f) - --expon; - T diff = ldexp(T(1), expon - tools::digits<T>()); - if(diff == 0) - diff = detail::get_smallest_value<T>(); - return val - diff; -} - - - -template <class T, class Policy> -T float_prior_imp(const T& val, const mpl::false_&, const Policy& pol) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - boost::intmax_t expon; - static const char* function = "float_prior<%1%>(%1%)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - { - if(val > 0) - return tools::max_value<T>(); - return policies::raise_domain_error<T>( - function, - "Argument must be finite, but got %1%", val, pol); - } - - if(val <= -tools::max_value<T>()) - return -policies::raise_overflow_error<T>(function, 0, pol); - - if(val == 0) - return -detail::get_smallest_value<T>(); - - if((fpclass != (int)3) && (fpclass != (int)2) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>())) - { - - - - - - return scalbn(float_prior(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits); - } - - expon = 1 + ilogb(val); - T remain = scalbn(val, -expon); - if(remain * std::numeric_limits<T>::radix == 1) - --expon; - T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits); - if(diff == 0) - diff = detail::get_smallest_value<T>(); - return val - diff; -} - -} - -template <class T, class Policy> -inline typename tools::promote_args<T>::type float_prior(const T& val, const Policy& pol) -{ - typedef typename tools::promote_args<T>::type result_type; - return detail::float_prior_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol); -} -# 425 "/usr/include/boost/math/special_functions/next.hpp" 3 4 -template <class T> -inline typename tools::promote_args<T>::type float_prior(const T& val) -{ - return float_prior(val, policies::policy<>()); -} - -template <class T, class U, class Policy> -inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction, const Policy& pol) -{ - typedef typename tools::promote_args<T, U>::type result_type; - return val < direction ? boost::math::float_next<result_type>(val, pol) : val == direction ? val : boost::math::float_prior<result_type>(val, pol); -} - -template <class T, class U> -inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction) -{ - return nextafter(val, direction, policies::policy<>()); -} - -namespace detail{ - -template <class T, class Policy> -T float_distance_imp(const T& a, const T& b, const mpl::true_&, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - static const char* function = "float_distance<%1%>(%1%, %1%)"; - if(!(boost::math::isfinite)(a)) - return policies::raise_domain_error<T>( - function, - "Argument a must be finite, but got %1%", a, pol); - if(!(boost::math::isfinite)(b)) - return policies::raise_domain_error<T>( - function, - "Argument b must be finite, but got %1%", b, pol); - - - - if(a > b) - return -float_distance(b, a, pol); - if(a == b) - return T(0); - if(a == 0) - return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol)); - if(b == 0) - return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol)); - if(boost::math::sign(a) != boost::math::sign(b)) - return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol)) - + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol)); - - - - - if(a < 0) - return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol); - - (static_cast <bool> (a >= 0) ? void (0) : __assert_fail ("a >= 0", "/usr/include/boost/math/special_functions/next.hpp", 483, __extension__ __PRETTY_FUNCTION__)); - (static_cast <bool> (b >= a) ? void (0) : __assert_fail ("b >= a", "/usr/include/boost/math/special_functions/next.hpp", 484, __extension__ __PRETTY_FUNCTION__)); - - int expon; - - - - - - frexp(((boost::math::fpclassify)(a) == (int)3) ? tools::min_value<T>() : a, &expon); - T upper = ldexp(T(1), expon); - T result = T(0); - - - - - if(b > upper) - { - int expon2; - frexp(b, &expon2); - T upper2 = ldexp(T(0.5), expon2); - result = float_distance(upper2, b); - result += (expon2 - expon - 1) * ldexp(T(1), tools::digits<T>() - 1); - } - - - - - expon = tools::digits<T>() - expon; - T mb, x, y, z; - if(((boost::math::fpclassify)(a) == (int)3) || (b - a < tools::min_value<T>())) - { - - - - - - T a2 = ldexp(a, tools::digits<T>()); - T b2 = ldexp(b, tools::digits<T>()); - mb = -(std::min)(T(ldexp(upper, tools::digits<T>())), b2); - x = a2 + mb; - z = x - a2; - y = (a2 - (x - z)) + (mb - z); - - expon -= tools::digits<T>(); - } - else - { - mb = -(std::min)(upper, b); - x = a + mb; - z = x - a; - y = (a - (x - z)) + (mb - z); - } - if(x < 0) - { - x = -x; - y = -y; - } - result += ldexp(x, expon) + ldexp(y, expon); - - - - (static_cast <bool> (result == floor(result)) ? void (0) : __assert_fail ("result == floor(result)", "/usr/include/boost/math/special_functions/next.hpp", 545, __extension__ __PRETTY_FUNCTION__)); - return result; -} - - - -template <class T, class Policy> -T float_distance_imp(const T& a, const T& b, const mpl::false_&, const Policy& pol) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - static const char* function = "float_distance<%1%>(%1%, %1%)"; - if(!(boost::math::isfinite)(a)) - return policies::raise_domain_error<T>( - function, - "Argument a must be finite, but got %1%", a, pol); - if(!(boost::math::isfinite)(b)) - return policies::raise_domain_error<T>( - function, - "Argument b must be finite, but got %1%", b, pol); - - - - if(a > b) - return -float_distance(b, a, pol); - if(a == b) - return T(0); - if(a == 0) - return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol)); - if(b == 0) - return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol)); - if(boost::math::sign(a) != boost::math::sign(b)) - return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol)) - + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol)); - - - - - if(a < 0) - return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol); - - (static_cast <bool> (a >= 0) ? void (0) : __assert_fail ("a >= 0", "/usr/include/boost/math/special_functions/next.hpp", 591, __extension__ __PRETTY_FUNCTION__)); - (static_cast <bool> (b >= a) ? void (0) : __assert_fail ("b >= a", "/usr/include/boost/math/special_functions/next.hpp", 592, __extension__ __PRETTY_FUNCTION__)); - - boost::intmax_t expon; - - - - - - expon = 1 + ilogb(((boost::math::fpclassify)(a) == (int)3) ? tools::min_value<T>() : a); - T upper = scalbn(T(1), expon); - T result = T(0); - - - - - if(b > upper) - { - boost::intmax_t expon2 = 1 + ilogb(b); - T upper2 = scalbn(T(1), expon2 - 1); - result = float_distance(upper2, b); - result += (expon2 - expon - 1) * scalbn(T(1), std::numeric_limits<T>::digits - 1); - } - - - - - expon = std::numeric_limits<T>::digits - expon; - T mb, x, y, z; - if(((boost::math::fpclassify)(a) == (int)3) || (b - a < tools::min_value<T>())) - { - - - - - - T a2 = scalbn(a, std::numeric_limits<T>::digits); - T b2 = scalbn(b, std::numeric_limits<T>::digits); - mb = -(std::min)(T(scalbn(upper, std::numeric_limits<T>::digits)), b2); - x = a2 + mb; - z = x - a2; - y = (a2 - (x - z)) + (mb - z); - - expon -= std::numeric_limits<T>::digits; - } - else - { - mb = -(std::min)(upper, b); - x = a + mb; - z = x - a; - y = (a - (x - z)) + (mb - z); - } - if(x < 0) - { - x = -x; - y = -y; - } - result += scalbn(x, expon) + scalbn(y, expon); - - - - (static_cast <bool> (result == floor(result)) ? void (0) : __assert_fail ("result == floor(result)", "/usr/include/boost/math/special_functions/next.hpp", 652, __extension__ __PRETTY_FUNCTION__)); - return result; -} - -} - -template <class T, class U, class Policy> -inline typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b, const Policy& pol) -{ - typedef typename tools::promote_args<T, U>::type result_type; - return detail::float_distance_imp(detail::normalize_value(static_cast<result_type>(a), typename detail::has_hidden_guard_digits<result_type>::type()), detail::normalize_value(static_cast<result_type>(b), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol); -} - -template <class T, class U> -typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b) -{ - return boost::math::float_distance(a, b, policies::policy<>()); -} - -namespace detail{ - -template <class T, class Policy> -T float_advance_imp(T val, int distance, const mpl::true_&, const Policy& pol) -{ - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - static const char* function = "float_advance<%1%>(%1%, int)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - return policies::raise_domain_error<T>( - function, - "Argument val must be finite, but got %1%", val, pol); - - if(val < 0) - return -float_advance(-val, -distance, pol); - if(distance == 0) - return val; - if(distance == 1) - return float_next(val, pol); - if(distance == -1) - return float_prior(val, pol); - - if(fabs(val) < detail::get_min_shift_value<T>()) - { - - - - - - if(distance > 0) - { - do{ val = float_next(val, pol); } while(--distance); - } - else - { - do{ val = float_prior(val, pol); } while(++distance); - } - return val; - } - - int expon; - frexp(val, &expon); - T limit = ldexp((distance < 0 ? T(0.5f) : T(1)), expon); - if(val <= tools::min_value<T>()) - { - limit = sign(T(distance)) * tools::min_value<T>(); - } - T limit_distance = float_distance(val, limit); - while(fabs(limit_distance) < abs(distance)) - { - distance -= itrunc(limit_distance); - val = limit; - if(distance < 0) - { - limit /= 2; - expon--; - } - else - { - limit *= 2; - expon++; - } - limit_distance = float_distance(val, limit); - if(distance && (limit_distance == 0)) - { - return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol); - } - } - if((0.5f == frexp(val, &expon)) && (distance < 0)) - --expon; - T diff = 0; - if(val != 0) - diff = distance * ldexp(T(1), expon - tools::digits<T>()); - if(diff == 0) - diff = distance * detail::get_smallest_value<T>(); - return val += diff; -} - - - -template <class T, class Policy> -T float_advance_imp(T val, int distance, const mpl::false_&, const Policy& pol) -{ - static_assert(std::numeric_limits<T>::is_specialized, "std::numeric_limits<T>::is_specialized"); - static_assert(std::numeric_limits<T>::radix != 2, "std::numeric_limits<T>::radix != 2"); - - using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; - - - - static const char* function = "float_advance<%1%>(%1%, int)"; - - int fpclass = (boost::math::fpclassify)(val); - - if((fpclass == (int)0) || (fpclass == (int)1)) - return policies::raise_domain_error<T>( - function, - "Argument val must be finite, but got %1%", val, pol); - - if(val < 0) - return -float_advance(-val, -distance, pol); - if(distance == 0) - return val; - if(distance == 1) - return float_next(val, pol); - if(distance == -1) - return float_prior(val, pol); - - if(fabs(val) < detail::get_min_shift_value<T>()) - { - - - - - - if(distance > 0) - { - do{ val = float_next(val, pol); } while(--distance); - } - else - { - do{ val = float_prior(val, pol); } while(++distance); - } - return val; - } - - boost::intmax_t expon = 1 + ilogb(val); - T limit = scalbn(T(1), distance < 0 ? expon - 1 : expon); - if(val <= tools::min_value<T>()) - { - limit = sign(T(distance)) * tools::min_value<T>(); - } - T limit_distance = float_distance(val, limit); - while(fabs(limit_distance) < abs(distance)) - { - distance -= itrunc(limit_distance); - val = limit; - if(distance < 0) - { - limit /= std::numeric_limits<T>::radix; - expon--; - } - else - { - limit *= std::numeric_limits<T>::radix; - expon++; - } - limit_distance = float_distance(val, limit); - if(distance && (limit_distance == 0)) - { - return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol); - } - } - - - - T diff = 0; - if(val != 0) - diff = distance * scalbn(T(1), expon - std::numeric_limits<T>::digits); - if(diff == 0) - diff = distance * detail::get_smallest_value<T>(); - return val += diff; -} - -} - -template <class T, class Policy> -inline typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol) -{ - typedef typename tools::promote_args<T>::type result_type; - return detail::float_advance_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), distance, mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol); -} - -template <class T> -inline typename tools::promote_args<T>::type float_advance(const T& val, int distance) -{ - return boost::math::float_advance(val, distance, policies::policy<>()); -} - -}} -# 13 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 1 "/usr/include/boost/math/special_functions/hypot.hpp" 1 3 4 -# 24 "/usr/include/boost/math/special_functions/hypot.hpp" 3 4 -namespace boost{ namespace math{ namespace detail{ - -template <class T, class Policy> -T hypot_imp(T x, T y, const Policy& pol) -{ - - - - using std::fabs; using std::sqrt; - - x = fabs(x); - y = fabs(y); - - - - - - - if(std::numeric_limits<T>::has_infinity - && ((x == std::numeric_limits<T>::infinity()) - || (y == std::numeric_limits<T>::infinity()))) - return policies::raise_overflow_error<T>("boost::math::hypot<%1%>(%1%,%1%)", 0, pol); - - - - - if(y > x) - (std::swap)(x, y); - - if(x * tools::epsilon<T>() >= y) - return x; - - T rat = y / x; - return x * sqrt(1 + rat*rat); -} - -} - -template <class T1, class T2> -inline typename tools::promote_args<T1, T2>::type - hypot(T1 x, T2 y) -{ - typedef typename tools::promote_args<T1, T2>::type result_type; - return detail::hypot_imp( - static_cast<result_type>(x), static_cast<result_type>(y), policies::policy<>()); -} - -template <class T1, class T2, class Policy> -inline typename tools::promote_args<T1, T2>::type - hypot(T1 x, T2 y, const Policy& pol) -{ - typedef typename tools::promote_args<T1, T2>::type result_type; - return detail::hypot_imp( - static_cast<result_type>(x), static_cast<result_type>(y), pol); -} - -} -} -# 14 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 - -# 1 "/usr/include/boost/mpl/front.hpp" 1 3 4 -# 18 "/usr/include/boost/mpl/front.hpp" 3 4 -# 1 "/usr/include/boost/mpl/aux_/front_impl.hpp" 1 3 4 -# 22 "/usr/include/boost/mpl/aux_/front_impl.hpp" 3 4 -namespace boost { namespace mpl { - - - - -template< typename Tag > -struct front_impl -{ - template< typename Sequence > struct apply - { - typedef typename begin<Sequence>::type iter_; - typedef typename deref<iter_>::type type; - }; -}; - - template<> struct front_impl<non_sequence_tag> {}; - -}} -# 19 "/usr/include/boost/mpl/front.hpp" 2 3 4 - - - - -namespace boost { namespace mpl { - -template< - typename Sequence = na - > -struct front - : front_impl< typename sequence_tag<Sequence>::type > - ::template apply< Sequence > -{ - -}; - -template<> struct front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : front< T1 > { }; }; template< typename Tag > struct lambda< front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef front< na > result_; typedef front< na > type; }; namespace aux { template< typename T1 > struct template_arity< front< T1 > > : int_<1> { }; template<> struct template_arity< front< na > > : int_<-1> { }; } - -}} -# 16 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 18 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 33 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 -namespace boost{ namespace multiprecision{ - - namespace detail { - - template <class T> - struct is_backend; - - template <class To, class From> - void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_integer>& ); - template <class To, class From> - void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& , const mpl::int_<number_kind_integer>& ); - template <class To, class From> - void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_floating_point>& ); - template <class To, class From> - void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& , const mpl::int_<number_kind_rational>& ); - template <class To, class From> - void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& , const mpl::int_<number_kind_integer>& ); - -} - -namespace default_ops{ -# 72 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 -template <class T, class V> -inline typename disable_if_c<is_convertible<V, T>::value >::type - eval_add(T& result, V const& v) -{ - T t; - t = v; - eval_add(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, T>::value >::type - eval_add(T& result, V const& v) -{ - T t(v); - eval_add(result, t); -} -template <class T, class V> -inline typename disable_if_c<is_convertible<V, T>::value>::type - eval_subtract(T& result, V const& v) -{ - T t; - t = v; - eval_subtract(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, T>::value>::type - eval_subtract(T& result, V const& v) -{ - T t(v); - eval_subtract(result, t); -} -template <class T, class V> -inline typename disable_if_c<is_convertible<V, T>::value>::type - eval_multiply(T& result, V const& v) -{ - T t; - t = v; - eval_multiply(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, T>::value>::type - eval_multiply(T& result, V const& v) -{ - T t(v); - eval_multiply(result, t); -} - -template <class T, class U, class V> -void eval_multiply(T& t, const U& u, const V& v); - -template <class T, class U, class V> -inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v) -{ - T z; - eval_multiply(z, u, v); - eval_add(t, z); -} -template <class T, class U, class V> -inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v) -{ - eval_multiply_add(t, v, u); -} -template <class T, class U, class V> -inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v) -{ - T z; - eval_multiply(z, u, v); - eval_subtract(t, z); -} -template <class T, class U, class V> -inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v) -{ - eval_multiply_subtract(t, v, u); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_divide(T& result, V const& v) -{ - T t; - t = v; - eval_divide(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type - eval_divide(T& result, V const& v) -{ - T t(v); - eval_divide(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_modulus(T& result, V const& v) -{ - T t; - t = v; - eval_modulus(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value&& is_convertible<V, T>::value>::type - eval_modulus(T& result, V const& v) -{ - T t(v); - eval_modulus(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_bitwise_and(T& result, V const& v) -{ - T t; - t = v; - eval_bitwise_and(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type - eval_bitwise_and(T& result, V const& v) -{ - T t(v); - eval_bitwise_and(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_bitwise_or(T& result, V const& v) -{ - T t; - t = v; - eval_bitwise_or(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type - eval_bitwise_or(T& result, V const& v) -{ - T t(v); - eval_bitwise_or(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_bitwise_xor(T& result, V const& v) -{ - T t; - t = v; - eval_bitwise_xor(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type - eval_bitwise_xor(T& result, V const& v) -{ - T t(v); - eval_bitwise_xor(result, t); -} - -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type - eval_complement(T& result, V const& v) -{ - T t; - t = v; - eval_complement(result, t); -} -template <class T, class V> -inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type - eval_complement(T& result, V const& v) -{ - T t(v); - eval_complement(result, t); -} - - - - -template <class T, class U, class V> -void eval_add(T& t, const U& u, const V& v); - -template <class T> -inline void eval_add_default(T& t, const T& u, const T& v) -{ - if(&t == &v) - { - eval_add(t, u); - } - else if(&t == &u) - { - eval_add(t, v); - } - else - { - t = u; - eval_add(t, v); - } -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_add(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_add(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_add_default(T& t, const U& u, const T& v) -{ - eval_add(t, v, u); -} -template <class T, class U, class V> -inline void eval_add_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - eval_add(t, u); - } - else - { - t = u; - eval_add(t, v); - } -} -template <class T, class U, class V> -inline void eval_add(T& t, const U& u, const V& v) -{ - eval_add_default(t, u, v); -} - -template <class T, class U, class V> -void eval_subtract(T& t, const U& u, const V& v); - -template <class T> -inline void eval_subtract_default(T& t, const T& u, const T& v) -{ - if((&t == &v) && is_signed_number<T>::value) - { - eval_subtract(t, u); - t.negate(); - } - else if(&t == &u) - { - eval_subtract(t, v); - } - else - { - t = u; - eval_subtract(t, v); - } -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_subtract(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_subtract(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_signed_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v) -{ - eval_subtract(t, v, u); - t.negate(); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v) -{ - T temp; - temp = u; - eval_subtract(t, temp, v); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v) -{ - T temp(u); - eval_subtract(t, temp, v); -} -template <class T, class U, class V> -inline void eval_subtract_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - eval_subtract(t, u); - t.negate(); - } - else - { - t = u; - eval_subtract(t, v); - } -} -template <class T, class U, class V> -inline void eval_subtract(T& t, const U& u, const V& v) -{ - eval_subtract_default(t, u, v); -} - -template <class T> -inline void eval_multiply_default(T& t, const T& u, const T& v) -{ - if(&t == &v) - { - eval_multiply(t, u); - } - else if(&t == &u) - { - eval_multiply(t, v); - } - else - { - t = u; - eval_multiply(t, v); - } -} - -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_multiply(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_multiply(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_multiply_default(T& t, const U& u, const T& v) -{ - eval_multiply(t, v, u); -} - -template <class T, class U, class V> -inline void eval_multiply_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - eval_multiply(t, u); - } - else - { - t = number<T>::canonical_value(u); - eval_multiply(t, v); - } -} -template <class T, class U, class V> -inline void eval_multiply(T& t, const U& u, const V& v) -{ - eval_multiply_default(t, u, v); -} - -template <class T> -inline void eval_multiply_add(T& t, const T& u, const T& v, const T& x) -{ - if((void*)&x == (void*)&t) - { - T z; - z = number<T>::canonical_value(x); - eval_multiply_add(t, u, v, z); - } - else - { - eval_multiply(t, u, v); - eval_add(t, x); - } -} - -template <class T, class U> -inline typename boost::disable_if_c<boost::is_same<T, U>::value, T>::type make_T(const U& u) -{ - T t; - t = number<T>::canonical_value(u); - return std::move(t); -} -template <class T> -inline const T& make_T(const T& t) -{ - return t; -} - -template <class T, class U, class V, class X> -inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x) -{ - eval_multiply_add(t, make_T<T>(u), make_T<T>(v), make_T<T>(x)); -} -template <class T, class U, class V, class X> -inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x) -{ - eval_multiply_add(t, v, u, x); -} -template <class T, class U, class V, class X> -inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x) -{ - if((void*)&x == (void*)&t) - { - T z; - z = x; - eval_multiply_subtract(t, u, v, z); - } - else - { - eval_multiply(t, u, v); - eval_subtract(t, x); - } -} -template <class T, class U, class V, class X> -inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x) -{ - eval_multiply_subtract(t, v, u, x); -} - -template <class T, class U, class V> -void eval_divide(T& t, const U& u, const V& v); - -template <class T> -inline void eval_divide_default(T& t, const T& u, const T& v) -{ - if(&t == &u) - eval_divide(t, v); - else if(&t == &v) - { - T temp; - eval_divide(temp, u, v); - temp.swap(t); - } - else - { - t = u; - eval_divide(t, v); - } -} - -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_divide(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_divide(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v) -{ - T uu; - uu = u; - eval_divide(t, uu, v); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v) -{ - T uu(u); - eval_divide(t, uu, v); -} - -template <class T, class U, class V> -inline void eval_divide_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - T temp; - temp = u; - eval_divide(temp, v); - t = temp; - } - else - { - t = u; - eval_divide(t, v); - } -} -template <class T, class U, class V> -inline void eval_divide(T& t, const U& u, const V& v) -{ - eval_divide_default(t, u, v); -} - -template <class T, class U, class V> -void eval_modulus(T& t, const U& u, const V& v); - -template <class T> -inline void eval_modulus_default(T& t, const T& u, const T& v) -{ - if(&t == &u) - eval_modulus(t, v); - else if(&t == &v) - { - T temp; - eval_modulus(temp, u, v); - temp.swap(t); - } - else - { - t = u; - eval_modulus(t, v); - } -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_modulus(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_modulus(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v) -{ - T uu; - uu = u; - eval_modulus(t, uu, v); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v) -{ - T uu(u); - eval_modulus(t, uu, v); -} -template <class T, class U, class V> -inline void eval_modulus_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - T temp(u); - eval_modulus(temp, v); - t = temp; - } - else - { - t = u; - eval_modulus(t, v); - } -} -template <class T, class U, class V> -inline void eval_modulus(T& t, const U& u, const V& v) -{ - eval_modulus_default(t, u, v); -} - -template <class T, class U, class V> -void eval_bitwise_and(T& t, const U& u, const V& v); - -template <class T> -inline void eval_bitwise_and_default(T& t, const T& u, const T& v) -{ - if(&t == &v) - { - eval_bitwise_and(t, u); - } - else if(&t == &u) - { - eval_bitwise_and(t, v); - } - else - { - t = u; - eval_bitwise_and(t, v); - } -} -template <class T, class U> -inline typename disable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_bitwise_and(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_bitwise_and(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_and_default(T& t, const U& u, const T& v) -{ - eval_bitwise_and(t, v, u); -} -template <class T, class U, class V> -inline typename disable_if_c<is_same<T, U>::value || is_same<T, V>::value>::type eval_bitwise_and_default(T& t, const U& u, const V& v) -{ - t = u; - eval_bitwise_and(t, v); -} -template <class T, class U, class V> -inline void eval_bitwise_and(T& t, const U& u, const V& v) -{ - eval_bitwise_and_default(t, u, v); -} - -template <class T, class U, class V> -void eval_bitwise_or(T& t, const U& u, const V& v); - -template <class T> -inline void eval_bitwise_or_default(T& t, const T& u, const T& v) -{ - if(&t == &v) - { - eval_bitwise_or(t, u); - } - else if(&t == &u) - { - eval_bitwise_or(t, v); - } - else - { - t = u; - eval_bitwise_or(t, v); - } -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_bitwise_or(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_bitwise_or(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_or_default(T& t, const U& u, const T& v) -{ - eval_bitwise_or(t, v, u); -} -template <class T, class U, class V> -inline void eval_bitwise_or_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - eval_bitwise_or(t, u); - } - else - { - t = u; - eval_bitwise_or(t, v); - } -} -template <class T, class U, class V> -inline void eval_bitwise_or(T& t, const U& u, const V& v) -{ - eval_bitwise_or_default(t, u, v); -} - -template <class T, class U, class V> -void eval_bitwise_xor(T& t, const U& u, const V& v); - -template <class T> -inline void eval_bitwise_xor_default(T& t, const T& u, const T& v) -{ - if(&t == &v) - { - eval_bitwise_xor(t, u); - } - else if(&t == &u) - { - eval_bitwise_xor(t, v); - } - else - { - t = u; - eval_bitwise_xor(t, v); - } -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v) -{ - T vv; - vv = v; - eval_bitwise_xor(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v) -{ - T vv(v); - eval_bitwise_xor(t, u, vv); -} -template <class T, class U> -inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_xor_default(T& t, const U& u, const T& v) -{ - eval_bitwise_xor(t, v, u); -} -template <class T, class U, class V> -inline void eval_bitwise_xor_default(T& t, const U& u, const V& v) -{ - if(is_same<T, V>::value && ((void*)&t == (void*)&v)) - { - eval_bitwise_xor(t, u); - } - else - { - t = u; - eval_bitwise_xor(t, v); - } -} -template <class T, class U, class V> -inline void eval_bitwise_xor(T& t, const U& u, const V& v) -{ - eval_bitwise_xor_default(t, u, v); -} - -template <class T> -inline void eval_increment(T& val) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - eval_add(val, static_cast<ui_type>(1u)); -} -template <class T> -inline void eval_decrement(T& val) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - eval_subtract(val, static_cast<ui_type>(1u)); -} - -template <class T, class V> -inline void eval_left_shift(T& result, const T& arg, const V val) -{ - result = arg; - eval_left_shift(result, val); -} - -template <class T, class V> -inline void eval_right_shift(T& result, const T& arg, const V val) -{ - result = arg; - eval_right_shift(result, val); -} - -template <class T> -inline bool eval_is_zero(const T& val) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - return val.compare(static_cast<ui_type>(0)) == 0; -} -template <class T> -inline int eval_get_sign(const T& val) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - return val.compare(static_cast<ui_type>(0)); -} - -template <class T, class V, class U> -inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<number_kind_rational>&) -{ - result = v1; - T t; - t = v2; - eval_divide(result, t); -} - -template <class T, class V, class U, int N> -inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<N>&) -{ - typedef typename component_type<number<T> >::type component_number_type; - - component_number_type x(v1), y(v2); - assign_components(result, x.backend(), y.backend()); -} - -template <class T, class V, class U> -inline void assign_components(T& result, const V& v1, const U& v2) -{ - return assign_components_imp(result, v1, v2, typename number_category<T>::type()); -} -# 868 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 -template <class R, int b> -struct has_enough_bits -{ - template <class T> - struct type : public mpl::and_<mpl::not_<is_same<R, T> >, mpl::bool_<std::numeric_limits<T>::digits >= b> >{}; -}; - -template <class R> -struct terminal -{ - terminal(const R& v) : value(v){} - terminal(){} - terminal& operator = (R val) { value = val; return *this; } - R value; - operator R()const { return value; } -}; - -template<class R, class B> -struct calculate_next_larger_type -{ - - typedef typename mpl::if_< - is_signed<R>, - typename B::signed_types, - typename mpl::if_< - is_unsigned<R>, - typename B::unsigned_types, - typename B::float_types - >::type - >::type list_type; - - typedef typename has_enough_bits<R, std::numeric_limits<R>::digits>::template type<mpl::_> pred_type; - - typedef typename mpl::find_if< - list_type, - is_same<R, mpl::_> - >::type start_last; - - typedef typename mpl::if_<is_same<start_last, typename mpl::end<list_type>::type>, typename mpl::begin<list_type>::type, start_last>::type start_seq; - - typedef mpl::iterator_range<start_seq, typename mpl::end<list_type>::type> range; - - typedef typename mpl::find_if< - range, - pred_type - >::type iter_type; - - typedef typename mpl::eval_if< - is_same<typename mpl::end<list_type>::type, iter_type>, - mpl::identity<terminal<R> >, - mpl::deref<iter_type> - >::type type; -}; - -template <class R, class T> -inline typename boost::enable_if_c<boost::is_integral<R>::value, bool>::type check_in_range(const T& t) -{ - - if((t > 0) && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (t > (std::numeric_limits<R>::max)())) - return true; - else - return false; -} - -template <class R, class B> -inline typename boost::enable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend) -{ - typedef typename calculate_next_larger_type<R, B>::type next_type; - next_type n; - eval_convert_to(&n, backend); - if(!boost::is_unsigned<R>::value && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n > (next_type)(std::numeric_limits<R>::max)())) - { - *result = (std::numeric_limits<R>::max)(); - } - else if (std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n < (next_type)(std::numeric_limits<R>::min)())) - { - *result = (std::numeric_limits<R>::min)(); - } - else - *result = static_cast<R>(n); -} - -template <class R, class B> -inline typename boost::disable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend) -{ - typedef typename calculate_next_larger_type<R, B>::type next_type; - next_type n; - eval_convert_to(&n, backend); - if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && ((n > (next_type)(std::numeric_limits<R>::max)() || (n < (next_type)-(std::numeric_limits<R>::max)()) ))) - { - *result = n > 0 ? (std::numeric_limits<R>::max)() : -(std::numeric_limits<R>::max)(); - } - else - *result = static_cast<R>(n); -} - -template <class R, class B> -inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::false_&) -{ - - - - - if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0)) - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",972); - try - { - result->value = boost::lexical_cast<R>(backend.str(0, std::ios_base::fmtflags(0))); - } - catch (const bad_lexical_cast&) - { - if (eval_get_sign(backend) < 0) - { - *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)(); - } - else - *result = (std::numeric_limits<R>::max)(); - } -} - -template <class R, class B> -inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::true_&) -{ - - - - - if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0)) - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",996); - try - { - B t(backend); - R mask = ~static_cast<R>(0u); - eval_bitwise_and(t, mask); - result->value = boost::lexical_cast<R>(t.str(0, std::ios_base::fmtflags(0))); - } - catch (const bad_lexical_cast&) - { - if (eval_get_sign(backend) < 0) - { - *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)(); - } - else - *result = (std::numeric_limits<R>::max)(); - } -} - -template <class R, class B> -inline void eval_convert_to(terminal<R>* result, const B& backend) -{ - typedef mpl::bool_<boost::is_unsigned<R>::value && number_category<B>::value == number_kind_integer> tag_type; - last_chance_eval_convert_to(result, backend, tag_type()); -} - -template <class B1, class B2, expression_template_option et> -inline void eval_convert_to(terminal<number<B1, et> >* result, const B2& backend) -{ - - - - - boost::multiprecision::detail::generic_interconvert(result->value.backend(), backend, number_category<B1>(), number_category<B2>()); -} - -template <class B> -inline void eval_convert_to(std::string* result, const B& backend) -{ - *result = backend.str(0, std::ios_base::fmtflags(0)); -} - -template <class B> -inline void eval_convert_to(std::complex<float>* result, const B& backend) -{ - typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type; - scalar_type re, im; - eval_real(re.backend(), backend); - eval_imag(im.backend(), backend); - - *result = std::complex<float>(re.template convert_to<float>(), im.template convert_to<float>()); -} - -template <class B> -inline void eval_convert_to(std::complex<double>* result, const B& backend) -{ - typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type; - scalar_type re, im; - eval_real(re.backend(), backend); - eval_imag(im.backend(), backend); - - *result = std::complex<double>(re.template convert_to<double>(), im.template convert_to<double>()); -} - -template <class B> -inline void eval_convert_to(std::complex<long double>* result, const B& backend) -{ - typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type; - scalar_type re, im; - eval_real(re.backend(), backend); - eval_imag(im.backend(), backend); - - *result = std::complex<long double>(re.template convert_to<long double>(), im.template convert_to<long double>()); -} - - - - -template <class T> -void eval_abs(T& result, const T& arg) -{ - typedef typename T::signed_types type_list; - typedef typename mpl::front<type_list>::type front; - result = arg; - if(arg.compare(front(0)) < 0) - result.negate(); -} -template <class T> -void eval_fabs(T& result, const T& arg) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The fabs function is only valid for floating point types."); - typedef typename T::signed_types type_list; - typedef typename mpl::front<type_list>::type front; - result = arg; - if(arg.compare(front(0)) < 0) - result.negate(); -} - -template <class Backend> -inline int eval_fpclassify(const Backend& arg) -{ - static_assert(number_category<Backend>::value == number_kind_floating_point, "The fpclassify function is only valid for floating point types."); - return eval_is_zero(arg) ? 2 : 4; -} - -template <class T> -inline void eval_fmod(T& result, const T& a, const T& b) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The fmod function is only valid for floating point types."); - if((&result == &a) || (&result == &b)) - { - T temp; - eval_fmod(temp, a, b); - result = temp; - return; - } - switch(eval_fpclassify(a)) - { - case 2: - result = a; - return; - case 1: - case 0: - result = std::numeric_limits<number<T> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - return; - } - switch(eval_fpclassify(b)) - { - case 2: - case 0: - result = std::numeric_limits<number<T> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - return; - } - T n; - eval_divide(result, a, b); - if(eval_get_sign(result) < 0) - eval_ceil(n, result); - else - eval_floor(n, result); - eval_multiply(n, b); - eval_subtract(result, a, n); -} -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const T& x, const A& a) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = a; - eval_fmod(result, x, c); -} - -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const A& x, const T& a) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = x; - eval_fmod(result, c, a); -} - -template <class T> -void eval_round(T& result, const T& a); - -template <class T> -inline void eval_remquo(T& result, const T& a, const T& b, int* pi) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The remquo function is only valid for floating point types."); - if((&result == &a) || (&result == &b)) - { - T temp; - eval_remquo(temp, a, b, pi); - result = temp; - return; - } - T n; - eval_divide(result, a, b); - eval_round(n, result); - eval_convert_to(pi, n); - eval_multiply(n, b); - eval_subtract(result, a, n); -} -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const T& x, const A& a, int* pi) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = a; - eval_remquo(result, x, c, pi); -} -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const A& x, const T& a, int* pi) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = x; - eval_remquo(result, c, a, pi); -} -template <class T, class U, class V> -inline void eval_remainder(T& result, const U& a, const V& b) -{ - int i; - eval_remquo(result, a, b, &i); -} - -template <class B> -bool eval_gt(const B& a, const B& b); -template <class T, class U> -bool eval_gt(const T& a, const U& b); -template <class B> -bool eval_lt(const B& a, const B& b); -template <class T, class U> -bool eval_lt(const T& a, const U& b); - -template<class T> -inline void eval_fdim(T& result, const T& a, const T& b) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - static const ui_type zero = 0u; - switch(eval_fpclassify(b)) - { - case 0: - case 1: - result = zero; - return; - } - switch(eval_fpclassify(a)) - { - case 0: - result = zero; - return; - case 1: - result = a; - return; - } - if(eval_gt(a, b)) - { - eval_subtract(result, a, b); - } - else - result = zero; -} - -template<class T, class A> -inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const T& a, const A& b) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type; - static const ui_type zero = 0u; - arithmetic_type canonical_b = b; - switch((::boost::math::fpclassify)(b)) - { - case 0: - case 1: - result = zero; - return; - } - switch(eval_fpclassify(a)) - { - case 0: - result = zero; - return; - case 1: - result = a; - return; - } - if(eval_gt(a, canonical_b)) - { - eval_subtract(result, a, canonical_b); - } - else - result = zero; -} - -template<class T, class A> -inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const A& a, const T& b) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type; - static const ui_type zero = 0u; - arithmetic_type canonical_a = a; - switch(eval_fpclassify(b)) - { - case 0: - case 1: - result = zero; - return; - } - switch((::boost::math::fpclassify)(a)) - { - case 0: - result = zero; - return; - case 1: - result = std::numeric_limits<number<T> >::infinity().backend(); - return; - } - if(eval_gt(canonical_a, b)) - { - eval_subtract(result, canonical_a, b); - } - else - result = zero; -} - -template <class T> -inline void eval_trunc(T& result, const T& a) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The trunc function is only valid for floating point types."); - switch(eval_fpclassify(a)) - { - case 0: - (*__errno_location ()) = 33; - - case 2: - case 1: - result = a; - return; - } - if(eval_get_sign(a) < 0) - eval_ceil(result, a); - else - eval_floor(result, a); -} - -template <class T> -inline void eval_modf(T& result, T const& arg, T* pipart) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - int c = eval_fpclassify(arg); - if(c == (int)0) - { - if(pipart) - *pipart = arg; - result = arg; - return; - } - else if(c == (int)1) - { - if(pipart) - *pipart = arg; - result = ui_type(0u); - return; - } - if(pipart) - { - eval_trunc(*pipart, arg); - eval_subtract(result, arg, *pipart); - } - else - { - T ipart; - eval_trunc(ipart, arg); - eval_subtract(result, arg, ipart); - } -} - -template <class T> -inline void eval_round(T& result, const T& a) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The round function is only valid for floating point types."); - typedef typename boost::multiprecision::detail::canonical<float, T>::type fp_type; - int c = eval_fpclassify(a); - if(c == (int)0) - { - result = a; - (*__errno_location ()) = 33; - return; - } - if((c == 2) || (c == (int)1)) - { - result = a; - } - else if(eval_get_sign(a) < 0) - { - eval_subtract(result, a, fp_type(0.5f)); - eval_ceil(result, result); - } - else - { - eval_add(result, a, fp_type(0.5f)); - eval_floor(result, result); - } -} - -template <class B> -void eval_lcm(B& result, const B& a, const B& b); -template <class B> -void eval_gcd(B& result, const B& a, const B& b); - -template <class T, class Arithmetic> -inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const T& a, const Arithmetic& b) -{ - typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type; - using default_ops::eval_gcd; - T t; - t = static_cast<si_type>(b); - eval_gcd(result, a, t); -} -template <class T, class Arithmetic> -inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const Arithmetic& a, const T& b) -{ - eval_gcd(result, b, a); -} -template <class T, class Arithmetic> -inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const T& a, const Arithmetic& b) -{ - typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type; - using default_ops::eval_lcm; - T t; - t = static_cast<si_type>(b); - eval_lcm(result, a, t); -} -template <class T, class Arithmetic> -inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const Arithmetic& a, const T& b) -{ - eval_lcm(result, b, a); -} - -template <class T> -inline unsigned eval_lsb(const T& val) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - int c = eval_get_sign(val); - if(c == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",1427); - } - if(c < 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",1431); - } - unsigned result = 0; - T mask, t; - mask = ui_type(1); - do - { - eval_bitwise_and(t, mask, val); - ++result; - eval_left_shift(mask, 1); - } - while(eval_is_zero(t)); - - return --result; -} - -template <class T> -inline int eval_msb(const T& val) -{ - int c = eval_get_sign(val); - if(c == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",1453); - } - if(c < 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/default_ops.hpp",1457); - } -# 1467 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 - unsigned result = 0; - T t(val); - while(!eval_is_zero(t)) - { - eval_right_shift(t, 1); - ++result; - } - return --result; -} - -template <class T> -inline bool eval_bit_test(const T& val, unsigned index) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - T mask, t; - mask = ui_type(1); - eval_left_shift(mask, index); - eval_bitwise_and(t, mask, val); - return !eval_is_zero(t); -} - -template <class T> -inline void eval_bit_set(T& val, unsigned index) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - T mask; - mask = ui_type(1); - eval_left_shift(mask, index); - eval_bitwise_or(val, mask); -} - -template <class T> -inline void eval_bit_flip(T& val, unsigned index) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - T mask; - mask = ui_type(1); - eval_left_shift(mask, index); - eval_bitwise_xor(val, mask); -} - -template <class T> -inline void eval_bit_unset(T& val, unsigned index) -{ - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - T mask, t; - mask = ui_type(1); - eval_left_shift(mask, index); - eval_bitwise_and(t, mask, val); - if(!eval_is_zero(t)) - eval_bitwise_xor(val, mask); -} - -template <class B> -void eval_integer_sqrt(B& s, B& r, const B& x) -{ - - - - - - - - typedef typename boost::multiprecision::detail::canonical<unsigned char, B>::type ui_type; - - s = ui_type(0u); - if(eval_get_sign(x) == 0) - { - r = ui_type(0u); - return; - } - int g = eval_msb(x); - if(g <= 1) - { - s = ui_type(1); - eval_subtract(r, x, s); - return; - } - - B t; - r = x; - g /= 2; - int org_g = g; - eval_bit_set(s, g); - eval_bit_set(t, 2 * g); - eval_subtract(r, x, t); - --g; - if(eval_get_sign(r) == 0) - return; - int msbr = eval_msb(r); - do - { - if(msbr >= org_g + g + 1) - { - t = s; - eval_left_shift(t, g + 1); - eval_bit_set(t, 2 * g); - if(t.compare(r) <= 0) - { - (static_cast <bool> (g >= 0) ? void (0) : __assert_fail ("g >= 0", "/usr/include/boost/multiprecision/detail/default_ops.hpp", 1566, __extension__ __PRETTY_FUNCTION__)); - eval_bit_set(s, g); - eval_subtract(r, t); - if(eval_get_sign(r) == 0) - return; - msbr = eval_msb(r); - } - } - --g; - } - while(g >= 0); -} - -template <class B> -inline void eval_conj(B& result, const B& val) -{ - result = val; -} -template <class B> -inline void eval_proj(B& result, const B& val) -{ - result = val; -} - - - - -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_floor(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_ceil(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_trunc(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_sqrt(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_ldexp(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_frexp(); - -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_asinh(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_acosh(); -template <class T> -typename enable_if_c<sizeof(T) == 0>::type eval_atanh(); - - - - - -template <class B> -inline typename B::exponent_type eval_ilogb(const B& val) -{ - static_assert(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of ilogb requires a base 2 number type"); - typename B::exponent_type e; - switch(eval_fpclassify(val)) - { - case 0: - - return (-2147483647 - 1) > 0 ? (std::numeric_limits<typename B::exponent_type>::max)() : (std::numeric_limits<typename B::exponent_type>::min)(); - - - - case 1: - return (std::numeric_limits<typename B::exponent_type>::max)(); - case 2: - return (std::numeric_limits<typename B::exponent_type>::min)(); - } - B result; - eval_frexp(result, val, &e); - return e - 1; -} - -template <class T> -int eval_signbit(const T& val); - -template <class B> -inline void eval_logb(B& result, const B& val) -{ - switch(eval_fpclassify(val)) - { - case 0: - result = val; - (*__errno_location ()) = 33; - return; - case 2: - result = std::numeric_limits<number<B> >::infinity().backend(); - result.negate(); - (*__errno_location ()) = 34; - return; - case 1: - result = val; - if(eval_signbit(val)) - result.negate(); - return; - } - typedef typename boost::mpl::if_c<boost::is_same<boost::intmax_t, long>::value, boost::long_long_type, boost::intmax_t>::type max_t; - result = static_cast<max_t>(eval_ilogb(val)); -} -template <class B, class A> -inline void eval_scalbn(B& result, const B& val, A e) -{ - static_assert(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of scalbn requires a base 2 number type"); - eval_ldexp(result, val, static_cast<typename B::exponent_type>(e)); -} -template <class B, class A> -inline void eval_scalbln(B& result, const B& val, A e) -{ - eval_scalbn(result, val, e); -} - -template <class T> -inline bool is_arg_nan(const T& val, mpl::true_ const&, const mpl::false_&) -{ - return eval_fpclassify(val) == 0; -} -template <class T> -inline bool is_arg_nan(const T& val, mpl::false_ const&, const mpl::true_&) -{ - return (boost::math::isnan)(val); -} -template <class T> -inline bool is_arg_nan(const T&, mpl::false_ const&, const mpl::false_&) -{ - return false; -} - -template <class T> -inline bool is_arg_nan(const T& val) -{ - return is_arg_nan(val, mpl::bool_<boost::multiprecision::detail::is_backend<T>::value>(), is_floating_point<T>()); -} - -template <class T, class U, class V> -inline void eval_fmax(T& result, const U& a, const V& b) -{ - if(is_arg_nan(a)) - result = number<T>::canonical_value(b); - else if(is_arg_nan(b)) - result = number<T>::canonical_value(a); - else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b))) - result = number<T>::canonical_value(b); - else - result = number<T>::canonical_value(a); -} -template <class T, class U, class V> -inline void eval_fmin(T& result, const U& a, const V& b) -{ - if(is_arg_nan(a)) - result = number<T>::canonical_value(b); - else if(is_arg_nan(b)) - result = number<T>::canonical_value(a); - else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b))) - result = number<T>::canonical_value(a); - else - result = number<T>::canonical_value(b); -} - -template <class R, class T, class U> -inline void eval_hypot(R& result, const T& a, const U& b) -{ - - - - R x, y; - x = number<R>::canonical_value(a); - y = number<R>::canonical_value(b); - if(eval_get_sign(x) < 0) - x.negate(); - if(eval_get_sign(y) < 0) - y.negate(); - - - - int c1 = eval_fpclassify(x); - int c2 = eval_fpclassify(y); - - if(c1 == 2) - { - result = y; - return; - } - if(c2 == 2) - { - result = x; - return; - } - if(c1 == 1) - { - result = x; - return; - } - if((c2 == 1) || (c2 == 0)) - { - result = y; - return; - } - if(c1 == 0) - { - result = x; - return; - } - - if(eval_gt(y, x)) - x.swap(y); - - eval_multiply(result, x, std::numeric_limits<number<R> >::epsilon().backend()); - - if(eval_gt(result, y)) - { - result = x; - return; - } - - R rat; - eval_divide(rat, y, x); - eval_multiply(result, rat, rat); - eval_increment(result); - eval_sqrt(rat, result); - eval_multiply(result, rat, x); -} - -template <class R, class T> -inline void eval_nearbyint(R& result, const T& a) -{ - eval_round(result, a); -} -template <class R, class T> -inline void eval_rint(R& result, const T& a) -{ - eval_nearbyint(result, a); -} - -template <class T> -inline int eval_signbit(const T& val) -{ - return eval_get_sign(val) < 0 ? 1 : 0; -} - - - - -template <class To, class From> -inline void eval_real(To& to, const From& from) -{ - to = from; -} -template <class To, class From> -inline void eval_imag(To& to, const From& ) -{ - typedef typename mpl::front<typename To::unsigned_types>::type ui_type; - to = ui_type(0); -} - -} namespace default_ops_adl { - -template <class To, class From> -inline void eval_set_real_imp(To& to, const From& from) -{ - typedef typename component_type<number<To> >::type to_component_type; - typename to_component_type::backend_type to_component; - to_component = from; - eval_set_real(to, to_component); -} -template <class To, class From> -inline void eval_set_imag_imp(To& to, const From& from) -{ - typedef typename component_type<number<To> >::type to_component_type; - typename to_component_type::backend_type to_component; - to_component = from; - eval_set_imag(to, to_component); -} - -} namespace default_ops{ - -template <class To, class From> -inline typename enable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from) -{ - default_ops_adl::eval_set_real_imp(to, from); -} -template <class To, class From> -inline typename disable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from) -{ - to = from; -} - -template <class To, class From> -inline void eval_set_imag(To& to, const From& from) -{ - default_ops_adl::eval_set_imag_imp(to, from); -} - -template <class T> -inline void eval_set_real(T& to, const T& from) -{ - to = from; -} -template <class T> -void eval_set_imag(T&, const T&) -{ - static_assert(sizeof(T) == 0x7fffffff, "eval_set_imag needs to be specialised for each specific backend"); -} - - - - - -# 1 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 -template <class T> -void calc_log2(T& num, unsigned digits) -{ - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - typedef typename mpl::front<typename T::signed_types>::type si_type; - - - - - static const char* string_val = "0." - "6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875" - "4200148102057068573368552023575813055703267075163507596193072757082837143519030703862389167347112335" - "0115364497955239120475172681574932065155524734139525882950453007095326366642654104239157814952043740" - "4303855008019441706416715186447128399681717845469570262716310645461502572074024816377733896385506952" - "6066834113727387372292895649354702576265209885969320196505855476470330679365443254763274495125040606" - "9438147104689946506220167720424524529612687946546193165174681392672504103802546259656869144192871608" - "2938031727143677826548775664850856740776484514644399404614226031930967354025744460703080960850474866" - "3852313818167675143866747664789088143714198549423151997354880375165861275352916610007105355824987941" - "4729509293113897155998205654392871700072180857610252368892132449713893203784393530887748259701715591" - "0708823683627589842589185353024363421436706118923678919237231467232172053401649256872747782344535347" - "6481149418642386776774406069562657379600867076257199184734022651462837904883062033061144630073719489"; - - - - if(digits < 3640) - { - num = string_val; - return; - } -# 50 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - num = static_cast<ui_type>(1180509120uL); - T denom, next_term, temp; - denom = static_cast<ui_type>(1277337600uL); - next_term = static_cast<ui_type>(120uL); - si_type sign = -1; - - ui_type limit = digits / 3 + 1; - - for(ui_type n = 6; n < limit; ++n) - { - temp = static_cast<ui_type>(2); - eval_multiply(temp, ui_type(2 * n)); - eval_multiply(temp, ui_type(2 * n + 1)); - eval_multiply(num, temp); - eval_multiply(denom, temp); - sign = -sign; - eval_multiply(next_term, n); - eval_multiply(temp, next_term, next_term); - if(sign < 0) - temp.negate(); - eval_add(num, temp); - } - eval_multiply(denom, ui_type(4)); - eval_multiply(num, ui_type(3)); - ; - ; - eval_divide(num, denom); - ; -} - -template <class T> -void calc_e(T& result, unsigned digits) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - - - - const char* string_val = "2." - "7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274" - "2746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901" - "1573834187930702154089149934884167509244761460668082264800168477411853742345442437107539077744992069" - "5517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416" - "9283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312" - "7736178215424999229576351482208269895193668033182528869398496465105820939239829488793320362509443117" - "3012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509" - "9618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496" - "8487560233624827041978623209002160990235304369941849146314093431738143640546253152096183690888707016" - "7683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354" - "0212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508869"; - - - - if(digits < 3640) - { - result = string_val; - return; - } - - T lim; - lim = ui_type(1); - eval_ldexp(lim, lim, digits); - - - - - result = ui_type(2); - T denom; - denom = ui_type(1); - ui_type i = 2; - do{ - eval_multiply(denom, i); - eval_multiply(result, i); - eval_add(result, ui_type(1)); - ++i; - }while(denom.compare(lim) <= 0); - eval_divide(result, denom); -} - -template <class T> -void calc_pi(T& result, unsigned digits) -{ - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type real_type; - - - - const char* string_val = "3." - "1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679" - "8214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196" - "4428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273" - "7245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094" - "3305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912" - "9833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132" - "0005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235" - "4201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859" - "5024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303" - "5982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989" - "3809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913152"; - - - - if(digits < 3640) - { - result = string_val; - return; - } - - T a; - a = ui_type(1); - T b; - T A(a); - T B; - B = real_type(0.5f); - T D; - D = real_type(0.25f); - - T lim; - lim = ui_type(1); - eval_ldexp(lim, lim, -(int)digits); -# 189 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - unsigned k = 1; - - do - { - eval_add(result, A, B); - eval_ldexp(result, result, -2); - eval_sqrt(b, B); - eval_add(a, b); - eval_ldexp(a, a, -1); - eval_multiply(A, a, a); - eval_subtract(B, A, result); - eval_ldexp(B, B, 1); - eval_subtract(result, A, B); - bool neg = eval_get_sign(result) < 0; - if(neg) - result.negate(); - if(result.compare(lim) <= 0) - break; - if(neg) - result.negate(); - eval_ldexp(result, result, k - 1); - eval_subtract(D, result); - ++k; - eval_ldexp(lim, lim, 1); - } - while(true); - - eval_divide(result, B, D); -} - -template <class T, const T& (*F)(void)> -struct constant_initializer -{ - static void do_nothing() - { - init.do_nothing(); - } -private: - struct initializer - { - initializer() - { - F(); - } - void do_nothing()const{} - }; - static const initializer init; -}; - -template <class T, const T& (*F)(void)> -typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init; - -template <class T> -const T& get_constant_ln2() -{ - static thread_local T result; - static thread_local long digits = 0; -# 254 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - if ((digits != boost::multiprecision::detail::digits2<number<T> >::value())) - { - - calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - digits = boost::multiprecision::detail::digits2<number<T> >::value(); - } - - return result; -} - -template <class T> -const T& get_constant_e() -{ - static thread_local T result; - static thread_local long digits = 0; -# 277 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - if ((digits != boost::multiprecision::detail::digits2<number<T> >::value())) - { - - calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - digits = boost::multiprecision::detail::digits2<number<T> >::value(); - } - - return result; -} - -template <class T> -const T& get_constant_pi() -{ - static thread_local T result; - static thread_local long digits = 0; -# 300 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - if ((digits != boost::multiprecision::detail::digits2<number<T> >::value())) - { - - calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - digits = boost::multiprecision::detail::digits2<number<T> >::value(); - } - - return result; -} - -template <class T> -const T& get_constant_one_over_epsilon() -{ - static thread_local T result; - static thread_local long digits = 0; -# 323 "/usr/include/boost/multiprecision/detail/functions/constants.hpp" 3 4 - if ((digits != boost::multiprecision::detail::digits2<number<T> >::value())) - { - - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - result = static_cast<ui_type>(1u); - eval_divide(result, std::numeric_limits<number<T> >::epsilon().backend()); - } - - return result; -} -# 1875 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/functions/pow.hpp" 1 3 4 -# 20 "/usr/include/boost/multiprecision/detail/functions/pow.hpp" 3 4 -namespace detail{ - -template<typename T, typename U> -inline void pow_imp(T& result, const T& t, const U& p, const mpl::false_&) -{ - - - - - - - typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type; - - if(&result == &t) - { - T temp; - pow_imp(temp, t, p, mpl::false_()); - result = temp; - return; - } - - - if(U(p % U(2)) != U(0)) - { - result = t; - } - else - result = int_type(1); - - U p2(p); - - - T x(t); - - while(U(p2 /= 2) != U(0)) - { - - eval_multiply(x, x); - - const bool has_binary_power = (U(p2 % U(2)) != U(0)); - - if(has_binary_power) - { - - eval_multiply(result, x); - } - } -} - -template<typename T, typename U> -inline void pow_imp(T& result, const T& t, const U& p, const mpl::true_&) -{ - - typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type; - typedef typename make_unsigned<U>::type ui_type; - - if(p < 0) - { - T temp; - temp = static_cast<int_type>(1); - T denom; - pow_imp(denom, t, static_cast<ui_type>(-p), mpl::false_()); - eval_divide(result, temp, denom); - return; - } - pow_imp(result, t, static_cast<ui_type>(p), mpl::false_()); -} - -} - -template<typename T, typename U> -inline typename enable_if_c<is_integral<U>::value>::type eval_pow(T& result, const T& t, const U& p) -{ - detail::pow_imp(result, t, p, boost::is_signed<U>()); -} - -template <class T> -void hyp0F0(T& H0F0, const T& x) -{ - - - - - typedef typename mpl::front<typename T::unsigned_types>::type ui_type; - - (static_cast <bool> (&H0F0 != &x) ? void (0) : __assert_fail ("&H0F0 != &x", "/usr/include/boost/multiprecision/detail/functions/pow.hpp", 105, __extension__ __PRETTY_FUNCTION__)); - long tol = boost::multiprecision::detail::digits2<number<T, et_on> >::value(); - T t; - - T x_pow_n_div_n_fact(x); - - eval_add(H0F0, x_pow_n_div_n_fact, ui_type(1)); - - T lim; - eval_ldexp(lim, H0F0, 1 - tol); - if(eval_get_sign(lim) < 0) - lim.negate(); - - ui_type n; - - const unsigned series_limit = - boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100 - ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value(); - - for(n = 2; n < series_limit; ++n) - { - eval_multiply(x_pow_n_div_n_fact, x); - eval_divide(x_pow_n_div_n_fact, n); - eval_add(H0F0, x_pow_n_div_n_fact); - bool neg = eval_get_sign(x_pow_n_div_n_fact) < 0; - if(neg) - x_pow_n_div_n_fact.negate(); - if(lim.compare(x_pow_n_div_n_fact) > 0) - break; - if(neg) - x_pow_n_div_n_fact.negate(); - } - if(n >= series_limit) - ::boost::exception_detail::throw_exception_(std::runtime_error("H0F0 failed to converge"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/pow.hpp",138); -} - -template <class T> -void hyp1F0(T& H1F0, const T& a, const T& x) -{ - - - - - - typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; - - (static_cast <bool> (&H1F0 != &x) ? void (0) : __assert_fail ("&H1F0 != &x", "/usr/include/boost/multiprecision/detail/functions/pow.hpp", 151, __extension__ __PRETTY_FUNCTION__)); - (static_cast <bool> (&H1F0 != &a) ? void (0) : __assert_fail ("&H1F0 != &a", "/usr/include/boost/multiprecision/detail/functions/pow.hpp", 152, __extension__ __PRETTY_FUNCTION__)); - - T x_pow_n_div_n_fact(x); - T pochham_a (a); - T ap (a); - - eval_multiply(H1F0, pochham_a, x_pow_n_div_n_fact); - eval_add(H1F0, si_type(1)); - T lim; - eval_ldexp(lim, H1F0, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - if(eval_get_sign(lim) < 0) - lim.negate(); - - si_type n; - T term, part; - - const si_type series_limit = - boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100 - ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value(); - - for(n = 2; n < series_limit; n++) - { - eval_multiply(x_pow_n_div_n_fact, x); - eval_divide(x_pow_n_div_n_fact, n); - eval_increment(ap); - eval_multiply(pochham_a, ap); - eval_multiply(term, pochham_a, x_pow_n_div_n_fact); - eval_add(H1F0, term); - if(eval_get_sign(term) < 0) - term.negate(); - if(lim.compare(term) >= 0) - break; - } - if(n >= series_limit) - ::boost::exception_detail::throw_exception_(std::runtime_error("H1F0 failed to converge"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/pow.hpp",186); -} - -template <class T> -void eval_exp(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The exp function is only valid for floating point types."); - if(&x == &result) - { - T temp; - eval_exp(temp, x); - result = temp; - return; - } - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; - typedef typename T::exponent_type exp_type; - typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; - - - int type = eval_fpclassify(x); - bool isneg = eval_get_sign(x) < 0; - if(type == (int)0) - { - result = x; - (*__errno_location ()) = 33; - return; - } - else if(type == (int)1) - { - if(isneg) - result = ui_type(0u); - else - result = x; - return; - } - else if(type == (int)2) - { - result = ui_type(1); - return; - } - - - T xx = x; - T exp_series; - if(isneg) - xx.negate(); - - - if(xx.compare(si_type(1)) <= 0) - { - - - - T lim; - if(std::numeric_limits<number<T, et_on> >::is_specialized) - lim = std::numeric_limits<number<T, et_on> >::epsilon().backend(); - else - { - result = ui_type(1); - eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - } - unsigned k = 2; - exp_series = xx; - result = si_type(1); - if(isneg) - eval_subtract(result, exp_series); - else - eval_add(result, exp_series); - eval_multiply(exp_series, xx); - eval_divide(exp_series, ui_type(k)); - eval_add(result, exp_series); - while(exp_series.compare(lim) > 0) - { - ++k; - eval_multiply(exp_series, xx); - eval_divide(exp_series, ui_type(k)); - if(isneg && (k&1)) - eval_subtract(result, exp_series); - else - eval_add(result, exp_series); - } - return; - } - - - typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type ll; - eval_trunc(exp_series, x); - eval_convert_to(&ll, exp_series); - if(x.compare(ll) == 0) - { - detail::pow_imp(result, get_constant_e<T>(), ll, mpl::true_()); - return; - } - else if(exp_series.compare(x) == 0) - { - - - - if(isneg) - result = ui_type(0); - else - result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend(); - return; - } -# 302 "/usr/include/boost/multiprecision/detail/functions/pow.hpp" 3 4 - eval_divide(result, xx, get_constant_ln2<T>()); - exp_type n; - eval_convert_to(&n, result); - - if (n == (std::numeric_limits<exp_type>::max)()) - { - - if (isneg) - result = ui_type(0); - else - result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend(); - return; - } - - - const si_type p2 = static_cast<si_type>(si_type(1) << 11); - - eval_multiply(exp_series, get_constant_ln2<T>(), static_cast<canonical_exp_type>(n)); - eval_subtract(exp_series, xx); - eval_divide(exp_series, p2); - exp_series.negate(); - hyp0F0(result, exp_series); - - detail::pow_imp(exp_series, result, p2, mpl::true_()); - result = ui_type(1); - eval_ldexp(result, result, n); - eval_multiply(exp_series, result); - - if(isneg) - eval_divide(result, ui_type(1), exp_series); - else - result = exp_series; -} - -template <class T> -void eval_log(T& result, const T& arg) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types."); - - - - - - - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - typedef typename T::exponent_type exp_type; - typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - int s = eval_signbit(arg); - switch(eval_fpclassify(arg)) - { - case 0: - result = arg; - (*__errno_location ()) = 33; - return; - case 1: - if(s) break; - result = arg; - return; - case 2: - result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend(); - result.negate(); - (*__errno_location ()) = 34; - return; - } - if(s) - { - result = std::numeric_limits<number<T> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - return; - } - - exp_type e; - T t; - eval_frexp(t, arg, &e); - bool alternate = false; - - if(t.compare(fp_type(2) / fp_type(3)) <= 0) - { - alternate = true; - eval_ldexp(t, t, 1); - --e; - } - - eval_multiply(result, get_constant_ln2<T>(), canonical_exp_type(e)); - ; - eval_subtract(t, ui_type(1)); - if(!alternate) - t.negate(); - T pow = t; - T lim; - T t2; - - if(alternate) - eval_add(result, t); - else - eval_subtract(result, t); - - if(std::numeric_limits<number<T, et_on> >::is_specialized) - eval_multiply(lim, result, std::numeric_limits<number<T, et_on> >::epsilon().backend()); - else - eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - if(eval_get_sign(lim) < 0) - lim.negate(); - ; - - ui_type k = 1; - do - { - ++k; - eval_multiply(pow, t); - eval_divide(t2, pow, k); - ; - if(alternate && ((k & 1) != 0)) - eval_add(result, t2); - else - eval_subtract(result, t2); - ; - }while(lim.compare(t2) < 0); -} - -template <class T> -const T& get_constant_log10() -{ - static thread_local T result; - static thread_local long digits = 0; -# 436 "/usr/include/boost/multiprecision/detail/functions/pow.hpp" 3 4 - if ((digits != boost::multiprecision::detail::digits2<number<T> >::value())) - { - - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - T ten; - ten = ui_type(10u); - eval_log(result, ten); - digits = boost::multiprecision::detail::digits2<number<T> >::value(); - } - - return result; -} - -template <class T> -void eval_log10(T& result, const T& arg) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The log10 function is only valid for floating point types."); - eval_log(result, arg); - eval_divide(result, get_constant_log10<T>()); -} - -template <class R, class T> -inline void eval_log2(R& result, const T& a) -{ - eval_log(result, a); - eval_divide(result, get_constant_ln2<R>()); -} - -template<typename T> -inline void eval_pow(T& result, const T& x, const T& a) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The pow function is only valid for floating point types."); - typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - if((&result == &x) || (&result == &a)) - { - T t; - eval_pow(t, x, a); - result = t; - return; - } - - if((a.compare(si_type(1)) == 0) || (x.compare(si_type(1)) == 0)) - { - result = x; - return; - } - if(a.compare(si_type(0)) == 0) - { - result = si_type(1); - return; - } - - int type = eval_fpclassify(x); - - switch(type) - { - case 2: - switch(eval_fpclassify(a)) - { - case 2: - result = si_type(1); - break; - case 0: - result = a; - break; - case 4: - { - - try - { - typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type i; - eval_convert_to(&i, a); - if(a.compare(i) == 0) - { - if(eval_signbit(a)) - { - if(i & 1) - { - result = std::numeric_limits<number<T> >::infinity().backend(); - if(eval_signbit(x)) - result.negate(); - (*__errno_location ()) = 34; - } - else - { - result = std::numeric_limits<number<T> >::infinity().backend(); - (*__errno_location ()) = 34; - } - } - else if(i & 1) - { - result = x; - } - else - result = si_type(0); - return; - } - } - catch(const std::exception&) - { - - } - __attribute__((fallthrough)); - } - default: - if(eval_signbit(a)) - { - result = std::numeric_limits<number<T> >::infinity().backend(); - (*__errno_location ()) = 34; - } - else - result = x; - break; - } - return; - case 0: - result = x; - (*__errno_location ()) = 34; - return; - default: ; - } - - int s = eval_get_sign(a); - if(s == 0) - { - result = si_type(1); - return; - } - - if(s < 0) - { - T t, da; - t = a; - t.negate(); - eval_pow(da, x, t); - eval_divide(result, si_type(1), da); - return; - } - - typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type an; - typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type max_an = - std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ? - (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::max)() : - static_cast<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>(1) << (sizeof(typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type) * 8 - 2); - typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type min_an = - std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ? - (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::min)() : - -min_an; - - - T fa; - - try - { - - eval_convert_to(&an, a); - if(a.compare(an) == 0) - { - detail::pow_imp(result, x, an, mpl::true_()); - return; - } - - } - catch(const std::exception&) - { - - an = (std::numeric_limits<boost::intmax_t>::max)(); - } - - if((eval_get_sign(x) < 0)) - { - typename boost::multiprecision::detail::canonical<boost::uintmax_t, T>::type aun; - - try - { - - eval_convert_to(&aun, a); - if(a.compare(aun) == 0) - { - fa = x; - fa.negate(); - eval_pow(result, fa, a); - if(aun & 1u) - result.negate(); - return; - } - - } - catch(const std::exception&) - { - - } - - eval_floor(result, a); - - if((x.compare(si_type(-1)) == 0) && (eval_fpclassify(a) == 1)) - { - result = si_type(1); - } - else if(a.compare(result) == 0) - { - - if(x.compare(si_type(-1)) < 0) - { - result = std::numeric_limits<number<T, et_on> >::infinity().backend(); - } - else - { - result = si_type(0); - } - } - else if(type == 1) - { - result = std::numeric_limits<number<T, et_on> >::infinity().backend(); - } - else if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - { - ::boost::exception_detail::throw_exception_(std::domain_error("Result of pow is undefined or non-real and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/pow.hpp",660); - } - return; - } - - T t, da; - - eval_subtract(da, a, an); - - if((x.compare(fp_type(0.5)) >= 0) && (x.compare(fp_type(0.9)) < 0) && (an < max_an) && (an > min_an)) - { - if(a.compare(fp_type(1e-5f)) <= 0) - { - - eval_log(t, x); - eval_multiply(t, a); - hyp0F0(result, t); - return; - } - else - { - - - if(an) - { - da.negate(); - t = si_type(1); - eval_subtract(t, x); - hyp1F0(result, da, t); - detail::pow_imp(t, x, an, mpl::true_()); - eval_multiply(result, t); - } - else - { - da = a; - da.negate(); - t = si_type(1); - eval_subtract(t, x); - hyp1F0(result, da, t); - } - } - } - else - { - - - if(an) - { - eval_log(t, x); - eval_multiply(t, da); - eval_exp(result, t); - detail::pow_imp(t, x, an, mpl::true_()); - eval_multiply(result, t); - } - else - { - eval_log(t, x); - eval_multiply(t, a); - eval_exp(result, t); - } - } -} - -template<class T, class A> - - - -inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value && !is_integral<A>::value, void>::type - - eval_pow(T& result, const T& x, const A& a) -{ - - - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = a; - eval_pow(result, x, c); -} - -template<class T, class A> - - - -inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value, void>::type - - eval_pow(T& result, const A& x, const T& a) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = x; - eval_pow(result, c, a); -} - -template <class T> -void eval_exp2(T& result, const T& arg) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types."); - - - typename boost::multiprecision::detail::canonical<typename T::exponent_type, T>::type i; - T temp; - try { - eval_trunc(temp, arg); - eval_convert_to(&i, temp); - if(arg.compare(i) == 0) - { - temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u); - eval_ldexp(result, temp, i); - return; - } - } - catch(const boost::math::rounding_error&) - { } - catch(const std::runtime_error&) - { } - - temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(2u); - eval_pow(result, temp, arg); -} - -namespace detail{ - - template <class T> - void small_sinh_series(T x, T& result) - { - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - bool neg = eval_get_sign(x) < 0; - if(neg) - x.negate(); - T p(x); - T mult(x); - eval_multiply(mult, x); - result = x; - ui_type k = 1; - - T lim(x); - eval_ldexp(lim, lim, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - - do - { - eval_multiply(p, mult); - eval_divide(p, ++k); - eval_divide(p, ++k); - eval_add(result, p); - }while(p.compare(lim) >= 0); - if(neg) - result.negate(); - } - - template <class T> - void sinhcosh(const T& x, T* p_sinh, T* p_cosh) - { - typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - switch(eval_fpclassify(x)) - { - case 0: - (*__errno_location ()) = 33; - - case 1: - if(p_sinh) - *p_sinh = x; - if(p_cosh) - { - *p_cosh = x; - if(eval_get_sign(x) < 0) - p_cosh->negate(); - } - return; - case 2: - if(p_sinh) - *p_sinh = x; - if(p_cosh) - *p_cosh = ui_type(1); - return; - default: ; - } - - bool small_sinh = eval_get_sign(x) < 0 ? x.compare(fp_type(-0.5)) > 0 : x.compare(fp_type(0.5)) < 0; - - if(p_cosh || !small_sinh) - { - T e_px, e_mx; - eval_exp(e_px, x); - eval_divide(e_mx, ui_type(1), e_px); - if(eval_signbit(e_mx) != eval_signbit(e_px)) - e_mx.negate(); - - if(p_sinh) - { - if(small_sinh) - { - small_sinh_series(x, *p_sinh); - } - else - { - eval_subtract(*p_sinh, e_px, e_mx); - eval_ldexp(*p_sinh, *p_sinh, -1); - } - } - if(p_cosh) - { - eval_add(*p_cosh, e_px, e_mx); - eval_ldexp(*p_cosh, *p_cosh, -1); - } - } - else - { - small_sinh_series(x, *p_sinh); - } - } - -} - -template <class T> -inline void eval_sinh(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The sinh function is only valid for floating point types."); - detail::sinhcosh(x, &result, static_cast<T*>(0)); -} - -template <class T> -inline void eval_cosh(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The cosh function is only valid for floating point types."); - detail::sinhcosh(x, static_cast<T*>(0), &result); -} - -template <class T> -inline void eval_tanh(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The tanh function is only valid for floating point types."); - T c; - detail::sinhcosh(x, &result, &c); - if((eval_fpclassify(result) == 1) && (eval_fpclassify(c) == 1)) - { - bool s = eval_signbit(result) != eval_signbit(c); - result = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u); - if(s) - result.negate(); - return; - } - eval_divide(result, c); -} -# 1876 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/functions/trig.hpp" 1 3 4 -# 20 "/usr/include/boost/multiprecision/detail/functions/trig.hpp" 3 4 -template <class T> -void hyp0F1(T& result, const T& b, const T& x) -{ - typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - - - - - - T x_pow_n_div_n_fact(x); - T pochham_b (b); - T bp (b); - - eval_divide(result, x_pow_n_div_n_fact, pochham_b); - eval_add(result, ui_type(1)); - - si_type n; - - T tol; - tol = ui_type(1); - eval_ldexp(tol, tol, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - eval_multiply(tol, result); - if(eval_get_sign(tol) < 0) - tol.negate(); - T term; - - const int series_limit = - boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100 - ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value(); - - for(n = 2; n < series_limit; ++n) - { - eval_multiply(x_pow_n_div_n_fact, x); - eval_divide(x_pow_n_div_n_fact, n); - eval_increment(bp); - eval_multiply(pochham_b, bp); - - eval_divide(term, x_pow_n_div_n_fact, pochham_b); - eval_add(result, term); - - bool neg_term = eval_get_sign(term) < 0; - if(neg_term) - term.negate(); - if(term.compare(tol) <= 0) - break; - } - - if(n >= series_limit) - ::boost::exception_detail::throw_exception_(std::runtime_error("H0F1 Failed to Converge"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",69); -} - - -template <class T> -void eval_sin(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The sin function is only valid for floating point types."); - if(&result == &x) - { - T temp; - eval_sin(temp, x); - result = temp; - return; - } - - typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - switch(eval_fpclassify(x)) - { - case 1: - case 0: - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",99); - return; - case 2: - result = x; - return; - default: ; - } - - - T xx = x; - - - - - bool b_negate_sin = false; - - if(eval_get_sign(x) < 0) - { - xx.negate(); - b_negate_sin = !b_negate_sin; - } - - T n_pi, t; - - if(xx.compare(get_constant_pi<T>()) > 0) - { - eval_divide(n_pi, xx, get_constant_pi<T>()); - eval_trunc(n_pi, n_pi); - t = ui_type(2); - eval_fmod(t, n_pi, t); - const bool b_n_pi_is_even = eval_get_sign(t) == 0; - eval_multiply(n_pi, get_constant_pi<T>()); - if (n_pi.compare(get_constant_one_over_epsilon<T>()) > 0) - { - result = ui_type(0); - return; - } - else - eval_subtract(xx, n_pi); - - ; - ; - - - if(!b_n_pi_is_even) - { - b_negate_sin = !b_negate_sin; - } - } - - - eval_ldexp(t, get_constant_pi<T>(), -1); - if(xx.compare(t) > 0) - { - eval_subtract(xx, get_constant_pi<T>(), xx); - ; - } - - eval_subtract(t, xx); - const bool b_zero = eval_get_sign(xx) == 0; - const bool b_pi_half = eval_get_sign(t) == 0; - - - const bool b_near_zero = xx.compare(fp_type(1e-1)) < 0; - const bool b_near_pi_half = t.compare(fp_type(1e-1)) < 0;; - - if(b_zero) - { - result = ui_type(0); - } - else if(b_pi_half) - { - result = ui_type(1); - } - else if(b_near_zero) - { - eval_multiply(t, xx, xx); - eval_divide(t, si_type(-4)); - T t2; - t2 = fp_type(1.5); - hyp0F1(result, t2, t); - ; - eval_multiply(result, xx); - } - else if(b_near_pi_half) - { - eval_multiply(t, t); - eval_divide(t, si_type(-4)); - T t2; - t2 = fp_type(0.5); - hyp0F1(result, t2, t); - ; - } - else - { - - - - - - static const si_type n_scale = 9; - static const si_type n_three_pow_scale = static_cast<si_type>(19683L); - - eval_divide(xx, n_three_pow_scale); - - - eval_multiply(t, xx, xx); - eval_divide(t, si_type(-4)); - T t2; - t2 = fp_type(1.5); - hyp0F1(result, t2, t); - ; - eval_multiply(result, xx); - - - for(boost::int32_t k = static_cast<boost::int32_t>(0); k < n_scale; k++) - { - - eval_multiply(t2, result, ui_type(3)); - eval_multiply(t, result, result); - eval_multiply(t, result); - eval_multiply(t, ui_type(4)); - eval_subtract(result, t2, t); - } - } - - if(b_negate_sin) - result.negate(); -} - -template <class T> -void eval_cos(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The cos function is only valid for floating point types."); - if(&result == &x) - { - T temp; - eval_cos(temp, x); - result = temp; - return; - } - - typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - switch(eval_fpclassify(x)) - { - case 1: - case 0: - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",255); - return; - case 2: - result = ui_type(1); - return; - default: ; - } - - - T xx = x; - - - - - bool b_negate_cos = false; - - if(eval_get_sign(x) < 0) - { - xx.negate(); - } - - T n_pi, t; - - if(xx.compare(get_constant_pi<T>()) > 0) - { - eval_divide(t, xx, get_constant_pi<T>()); - eval_trunc(n_pi, t); - ; - eval_multiply(t, n_pi, get_constant_pi<T>()); - ; - - - - - - - - if (n_pi.compare(get_constant_one_over_epsilon<T>()) > 0) - { - result = ui_type(1); - return; - } - else - eval_subtract(xx, t); - ; - - - t = ui_type(2); - eval_fmod(t, n_pi, t); - const bool b_n_pi_is_even = eval_get_sign(t) == 0; - - if(!b_n_pi_is_even) - { - b_negate_cos = !b_negate_cos; - } - } - - - eval_ldexp(t, get_constant_pi<T>(), -1); - int com = xx.compare(t); - if(com > 0) - { - eval_subtract(xx, get_constant_pi<T>(), xx); - b_negate_cos = !b_negate_cos; - ; - } - - const bool b_zero = eval_get_sign(xx) == 0; - const bool b_pi_half = com == 0; - - - const bool b_near_zero = xx.compare(fp_type(1e-1)) < 0; - - if(b_zero) - { - result = si_type(1); - } - else if(b_pi_half) - { - result = si_type(0); - } - else if(b_near_zero) - { - eval_multiply(t, xx, xx); - eval_divide(t, si_type(-4)); - n_pi = fp_type(0.5f); - hyp0F1(result, n_pi, t); - ; - } - else - { - eval_subtract(t, xx); - eval_sin(result, t); - } - if(b_negate_cos) - result.negate(); -} - -template <class T> -void eval_tan(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The tan function is only valid for floating point types."); - if(&result == &x) - { - T temp; - eval_tan(temp, x); - result = temp; - return; - } - T t; - eval_sin(result, x); - eval_cos(t, x); - eval_divide(result, t); -} - -template <class T> -void hyp2F1(T& result, const T& a, const T& b, const T& c, const T& x) -{ - - - - - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - - T x_pow_n_div_n_fact(x); - T pochham_a (a); - T pochham_b (b); - T pochham_c (c); - T ap (a); - T bp (b); - T cp (c); - - eval_multiply(result, pochham_a, pochham_b); - eval_divide(result, pochham_c); - eval_multiply(result, x_pow_n_div_n_fact); - eval_add(result, ui_type(1)); - - T lim; - eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value()); - - if(eval_get_sign(lim) < 0) - lim.negate(); - - ui_type n; - T term; - - const unsigned series_limit = - boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100 - ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value(); - - for(n = 2; n < series_limit; ++n) - { - eval_multiply(x_pow_n_div_n_fact, x); - eval_divide(x_pow_n_div_n_fact, n); - - eval_increment(ap); - eval_multiply(pochham_a, ap); - eval_increment(bp); - eval_multiply(pochham_b, bp); - eval_increment(cp); - eval_multiply(pochham_c, cp); - - eval_multiply(term, pochham_a, pochham_b); - eval_divide(term, pochham_c); - eval_multiply(term, x_pow_n_div_n_fact); - eval_add(result, term); - - if(eval_get_sign(term) < 0) - term.negate(); - if(lim.compare(term) >= 0) - break; - } - if(n > series_limit) - ::boost::exception_detail::throw_exception_(std::runtime_error("H2F1 failed to converge."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",428); -} - -template <class T> -void eval_asin(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The asin function is only valid for floating point types."); - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - if(&result == &x) - { - T t(x); - eval_asin(result, t); - return; - } - - switch(eval_fpclassify(x)) - { - case 0: - case 1: - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",455); - return; - case 2: - result = x; - return; - default: ; - } - - const bool b_neg = eval_get_sign(x) < 0; - - T xx(x); - if(b_neg) - xx.negate(); - - int c = xx.compare(ui_type(1)); - if(c > 0) - { - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",478); - return; - } - else if(c == 0) - { - result = get_constant_pi<T>(); - eval_ldexp(result, result, -1); - if(b_neg) - result.negate(); - return; - } - - if(xx.compare(fp_type(1e-4)) < 0) - { - - eval_multiply(xx, xx); - T t1, t2; - t1 = fp_type(0.5f); - t2 = fp_type(1.5f); - hyp2F1(result, t1, t1, t2, xx); - eval_multiply(result, x); - return; - } - else if(xx.compare(fp_type(1 - 1e-4f)) > 0) - { - T dx1; - T t1, t2; - eval_subtract(dx1, ui_type(1), xx); - t1 = fp_type(0.5f); - t2 = fp_type(1.5f); - eval_ldexp(dx1, dx1, -1); - hyp2F1(result, t1, t1, t2, dx1); - eval_ldexp(dx1, dx1, 2); - eval_sqrt(t1, dx1); - eval_multiply(result, t1); - eval_ldexp(t1, get_constant_pi<T>(), -1); - result.negate(); - eval_add(result, t1); - if(b_neg) - result.negate(); - return; - } - - typedef typename boost::multiprecision::detail::canonical<long double, T>::type guess_type; - - - - - guess_type dd; - eval_convert_to(&dd, xx); - - result = (guess_type)(std::asin(dd)); - - - - - - - boost::intmax_t current_precision = eval_ilogb(result); - boost::intmax_t target_precision = current_precision - 1 - (std::numeric_limits<number<T> >::digits * 2) / 3; - - - while(current_precision > target_precision) - { - T sine, cosine; - eval_sin(sine, result); - eval_cos(cosine, result); - eval_subtract(sine, xx); - eval_divide(sine, cosine); - eval_subtract(result, sine); - current_precision = eval_ilogb(sine); - if(current_precision <= (std::numeric_limits<typename T::exponent_type>::min)() + 1) - break; - } - if(b_neg) - result.negate(); -} - -template <class T> -inline void eval_acos(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The acos function is only valid for floating point types."); - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - - switch(eval_fpclassify(x)) - { - case 0: - case 1: - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",572); - return; - case 2: - result = get_constant_pi<T>(); - eval_ldexp(result, result, -1); - return; - } - - eval_abs(result, x); - int c = result.compare(ui_type(1)); - - if(c > 0) - { - if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN) - { - result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend(); - (*__errno_location ()) = 33; - } - else - ::boost::exception_detail::throw_exception_(std::domain_error("Result is undefined or complex and there is no NaN for this number type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/functions/trig.hpp",591); - return; - } - else if(c == 0) - { - if(eval_get_sign(x) < 0) - result = get_constant_pi<T>(); - else - result = ui_type(0); - return; - } - - eval_asin(result, x); - T t; - eval_ldexp(t, get_constant_pi<T>(), -1); - eval_subtract(result, t); - result.negate(); -} - -template <class T> -void eval_atan(T& result, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The atan function is only valid for floating point types."); - typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - typedef typename mpl::front<typename T::float_types>::type fp_type; - - switch(eval_fpclassify(x)) - { - case 0: - result = x; - (*__errno_location ()) = 33; - return; - case 2: - result = x; - return; - case 1: - if(eval_get_sign(x) < 0) - { - eval_ldexp(result, get_constant_pi<T>(), -1); - result.negate(); - } - else - eval_ldexp(result, get_constant_pi<T>(), -1); - return; - default: ; - } - - const bool b_neg = eval_get_sign(x) < 0; - - T xx(x); - if(b_neg) - xx.negate(); - - if(xx.compare(fp_type(0.1)) < 0) - { - T t1, t2, t3; - t1 = ui_type(1); - t2 = fp_type(0.5f); - t3 = fp_type(1.5f); - eval_multiply(xx, xx); - xx.negate(); - hyp2F1(result, t1, t2, t3, xx); - eval_multiply(result, x); - return; - } - - if(xx.compare(fp_type(10)) > 0) - { - T t1, t2, t3; - t1 = fp_type(0.5f); - t2 = ui_type(1u); - t3 = fp_type(1.5f); - eval_multiply(xx, xx); - eval_divide(xx, si_type(-1), xx); - hyp2F1(result, t1, t2, t3, xx); - eval_divide(result, x); - if(!b_neg) - result.negate(); - eval_ldexp(t1, get_constant_pi<T>(), -1); - eval_add(result, t1); - if(b_neg) - result.negate(); - return; - } - - - - fp_type d; - eval_convert_to(&d, xx); - result = fp_type(std::atan(d)); - - - - - - - boost::intmax_t current_precision = eval_ilogb(result); - boost::intmax_t target_precision = current_precision - 1 - (std::numeric_limits<number<T> >::digits * 2) / 3; - - T s, c, t; - while(current_precision > target_precision) - { - eval_sin(s, result); - eval_cos(c, result); - eval_multiply(t, xx, c); - eval_subtract(t, s); - eval_multiply(s, t, c); - eval_add(result, s); - current_precision = eval_ilogb(s); - if(current_precision <= (std::numeric_limits<typename T::exponent_type>::min)() + 1) - break; - } - if(b_neg) - result.negate(); -} - -template <class T> -void eval_atan2(T& result, const T& y, const T& x) -{ - static_assert(number_category<T>::value == number_kind_floating_point, "The atan2 function is only valid for floating point types."); - if(&result == &y) - { - T temp(y); - eval_atan2(result, temp, x); - return; - } - else if(&result == &x) - { - T temp(x); - eval_atan2(result, y, temp); - return; - } - - typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; - - switch(eval_fpclassify(y)) - { - case 0: - result = y; - (*__errno_location ()) = 33; - return; - case 2: - { - if(eval_signbit(x)) - { - result = get_constant_pi<T>(); - if(eval_signbit(y)) - result.negate(); - } - else - { - result = y; - } - return; - } - case 1: - { - if(eval_fpclassify(x) == 1) - { - if(eval_signbit(x)) - { - - eval_ldexp(result, get_constant_pi<T>(), -2); - eval_subtract(result, get_constant_pi<T>()); - if(eval_get_sign(y) >= 0) - result.negate(); - } - else - { - - eval_ldexp(result, get_constant_pi<T>(), -2); - if(eval_get_sign(y) < 0) - result.negate(); - } - } - else - { - eval_ldexp(result, get_constant_pi<T>(), -1); - if(eval_get_sign(y) < 0) - result.negate(); - } - return; - } - } - - switch(eval_fpclassify(x)) - { - case 0: - result = x; - (*__errno_location ()) = 33; - return; - case 2: - { - eval_ldexp(result, get_constant_pi<T>(), -1); - if(eval_get_sign(y) < 0) - result.negate(); - return; - } - case 1: - if(eval_get_sign(x) > 0) - result = ui_type(0); - else - result = get_constant_pi<T>(); - if(eval_get_sign(y) < 0) - result.negate(); - return; - } - - T xx; - eval_divide(xx, y, x); - if(eval_get_sign(xx) < 0) - xx.negate(); - - eval_atan(result, xx); - - - const bool y_neg = eval_get_sign(y) < 0; - const bool x_neg = eval_get_sign(x) < 0; - - if(y_neg != x_neg) - result.negate(); - - if(x_neg) - { - if(y_neg) - eval_subtract(result, get_constant_pi<T>()); - else - eval_add(result, get_constant_pi<T>()); - } -} -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_atan2(T& result, const T& x, const A& a) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = a; - eval_atan2(result, x, c); -} - -template<class T, class A> -inline typename enable_if<is_arithmetic<A>, void>::type eval_atan2(T& result, const A& x, const T& a) -{ - typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type; - typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type; - cast_type c; - c = x; - eval_atan2(result, c, a); -} -# 1877 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 - -} - - - - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline int fpclassify (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - using multiprecision::default_ops::eval_fpclassify; - return eval_fpclassify(arg.backend()); -} -template <class tag, class A1, class A2, class A3, class A4> -inline int fpclassify (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return fpclassify (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline bool isfinite (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - int v = fpclassify (arg); - return (v != (int)1) && (v != (int)0); -} -template <class tag, class A1, class A2, class A3, class A4> -inline bool isfinite (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return isfinite (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline bool isnan (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - return fpclassify (arg) == (int)0; -} -template <class tag, class A1, class A2, class A3, class A4> -inline bool isnan (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return isnan (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline bool isinf (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - return fpclassify (arg) == (int)1; -} -template <class tag, class A1, class A2, class A3, class A4> -inline bool isinf (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return isinf (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline bool isnormal (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - return fpclassify (arg) == (int)4; -} -template <class tag, class A1, class A2, class A3, class A4> -inline bool isnormal (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return isnormal (value_type(arg)); -} - - - - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline int sign (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - return arg.sign(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline int sign (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return sign (value_type(arg)); -} - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline int signbit (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - using default_ops::eval_signbit; - return eval_signbit(arg.backend()); -} -template <class tag, class A1, class A2, class A3, class A4> -inline int signbit (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return signbit (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<Backend, ExpressionTemplates> changesign (const multiprecision::number<Backend, ExpressionTemplates>& arg) -{ - return -arg; -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type changesign (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return changesign (value_type(arg)); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<Backend, ExpressionTemplates> copysign (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) -{ - return (boost::multiprecision::signbit)(a) != (boost::multiprecision::signbit)(b) ? (boost::multiprecision::changesign)(a) : a; -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> -inline multiprecision::number<Backend, ExpressionTemplates> copysign (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b) -{ - return copysign (a, multiprecision::number<Backend, ExpressionTemplates>(b)); -} -template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<Backend, ExpressionTemplates> copysign (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) -{ - return copysign (multiprecision::number<Backend, ExpressionTemplates>(a), b); -} -template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> -inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type copysign (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - return copysign (value_type(a), value_type(b)); -} - - - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type - real(const multiprecision::number<Backend, ExpressionTemplates>& a) -{ - using default_ops::eval_real; - typedef typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result_type; - boost::multiprecision::detail::scoped_default_precision<result_type> precision_guard(a); - result_type result; - eval_real(result.backend(), a.backend()); - return result; -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type - imag(const multiprecision::number<Backend, ExpressionTemplates>& a) -{ - using default_ops::eval_imag; - typedef typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result_type; - boost::multiprecision::detail::scoped_default_precision<result_type> precision_guard(a); - result_type result; - eval_imag(result.backend(), a.backend()); - return result; -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type - real(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return real(value_type(arg)); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type - imag(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return imag(value_type(arg)); -} - - - - - -template <class T, expression_template_option ExpressionTemplates> -inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type - abs(const number<T, ExpressionTemplates>& v) -{ - return std::move(boost::math::hypot(real(v), imag(v))); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename boost::lazy_enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type> >::type - abs(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(abs(static_cast<number_type>(v))); -} - -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type -arg(const number<T, ExpressionTemplates>& v) -{ - return std::move(atan2(imag(v), real(v))); -} -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type -arg(const number<T, ExpressionTemplates>&) -{ - return 0; -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex || number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type -arg(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(arg(static_cast<number_type>(v))); -} - -template <class T, expression_template_option ExpressionTemplates> -inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type -norm(const number<T, ExpressionTemplates>& v) -{ - typename component_type<number<T, ExpressionTemplates> >::type a(real(v)), b(imag(v)); - return std::move(a * a + b * b); -} -template <class T, expression_template_option ExpressionTemplates> -inline typename boost::enable_if_c<number_category<T>::value != number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type >::type -norm(const number<T, ExpressionTemplates>& v) -{ - return v * v; -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type -norm(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(norm(static_cast<number_type>(v))); -} - -template <class Backend, expression_template_option ExpressionTemplates> -typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r, number<Backend, ExpressionTemplates> const& theta) -{ - return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta))); -} - -template <class tag, class A1, class A2, class A3, class A4, class Backend, expression_template_option ExpressionTemplates> -typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value, - typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type - polar(detail::expression<tag, A1, A2, A3, A4> const& r, number<Backend, ExpressionTemplates> const& theta) -{ - return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta))); -} - -template <class Backend, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> -typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value, - typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type - polar(number<Backend, ExpressionTemplates> const& r, detail::expression<tag, A1, A2, A3, A4> const& theta) -{ - return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta))); -} - -template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> -typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, typename detail::expression<tagb, A1b, A2b, A3b, A4b>::result_type >::value, - typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type >::type>::type - polar(detail::expression<tag, A1, A2, A3, A4> const& r, detail::expression<tagb, A1b, A2b, A3b, A4b> const& theta) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type; - return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta))); -} - - - -template <class Scalar, class Backend, expression_template_option ExpressionTemplates> -typename boost::enable_if_c<boost::is_arithmetic<Scalar>::value, typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type - polar(Scalar const& r, number<Backend, ExpressionTemplates> const& theta) -{ - return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta))); -} - -template <class tag, class A1, class A2, class A3, class A4, class Scalar> -typename enable_if_c<boost::is_arithmetic<Scalar>::value, - typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type - polar(Scalar const& r, detail::expression<tag, A1, A2, A3, A4> const& theta) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type; - return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta))); -} - - - -template <class Backend, expression_template_option ExpressionTemplates> -typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r) -{ - return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(r); -} - -template <class tag, class A1, class A2, class A3, class A4> -typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type - polar(detail::expression<tag, A1, A2, A3, A4> const& r) -{ - return typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type(r); -} - - - -} - -namespace math { - - - - - using boost::multiprecision::signbit; - using boost::multiprecision::sign; - using boost::multiprecision::copysign; - using boost::multiprecision::changesign; - using boost::multiprecision::fpclassify; - using boost::multiprecision::isinf; - using boost::multiprecision::isnan; - using boost::multiprecision::isnormal; - using boost::multiprecision::isfinite; - -} - -namespace multiprecision{ - - typedef ::boost::math::policies::policy< - ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>, - ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>, - ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>, - ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>, - ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error> - > c99_error_policy; - - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type - asinh (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::asinh(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type - asinh (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type > precision_guard(arg); - return asinh(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type - acosh (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::acosh(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type - acosh (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type > precision_guard(arg); - return acosh(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type - atanh (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::atanh(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type - atanh (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type > precision_guard(arg); - return atanh(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> cbrt (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::cbrt(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type cbrt (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return cbrt(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> erf (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::erf(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erf (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return erf(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> erfc (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::erfc(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erfc (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return erfc(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> expm1 (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::expm1(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type expm1 (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return expm1(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> lgamma (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - multiprecision::number<Backend, ExpressionTemplates> result; - result = boost::math::lgamma(arg, c99_error_policy()); - if((boost::multiprecision::isnan)(result) && !(boost::multiprecision::isnan)(arg)) - { - result = std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::infinity(); - (*__errno_location ()) = 34; - } - return result; - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type lgamma (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return lgamma(value_type(arg)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> tgamma (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - if((arg == 0) && std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::has_infinity) - { - (*__errno_location ()) = 34; - return 1 / arg; - } - return boost::math::tgamma(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type tgamma (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return tgamma(value_type(arg)); - } - - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline long lrint (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - return lround(arg); - } - template <class tag, class A1, class A2, class A3, class A4> - inline long lrint (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - return lround(arg); - } - - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline boost::long_long_type llrint (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - return llround(arg); - } - template <class tag, class A1, class A2, class A3, class A4> - inline boost::long_long_type llrint (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - return llround(arg); - } - - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> log1p (const multiprecision::number<Backend, ExpressionTemplates>& arg) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg); - return boost::math::log1p(arg, c99_error_policy()); - } - template <class tag, class A1, class A2, class A3, class A4> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type log1p (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(arg); - return log1p(value_type(arg)); - } - - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> nextafter (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return boost::math::nextafter(a, b, c99_error_policy()); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> - inline multiprecision::number<Backend, ExpressionTemplates> nextafter (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return nextafter (a, multiprecision::number<Backend, ExpressionTemplates>(b)); - } - template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> nextafter (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return nextafter (multiprecision::number<Backend, ExpressionTemplates>(a), b); - } - template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nextafter (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(a, b); - return nextafter (value_type(a), value_type(b)); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> nexttoward (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return boost::math::nextafter(a, b, c99_error_policy()); - } - template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> - inline multiprecision::number<Backend, ExpressionTemplates> nexttoward (const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return nexttoward (a, multiprecision::number<Backend, ExpressionTemplates>(b)); - } - template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates> - inline multiprecision::number<Backend, ExpressionTemplates> nexttoward (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b) - { - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b); - return nexttoward (multiprecision::number<Backend, ExpressionTemplates>(a), b); - } - template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> - inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nexttoward (const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b) - { - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type; - detail::scoped_default_precision<value_type> precision_guard(a, b); - return nexttoward (value_type(a), value_type(b)); - } - -template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3> -inline number<B1, ET1>& add(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b) -{ - static_assert((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists"); - static_assert((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists"); - using default_ops::eval_add; - eval_add(result.backend(), a.backend(), b.backend()); - return result; -} - -template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3> -inline number<B1, ET1>& subtract(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b) -{ - static_assert((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists"); - static_assert((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists"); - using default_ops::eval_subtract; - eval_subtract(result.backend(), a.backend(), b.backend()); - return result; -} - -template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3> -inline number<B1, ET1>& multiply(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b) -{ - static_assert((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists"); - static_assert((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists"); - using default_ops::eval_multiply; - eval_multiply(result.backend(), a.backend(), b.backend()); - return result; -} - -template <class B, expression_template_option ET, class I> -inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type - add(number<B, ET>& result, const I& a, const I& b) -{ - using default_ops::eval_add; - typedef typename detail::canonical<I, B>::type canonical_type; - eval_add(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b)); - return result; -} - -template <class B, expression_template_option ET, class I> -inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type - subtract(number<B, ET>& result, const I& a, const I& b) -{ - using default_ops::eval_subtract; - typedef typename detail::canonical<I, B>::type canonical_type; - eval_subtract(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b)); - return result; -} - -template <class B, expression_template_option ET, class I> -inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type - multiply(number<B, ET>& result, const I& a, const I& b) -{ - using default_ops::eval_multiply; - typedef typename detail::canonical<I, B>::type canonical_type; - eval_multiply(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b)); - return result; -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type trunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(trunc(number_type(v), pol)); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Policy> -inline number<Backend, ExpressionTemplates> trunc(const number<Backend, ExpressionTemplates>& v, const Policy&) -{ - using default_ops::eval_trunc; - detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(v); - number<Backend, ExpressionTemplates> result; - eval_trunc(result.backend(), v.backend()); - return std::move(result); -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(trunc(v, pol)); - if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, number_type(v), 0, pol); - return r.template convert_to<int>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return itrunc(v, boost::math::policies::policy<>()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Policy> -inline int itrunc(const number<Backend, ExpressionTemplates>& v, const Policy& pol) -{ - number<Backend, ExpressionTemplates> r(trunc(v, pol)); - if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, v, 0, pol); - return r.template convert_to<int>(); -} -template <class Backend, expression_template_option ExpressionTemplates> -inline int itrunc(const number<Backend, ExpressionTemplates>& v) -{ - return itrunc(v, boost::math::policies::policy<>()); -} -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(trunc(v, pol)); - if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, number_type(v), 0L, pol); - return r.template convert_to<long>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return ltrunc(v, boost::math::policies::policy<>()); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline long ltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol) -{ - number<T, ExpressionTemplates> r(trunc(v, pol)); - if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, v, 0L, pol); - return r.template convert_to<long>(); -} -template <class T, expression_template_option ExpressionTemplates> -inline long ltrunc(const number<T, ExpressionTemplates>& v) -{ - return ltrunc(v, boost::math::policies::policy<>()); -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(trunc(v, pol)); - if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, number_type(v), 0LL, pol); - return r.template convert_to<boost::long_long_type>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return lltrunc(v, boost::math::policies::policy<>()); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol) -{ - number<T, ExpressionTemplates> r(trunc(v, pol)); - if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, v, 0LL, pol); - return r.template convert_to<boost::long_long_type>(); -} -template <class T, expression_template_option ExpressionTemplates> -inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v) -{ - return lltrunc(v, boost::math::policies::policy<>()); -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type round(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(round(static_cast<number_type>(v), pol)); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline number<T, ExpressionTemplates> round(const number<T, ExpressionTemplates>& v, const Policy&) -{ - using default_ops::eval_round; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_round(result.backend(), v.backend()); - return std::move(result); -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(round(v, pol)); - if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0, pol); - return r.template convert_to<int>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return iround(v, boost::math::policies::policy<>()); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline int iround(const number<T, ExpressionTemplates>& v, const Policy& pol) -{ - number<T, ExpressionTemplates> r(round(v, pol)); - if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0, pol); - return r.template convert_to<int>(); -} -template <class T, expression_template_option ExpressionTemplates> -inline int iround(const number<T, ExpressionTemplates>& v) -{ - return iround(v, boost::math::policies::policy<>()); -} -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(round(v, pol)); - if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, number_type(v), 0L, pol); - return r.template convert_to<long>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return lround(v, boost::math::policies::policy<>()); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline long lround(const number<T, ExpressionTemplates>& v, const Policy& pol) -{ - number<T, ExpressionTemplates> r(round(v, pol)); - if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, v, 0L, pol); - return r.template convert_to<long>(); -} -template <class T, expression_template_option ExpressionTemplates> -inline long lround(const number<T, ExpressionTemplates>& v) -{ - return lround(v, boost::math::policies::policy<>()); -} - -template <class tag, class A1, class A2, class A3, class A4, class Policy> -inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type r(round(v, pol)); - if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0LL, pol); - return r.template convert_to<boost::long_long_type>(); -} -template <class tag, class A1, class A2, class A3, class A4> -inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v) -{ - return llround(v, boost::math::policies::policy<>()); -} -template <class T, expression_template_option ExpressionTemplates, class Policy> -inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v, const Policy& pol) -{ - number<T, ExpressionTemplates> r(round(v, pol)); - if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v)) - return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0LL, pol); - return r.template convert_to<boost::long_long_type>(); -} -template <class T, expression_template_option ExpressionTemplates> -inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v) -{ - return llround(v, boost::math::policies::policy<>()); -} - - - - - - -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, short* pint) -{ - using default_ops::eval_frexp; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_frexp(result.backend(), v.backend(), pint); - return std::move(result); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type - frexp(const detail::expression<tag, A1, A2, A3, A4>& v, short* pint) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(frexp(static_cast<number_type>(v), pint)); -} -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, int* pint) -{ - using default_ops::eval_frexp; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_frexp(result.backend(), v.backend(), pint); - return std::move(result); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type -frexp(const detail::expression<tag, A1, A2, A3, A4>& v, int* pint) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(frexp(static_cast<number_type>(v), pint)); -} -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, long* pint) -{ - using default_ops::eval_frexp; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_frexp(result.backend(), v.backend(), pint); - return std::move(result); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type -frexp(const detail::expression<tag, A1, A2, A3, A4>& v, long* pint) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(frexp(static_cast<number_type>(v), pint)); -} -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, boost::long_long_type* pint) -{ - using default_ops::eval_frexp; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_frexp(result.backend(), v.backend(), pint); - return std::move(result); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type -frexp(const detail::expression<tag, A1, A2, A3, A4>& v, boost::long_long_type* pint) -{ - typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - return std::move(frexp(static_cast<number_type>(v), pint)); -} - - - - - -template <class T, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const number<T, ExpressionTemplates>& v, number<T, ExpressionTemplates>* pipart) -{ - using default_ops::eval_modf; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result; - eval_modf(result.backend(), v.backend(), pipart ? &pipart->backend() : 0); - return std::move(result); -} -template <class T, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const detail::expression<tag, A1, A2, A3, A4>& v, number<T, ExpressionTemplates>* pipart) -{ - using default_ops::eval_modf; - detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v); - number<T, ExpressionTemplates> result, arg(v); - eval_modf(result.backend(), arg.backend(), pipart ? &pipart->backend() : 0); - return std::move(result); -} - - - - -template <class B, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type - sqrt(const number<B, ExpressionTemplates>& x) -{ - using default_ops::eval_integer_sqrt; - number<B, ExpressionTemplates> s, r; - eval_integer_sqrt(s.backend(), r.backend(), x.backend()); - return s; -} - - - - -namespace default_ops { - - struct fma_func - { - template <class B, class T, class U, class V> - void operator()(B& result, const T& a, const U& b, const V& c)const - { - eval_multiply_add(result, a, b, c); - } - }; - - -} - -template <class Backend, class U, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>, - mpl::or_< - is_number<U>, - is_number_expression<U>, - is_arithmetic<U> - >, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V> ->::type -fma(const number<Backend, et_on>& a, const U& b, const V& c) -{ - return detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V>( - default_ops::fma_func(), a, b, c); -} - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>, - mpl::or_< - is_number<U>, - is_number_expression<U>, - is_arithmetic<U> - >, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V> ->::type -fma(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, const V& c) -{ - return detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V>( - default_ops::fma_func(), a, b, c); -} - -template <class Backend, class U, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>, - mpl::or_< - is_number<U>, - is_number_expression<U>, - is_arithmetic<U> - >, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - number<Backend, et_off> ->::type -fma(const number<Backend, et_off>& a, const U& b, const V& c) -{ - using default_ops::eval_multiply_add; - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c); - number<Backend, et_off> result; - eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c)); - return std::move(result); -} - -template <class U, class Backend, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>, - is_arithmetic<U>, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V> ->::type -fma(const U& a, const number<Backend, et_on>& b, const V& c) -{ - return detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V>( - default_ops::fma_func(), a, b, c); -} - -template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>, - is_arithmetic<U>, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> ->::type -fma(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, const V& c) -{ - return detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>( - default_ops::fma_func(), a, b, c); -} - -template <class U, class Backend, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>, - is_arithmetic<U>, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_arithmetic<V> - > - >, - number<Backend, et_off> ->::type -fma(const U& a, const number<Backend, et_off>& b, const V& c) -{ - using default_ops::eval_multiply_add; - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c); - number<Backend, et_off> result; - eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c)); - return std::move(result); -} - -template <class U, class V, class Backend> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>, - is_arithmetic<U>, - is_arithmetic<V> - >, - detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> > ->::type -fma(const U& a, const V& b, const number<Backend, et_on>& c) -{ - return detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> >( - default_ops::fma_func(), a, b, c); -} - -template <class U, class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>, - is_arithmetic<U>, - is_arithmetic<V> - >, - detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > ->::type -fma(const U& a, const V& b, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& c) -{ - return detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >( - default_ops::fma_func(), a, b, c); -} - -template <class U, class V, class Backend> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>, - is_arithmetic<U>, - is_arithmetic<V> - >, - number<Backend, et_off> ->::type -fma(const U& a, const V& b, const number<Backend, et_off>& c) -{ - using default_ops::eval_multiply_add; - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c); - number<Backend, et_off> result; - eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c)); - return std::move(result); -} - -namespace default_ops { - - struct remquo_func - { - template <class B, class T, class U> - void operator()(B& result, const T& a, const U& b, int* pi)const - { - eval_remquo(result, a, b, pi); - } - }; - -} - -template <class Backend, class U> -inline typename enable_if_c< - number_category<number<Backend, et_on> >::value == number_kind_floating_point, - detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*> ->::type -remquo(const number<Backend, et_on>& a, const U& b, int* pi) -{ - return detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*>( - default_ops::remquo_func(), a, b, pi); -} - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U> -inline typename enable_if_c< - number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point, - detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*> ->::type -remquo(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, int* pi) -{ - return detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*>( - default_ops::remquo_func(), a, b, pi); -} - -template <class U, class Backend> -inline typename enable_if_c< - (number_category<number<Backend, et_on> >::value == number_kind_floating_point) - && !is_number<U>::value && !is_number_expression<U>::value, - detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*> ->::type -remquo(const U& a, const number<Backend, et_on>& b, int* pi) -{ - return detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*>( - default_ops::remquo_func(), a, b, pi); -} - -template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c< - (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point) - && !is_number<U>::value && !is_number_expression<U>::value, - detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*> ->::type -remquo(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, int* pi) -{ - return detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*>( - default_ops::remquo_func(), a, b, pi); -} - -template <class Backend, class U> -inline typename enable_if_c< - number_category<number<Backend, et_on> >::value == number_kind_floating_point, - number<Backend, et_off> ->::type -remquo(const number<Backend, et_off>& a, const U& b, int* pi) -{ - using default_ops::eval_remquo; - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b); - number<Backend, et_off> result; - eval_remquo(result.backend(), a.backend(), number<Backend, et_off>::canonical_value(b), pi); - return std::move(result); -} -template <class U, class Backend> -inline typename enable_if_c< -(number_category<number<Backend, et_on> >::value == number_kind_floating_point) -&& !is_number<U>::value && !is_number_expression<U>::value, -number<Backend, et_off> ->::type -remquo(const U& a, const number<Backend, et_off>& b, int* pi) -{ - using default_ops::eval_remquo; - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b); - number<Backend, et_off> result; - eval_remquo(result.backend(), number<Backend, et_off>::canonical_value(a), b.backend(), pi); - return std::move(result); -} - - -template <class B, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type - sqrt(const number<B, ExpressionTemplates>& x, number<B, ExpressionTemplates>& r) -{ - using default_ops::eval_integer_sqrt; - detail::scoped_default_precision<multiprecision::number<B, ExpressionTemplates> > precision_guard(x, r); - number<B, ExpressionTemplates> s; - eval_integer_sqrt(s.backend(), r.backend(), x.backend()); - return s; -} -# 3494 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 3 4 -namespace detail{ -template <class Backend> -struct abs_funct -{ - void operator()(Backend& result, const Backend& arg)const - { - using default_ops::eval_abs; - eval_abs(result, arg); - } -}; -template <class Backend> -struct conj_funct -{ - void operator()(Backend& result, const Backend& arg)const - { - using default_ops::eval_conj; - eval_conj(result, arg); - } -}; -template <class Backend> -struct proj_funct -{ - void operator()(Backend& result, const Backend& arg)const - { - using default_ops::eval_proj; - eval_proj(result, arg); - } -}; - -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename boost::disable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, - detail::expression< - detail::function - , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> > >::type -abs(const detail::expression<tag, A1, A2, A3, A4>& arg) -{ - return detail::expression< - detail::function - , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> -> ( - detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() - , arg - ); -} -template <class Backend> -inline typename disable_if_c<number_category<Backend>::value == number_kind_complex, - detail::expression< - detail::function - , detail::abs_funct<Backend> - , number<Backend, et_on> > >::type -abs(const number<Backend, et_on>& arg) -{ - return detail::expression< - detail::function - , detail::abs_funct<Backend> - , number<Backend, et_on> - >( - detail::abs_funct<Backend>() - , arg - ); -} -template <class Backend> -inline typename disable_if_c<number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type -abs(const number<Backend, et_off>& arg) -{ - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); - number<Backend, et_off> result; - using default_ops::eval_abs; - eval_abs(result.backend(), arg.backend()); - return std::move(result); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline detail::expression< - detail::function - , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> > -conj(const detail::expression<tag, A1, A2, A3, A4>& arg) -{ - return detail::expression< - detail::function - , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> -> ( - detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() - , arg - ); -} -template <class Backend> -inline detail::expression< - detail::function - , detail::conj_funct<Backend> - , number<Backend, et_on> > -conj(const number<Backend, et_on>& arg) -{ - return detail::expression< - detail::function - , detail::conj_funct<Backend> - , number<Backend, et_on> - >( - detail::conj_funct<Backend>() - , arg - ); -} -template <class Backend> -inline number<Backend, et_off> -conj(const number<Backend, et_off>& arg) -{ - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); - number<Backend, et_off> result; - using default_ops::eval_conj; - eval_conj(result.backend(), arg.backend()); - return std::move(result); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline detail::expression< - detail::function - , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> > -proj(const detail::expression<tag, A1, A2, A3, A4>& arg) -{ - return detail::expression< - detail::function - , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> - , detail::expression<tag, A1, A2, A3, A4> -> ( - detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() - , arg - ); -} -template <class Backend> -inline detail::expression< - detail::function - , detail::proj_funct<Backend> - , number<Backend, et_on> > -proj(const number<Backend, et_on>& arg) -{ - return detail::expression< - detail::function - , detail::proj_funct<Backend> - , number<Backend, et_on> - >( - detail::proj_funct<Backend>() - , arg - ); -} -template <class Backend> -inline number<Backend, et_off> -proj(const number<Backend, et_off>& arg) -{ - detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); - number<Backend, et_off> result; - using default_ops::eval_proj; - eval_proj(result.backend(), arg.backend()); - return std::move(result); -} - -namespace detail{template <class Backend> struct number_kind_floating_pointfabs_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_fabs; eval_fabs(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_fabs; Backend temp; eval_fabs(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfabs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type fabs(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointfabs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointfabs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfabs_funct<Backend> , number<Backend, et_on> > >::type fabs(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointfabs_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointfabs_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type fabs(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_fabs; eval_fabs(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointsqrt_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sqrt; eval_sqrt(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sqrt; Backend temp; eval_sqrt(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sqrt(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsqrt_funct<Backend> , number<Backend, et_on> > >::type sqrt(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsqrt_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointsqrt_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type sqrt(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sqrt; eval_sqrt(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointfloor_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_floor; eval_floor(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_floor; Backend temp; eval_floor(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfloor_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type floor(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointfloor_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointfloor_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfloor_funct<Backend> , number<Backend, et_on> > >::type floor(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointfloor_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointfloor_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type floor(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_floor; eval_floor(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointceil_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_ceil; eval_ceil(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_ceil; Backend temp; eval_ceil(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointceil_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type ceil(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointceil_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointceil_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointceil_funct<Backend> , number<Backend, et_on> > >::type ceil(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointceil_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointceil_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type ceil(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_ceil; eval_ceil(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointtrunc_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_trunc; eval_trunc(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_trunc; Backend temp; eval_trunc(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtrunc_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type trunc(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtrunc_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointtrunc_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtrunc_funct<Backend> , number<Backend, et_on> > >::type trunc(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtrunc_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointtrunc_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type trunc(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_trunc; eval_trunc(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointround_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_round; eval_round(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_round; Backend temp; eval_round(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointround_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type round(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointround_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointround_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointround_funct<Backend> , number<Backend, et_on> > >::type round(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointround_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointround_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type round(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_round; eval_round(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointexp_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_exp; eval_exp(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_exp; Backend temp; eval_exp(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type exp(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointexp_funct<Backend> , number<Backend, et_on> > >::type exp(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointexp_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointexp_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type exp(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_exp; eval_exp(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointexp2_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_exp2; eval_exp2(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_exp2; Backend temp; eval_exp2(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointexp2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type exp2(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointexp2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointexp2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointexp2_funct<Backend> , number<Backend, et_on> > >::type exp2(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointexp2_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointexp2_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type exp2(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_exp2; eval_exp2(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointlog_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_log; eval_log(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_log; Backend temp; eval_log(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type log(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog_funct<Backend> , number<Backend, et_on> > >::type log(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointlog_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type log(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_log; eval_log(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointlog10_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_log10; eval_log10(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_log10; Backend temp; eval_log10(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type log10(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog10_funct<Backend> , number<Backend, et_on> > >::type log10(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog10_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointlog10_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type log10(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_log10; eval_log10(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointcos_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_cos; eval_cos(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_cos; Backend temp; eval_cos(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type cos(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointcos_funct<Backend> , number<Backend, et_on> > >::type cos(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointcos_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointcos_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type cos(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_cos; eval_cos(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointsin_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sin; eval_sin(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sin; Backend temp; eval_sin(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sin(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsin_funct<Backend> , number<Backend, et_on> > >::type sin(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsin_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointsin_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type sin(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sin; eval_sin(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointtan_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_tan; eval_tan(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_tan; Backend temp; eval_tan(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type tan(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointtan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtan_funct<Backend> , number<Backend, et_on> > >::type tan(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtan_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointtan_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type tan(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_tan; eval_tan(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointasin_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_asin; eval_asin(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_asin; Backend temp; eval_asin(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type asin(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointasin_funct<Backend> , number<Backend, et_on> > >::type asin(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointasin_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointasin_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type asin(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_asin; eval_asin(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointacos_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_acos; eval_acos(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_acos; Backend temp; eval_acos(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type acos(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointacos_funct<Backend> , number<Backend, et_on> > >::type acos(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointacos_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointacos_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type acos(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_acos; eval_acos(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointatan_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_atan; eval_atan(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_atan; Backend temp; eval_atan(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type atan(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointatan_funct<Backend> , number<Backend, et_on> > >::type atan(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointatan_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointatan_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type atan(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_atan; eval_atan(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointcosh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_cosh; eval_cosh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_cosh; Backend temp; eval_cosh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type cosh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointcosh_funct<Backend> , number<Backend, et_on> > >::type cosh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointcosh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointcosh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type cosh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_cosh; eval_cosh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointsinh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sinh; eval_sinh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sinh; Backend temp; eval_sinh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sinh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointsinh_funct<Backend> , number<Backend, et_on> > >::type sinh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointsinh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointsinh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type sinh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sinh; eval_sinh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointtanh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_tanh; eval_tanh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_tanh; Backend temp; eval_tanh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type tanh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointtanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointtanh_funct<Backend> , number<Backend, et_on> > >::type tanh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointtanh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointtanh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type tanh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_tanh; eval_tanh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointlog2_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_log2; eval_log2(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_log2; Backend temp; eval_log2(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type log2(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointlog2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlog2_funct<Backend> , number<Backend, et_on> > >::type log2(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlog2_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointlog2_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type log2(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_log2; eval_log2(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointnearbyint_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_nearbyint; eval_nearbyint(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_nearbyint; Backend temp; eval_nearbyint(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointnearbyint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type nearbyint(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointnearbyint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointnearbyint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointnearbyint_funct<Backend> , number<Backend, et_on> > >::type nearbyint(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointnearbyint_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointnearbyint_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type nearbyint(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_nearbyint; eval_nearbyint(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointrint_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_rint; eval_rint(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_rint; Backend temp; eval_rint(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointrint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type rint(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointrint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointrint_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointrint_funct<Backend> , number<Backend, et_on> > >::type rint(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointrint_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointrint_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type rint(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_rint; eval_rint(result.backend(), arg.backend()); return std::move(result);} - -namespace detail{template <class Backend> struct number_kind_floating_pointldexp_funct{ template <class Arg> void operator()(Backend& result, Backend const& arg, Arg a)const { using default_ops:: eval_ldexp; eval_ldexp(result, arg, a); }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short> >::type ldexp(const detail::expression<tag, A1, A2, A3, A4>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short >( detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , short> >::type ldexp(const number<Backend, et_on>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , short >( detail::number_kind_floating_pointldexp_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type ldexp(const number<Backend, et_off>& arg, short const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_ldexp; eval_ldexp(result.backend(), arg.backend(), a); return std::move(result);} - -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int> >::type ldexp(const detail::expression<tag, A1, A2, A3, A4>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int >( detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , int> >::type ldexp(const number<Backend, et_on>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , int >( detail::number_kind_floating_pointldexp_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type ldexp(const number<Backend, et_off>& arg, int const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_ldexp; eval_ldexp(result.backend(), arg.backend(), a); return std::move(result);} - -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long> >::type ldexp(const detail::expression<tag, A1, A2, A3, A4>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long >( detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , long> >::type ldexp(const number<Backend, et_on>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , long >( detail::number_kind_floating_pointldexp_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type ldexp(const number<Backend, et_off>& arg, long const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_ldexp; eval_ldexp(result.backend(), arg.backend(), a); return std::move(result);} - -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type> >::type ldexp(const detail::expression<tag, A1, A2, A3, A4>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type >( detail::number_kind_floating_pointldexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , boost::long_long_type> >::type ldexp(const number<Backend, et_on>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointldexp_funct<Backend> , number<Backend, et_on> , boost::long_long_type >( detail::number_kind_floating_pointldexp_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type ldexp(const number<Backend, et_off>& arg, boost::long_long_type const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_ldexp; eval_ldexp(result.backend(), arg.backend(), a); return std::move(result);} - -namespace detail{template <class Backend> struct number_kind_floating_pointpow_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_pow; eval_pow(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_pow; eval_pow(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_pow; eval_pow(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type pow(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointpow_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type pow(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type pow(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type pow(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type pow(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type pow(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type pow(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type pow(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointfmod_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmod; eval_fmod(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmod; eval_fmod(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmod; eval_fmod(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmod; Backend r; eval_fmod(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmod; Backend r; eval_fmod(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmod; Backend r; eval_fmod(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type fmod(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointfmod_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type fmod(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmod_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type fmod(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointfmod_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type fmod(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type fmod(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointfmod_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type fmod(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type fmod(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointfmod_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type fmod(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmod_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmod(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_fmod; eval_fmod(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmod(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmod; eval_fmod(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmod(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmod; eval_fmod(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointfmax_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmax; eval_fmax(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmax; eval_fmax(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmax; eval_fmax(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmax; Backend r; eval_fmax(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmax; Backend r; eval_fmax(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmax; Backend r; eval_fmax(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type fmax(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointfmax_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type fmax(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmax_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type fmax(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointfmax_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type fmax(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type fmax(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointfmax_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type fmax(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type fmax(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointfmax_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type fmax(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmax_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmax(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_fmax; eval_fmax(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmax(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmax; eval_fmax(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmax(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmax; eval_fmax(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointfmin_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmin; eval_fmin(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmin; eval_fmin(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmin; eval_fmin(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fmin; Backend r; eval_fmin(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fmin; Backend r; eval_fmin(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fmin; Backend r; eval_fmin(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type fmin(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointfmin_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type fmin(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmin_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type fmin(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointfmin_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type fmin(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type fmin(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointfmin_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type fmin(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type fmin(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointfmin_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type fmin(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfmin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmin(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_fmin; eval_fmin(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmin(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmin; eval_fmin(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fmin(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fmin; eval_fmin(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointatan2_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_atan2; eval_atan2(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_atan2; eval_atan2(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_atan2; eval_atan2(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_atan2; Backend r; eval_atan2(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_atan2; Backend r; eval_atan2(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_atan2; Backend r; eval_atan2(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type atan2(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointatan2_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type atan2(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointatan2_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type atan2(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointatan2_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type atan2(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type atan2(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointatan2_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type atan2(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type atan2(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointatan2_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type atan2(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointatan2_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type atan2(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_atan2; eval_atan2(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type atan2(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_atan2; eval_atan2(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type atan2(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_atan2; eval_atan2(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointfdim_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fdim; eval_fdim(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fdim; eval_fdim(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fdim; eval_fdim(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_fdim; Backend r; eval_fdim(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_fdim; Backend r; eval_fdim(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_fdim; Backend r; eval_fdim(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type fdim(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointfdim_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type fdim(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfdim_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type fdim(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointfdim_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type fdim(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type fdim(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointfdim_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type fdim(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type fdim(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointfdim_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type fdim(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointfdim_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fdim(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_fdim; eval_fdim(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fdim(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fdim; eval_fdim(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type fdim(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_fdim; eval_fdim(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointhypot_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_hypot; eval_hypot(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_hypot; eval_hypot(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_hypot; eval_hypot(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_hypot; Backend r; eval_hypot(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_hypot; Backend r; eval_hypot(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_hypot; Backend r; eval_hypot(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type hypot(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointhypot_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type hypot(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointhypot_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type hypot(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointhypot_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type hypot(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type hypot(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointhypot_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type hypot(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type hypot(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointhypot_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type hypot(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointhypot_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type hypot(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_hypot; eval_hypot(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type hypot(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_hypot; eval_hypot(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type hypot(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_hypot; eval_hypot(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointremainder_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_remainder; eval_remainder(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_remainder; eval_remainder(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_remainder; eval_remainder(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_remainder; Backend r; eval_remainder(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_remainder; Backend r; eval_remainder(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_remainder; Backend r; eval_remainder(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type remainder(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_floating_pointremainder_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type remainder(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointremainder_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type remainder(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_floating_pointremainder_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type remainder(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type remainder(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_floating_pointremainder_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type remainder(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type remainder(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_floating_pointremainder_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type remainder(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_floating_pointremainder_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type remainder(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_remainder; eval_remainder(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type remainder(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_remainder; eval_remainder(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type remainder(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_remainder; eval_remainder(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} - -namespace detail{template <class Backend> struct number_kind_floating_pointlogb_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_logb; eval_logb(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_logb; Backend temp; eval_logb(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlogb_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type logb(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlogb_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_floating_pointlogb_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, detail::expression< detail::function , detail::number_kind_floating_pointlogb_funct<Backend> , number<Backend, et_on> > >::type logb(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_floating_pointlogb_funct<Backend> , number<Backend, et_on> >( detail::number_kind_floating_pointlogb_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_floating_point, number<Backend, et_off> >::type logb(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_logb; eval_logb(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointscalbn_funct{ template <class Arg> void operator()(Backend& result, Backend const& arg, Arg a)const { using default_ops:: eval_scalbn; eval_scalbn(result, arg, a); }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short> >::type scalbn(const detail::expression<tag, A1, A2, A3, A4>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short >( detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , short> >::type scalbn(const number<Backend, et_on>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , short >( detail::number_kind_floating_pointscalbn_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbn(const number<Backend, et_off>& arg, short const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbn; eval_scalbn(result.backend(), arg.backend(), a); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_floating_pointscalbln_funct{ template <class Arg> void operator()(Backend& result, Backend const& arg, Arg a)const { using default_ops:: eval_scalbln; eval_scalbln(result, arg, a); }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short> >::type scalbln(const detail::expression<tag, A1, A2, A3, A4>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , short >( detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , short> >::type scalbln(const number<Backend, et_on>& arg, short const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , short >( detail::number_kind_floating_pointscalbln_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbln(const number<Backend, et_off>& arg, short const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbln; eval_scalbln(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int> >::type scalbn(const detail::expression<tag, A1, A2, A3, A4>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int >( detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , int> >::type scalbn(const number<Backend, et_on>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , int >( detail::number_kind_floating_pointscalbn_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbn(const number<Backend, et_off>& arg, int const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbn; eval_scalbn(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int> >::type scalbln(const detail::expression<tag, A1, A2, A3, A4>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , int >( detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , int> >::type scalbln(const number<Backend, et_on>& arg, int const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , int >( detail::number_kind_floating_pointscalbln_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbln(const number<Backend, et_off>& arg, int const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbln; eval_scalbln(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long> >::type scalbn(const detail::expression<tag, A1, A2, A3, A4>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long >( detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , long> >::type scalbn(const number<Backend, et_on>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , long >( detail::number_kind_floating_pointscalbn_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbn(const number<Backend, et_off>& arg, long const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbn; eval_scalbn(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long> >::type scalbln(const detail::expression<tag, A1, A2, A3, A4>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , long >( detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , long> >::type scalbln(const number<Backend, et_on>& arg, long const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , long >( detail::number_kind_floating_pointscalbln_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbln(const number<Backend, et_off>& arg, long const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbln; eval_scalbln(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type> >::type scalbn(const detail::expression<tag, A1, A2, A3, A4>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type >( detail::number_kind_floating_pointscalbn_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , boost::long_long_type> >::type scalbn(const number<Backend, et_on>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbn_funct<Backend> , number<Backend, et_on> , boost::long_long_type >( detail::number_kind_floating_pointscalbn_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbn(const number<Backend, et_off>& arg, boost::long_long_type const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbn; eval_scalbn(result.backend(), arg.backend(), a); return std::move(result);} -template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type> >::type scalbln(const detail::expression<tag, A1, A2, A3, A4>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , boost::long_long_type >( detail::number_kind_floating_pointscalbln_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , boost::long_long_type> >::type scalbln(const number<Backend, et_on>& arg, boost::long_long_type const& a){ return detail::expression< detail::function , detail::number_kind_floating_pointscalbln_funct<Backend> , number<Backend, et_on> , boost::long_long_type >( detail::number_kind_floating_pointscalbln_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_floating_point), number<Backend, et_off> >::type scalbln(const number<Backend, et_off>& arg, boost::long_long_type const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_scalbln; eval_scalbln(result.backend(), arg.backend(), a); return std::move(result);} - - - - -namespace detail{template <class Backend> struct number_kind_complexexp_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_exp; eval_exp(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_exp; Backend temp; eval_exp(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type exp(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexexp_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexexp_funct<Backend> , number<Backend, et_on> > >::type exp(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexexp_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexexp_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type exp(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_exp; eval_exp(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexlog_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_log; eval_log(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_log; Backend temp; eval_log(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type log(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexlog_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexlog_funct<Backend> , number<Backend, et_on> > >::type log(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexlog_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexlog_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type log(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_log; eval_log(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexlog10_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_log10; eval_log10(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_log10; Backend temp; eval_log10(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type log10(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexlog10_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexlog10_funct<Backend> , number<Backend, et_on> > >::type log10(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexlog10_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexlog10_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type log10(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_log10; eval_log10(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexpow_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_pow; eval_pow(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_pow; eval_pow(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_pow; eval_pow(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_pow; Backend r; eval_pow(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type pow(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_complexpow_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_complex) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type pow(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_complexpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_complex) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_complexpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_complex), detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_complex), detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type pow(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_complexpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex), detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_complex), detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type pow(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_complexpow_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex), detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type pow(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_complexpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_complex), number<Backend, et_off> >::type pow(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_complex), number<Backend, et_off> >::type pow(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_complex), number<Backend, et_off> >::type pow(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexsqrt_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sqrt; eval_sqrt(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sqrt; Backend temp; eval_sqrt(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sqrt(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexsqrt_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsqrt_funct<Backend> , number<Backend, et_on> > >::type sqrt(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexsqrt_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexsqrt_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type sqrt(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sqrt; eval_sqrt(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexsin_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sin; eval_sin(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sin; Backend temp; eval_sin(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sin(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexsin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsin_funct<Backend> , number<Backend, et_on> > >::type sin(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexsin_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexsin_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type sin(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sin; eval_sin(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexcos_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_cos; eval_cos(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_cos; Backend temp; eval_cos(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type cos(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexcos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexcos_funct<Backend> , number<Backend, et_on> > >::type cos(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexcos_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexcos_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type cos(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_cos; eval_cos(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complextan_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_tan; eval_tan(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_tan; Backend temp; eval_tan(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complextan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type tan(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complextan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complextan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complextan_funct<Backend> , number<Backend, et_on> > >::type tan(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complextan_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complextan_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type tan(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_tan; eval_tan(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexasin_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_asin; eval_asin(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_asin; Backend temp; eval_asin(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type asin(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexasin_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexasin_funct<Backend> , number<Backend, et_on> > >::type asin(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexasin_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexasin_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type asin(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_asin; eval_asin(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexacos_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_acos; eval_acos(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_acos; Backend temp; eval_acos(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type acos(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexacos_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexacos_funct<Backend> , number<Backend, et_on> > >::type acos(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexacos_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexacos_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type acos(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_acos; eval_acos(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexatan_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_atan; eval_atan(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_atan; Backend temp; eval_atan(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type atan(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexatan_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexatan_funct<Backend> , number<Backend, et_on> > >::type atan(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexatan_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexatan_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type atan(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_atan; eval_atan(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexsinh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_sinh; eval_sinh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_sinh; Backend temp; eval_sinh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type sinh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexsinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexsinh_funct<Backend> , number<Backend, et_on> > >::type sinh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexsinh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexsinh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type sinh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_sinh; eval_sinh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexcosh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_cosh; eval_cosh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_cosh; Backend temp; eval_cosh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type cosh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexcosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexcosh_funct<Backend> , number<Backend, et_on> > >::type cosh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexcosh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexcosh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type cosh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_cosh; eval_cosh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complextanh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_tanh; eval_tanh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_tanh; Backend temp; eval_tanh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complextanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type tanh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complextanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complextanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complextanh_funct<Backend> , number<Backend, et_on> > >::type tanh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complextanh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complextanh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type tanh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_tanh; eval_tanh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexasinh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_asinh; eval_asinh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_asinh; Backend temp; eval_asinh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexasinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type asinh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexasinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexasinh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexasinh_funct<Backend> , number<Backend, et_on> > >::type asinh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexasinh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexasinh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type asinh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_asinh; eval_asinh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexacosh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_acosh; eval_acosh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_acosh; Backend temp; eval_acosh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexacosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type acosh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexacosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexacosh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexacosh_funct<Backend> , number<Backend, et_on> > >::type acosh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexacosh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexacosh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type acosh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_acosh; eval_acosh(result.backend(), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_complexatanh_funct{ void operator()(Backend& result, const Backend& arg)const { using default_ops::eval_atanh; eval_atanh(result, arg); } template <class U> void operator()(U& result, const Backend& arg)const { using default_ops::eval_atanh; Backend temp; eval_atanh(temp, arg); result = temp; }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexatanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > >::type atanh(const detail::expression<tag, A1, A2, A3, A4>& arg){ return detail::expression< detail::function , detail::number_kind_complexatanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> > ( detail::number_kind_complexatanh_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg );}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_complex, detail::expression< detail::function , detail::number_kind_complexatanh_funct<Backend> , number<Backend, et_on> > >::type atanh(const number<Backend, et_on>& arg){ return detail::expression< detail::function , detail::number_kind_complexatanh_funct<Backend> , number<Backend, et_on> >( detail::number_kind_complexatanh_funct<Backend>() , arg );}template <class Backend> inline typename boost::enable_if_c< boost::multiprecision::number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type atanh(const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops::eval_atanh; eval_atanh(result.backend(), arg.backend()); return std::move(result);} - - - - -namespace detail{template <class Backend> struct number_kind_integergcd_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_gcd; eval_gcd(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_gcd; eval_gcd(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_gcd; eval_gcd(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_gcd; Backend r; eval_gcd(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_gcd; Backend r; eval_gcd(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_gcd; Backend r; eval_gcd(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type gcd(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_integergcd_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type gcd(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_integergcd_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type gcd(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_integergcd_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type gcd(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type gcd(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_integergcd_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type gcd(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type gcd(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_integergcd_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type gcd(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_integergcd_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type gcd(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_gcd; eval_gcd(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type gcd(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_gcd; eval_gcd(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type gcd(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_gcd; eval_gcd(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_integerlcm_funct{ void operator()(Backend& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_lcm; eval_lcm(result, arg, a); } template <class Arithmetic> void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_lcm; eval_lcm(result, arg, number<Backend>::canonical_value(a)); } template <class Arithmetic> void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_lcm; eval_lcm(result, number<Backend>::canonical_value(arg), a); } template <class U> void operator()(U& result, const Backend& arg, const Backend& a)const { using default_ops:: eval_lcm; Backend r; eval_lcm(r, arg, a); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Backend& arg, const Arithmetic& a)const { using default_ops:: eval_lcm; Backend r; eval_lcm(r, arg, number<Backend>::canonical_value(a)); result = r; } template <class U, class Arithmetic> void operator()(U& result, const Arithmetic& arg, const Backend& a)const { using default_ops:: eval_lcm; Backend r; eval_lcm(r, number<Backend>::canonical_value(arg), a); result = r; }};}template <class Backend> inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> > >::type lcm(const number<Backend, et_on>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , number<Backend, et_on> >( detail::number_kind_integerlcm_funct<Backend>() , arg, a );}template <class Backend, class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> > >::type lcm(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_integerlcm_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value), detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> > >::type lcm(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , detail::expression<tag, A1, A2, A3, A4> , number<Backend, et_on> >( detail::number_kind_integerlcm_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> > >::type lcm(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , detail::expression<tagb, A1b, A2b, A3b, A4b> >( detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , Arithmetic > >::type lcm(const number<Backend, et_on>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , number<Backend, et_on> , Arithmetic >( detail::number_kind_integerlcm_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic > >::type lcm(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , Arithmetic >( detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , Arithmetic , number<Backend, et_on> > >::type lcm(const Arithmetic& arg, const number<Backend, et_on>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<Backend> , Arithmetic , number<Backend, et_on> >( detail::number_kind_integerlcm_funct<Backend>() , arg, a );}template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> > >::type lcm(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a){ return detail::expression< detail::function , detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , Arithmetic , detail::expression<tag, A1, A2, A3, A4> >( detail::number_kind_integerlcm_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c<(number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type lcm(const number<Backend, et_off>& arg, const number<Backend, et_off>& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_lcm; eval_lcm(result.backend(), arg.backend(), a.backend()); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type lcm(const number<Backend, et_off>& arg, const Arithmetic& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_lcm; eval_lcm(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a)); return std::move(result);}template <class Backend, class Arithmetic> inline typename enable_if_c< is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type lcm(const Arithmetic& a, const number<Backend, et_off>& arg){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg); number<Backend, et_off> result; using default_ops:: eval_lcm; eval_lcm(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend()); return std::move(result);} -namespace detail{template <class Backend> struct number_kind_integerpow_funct{ template <class Arg> void operator()(Backend& result, Backend const& arg, Arg a)const { using default_ops:: eval_pow; eval_pow(result, arg, a); }};}template <class tag, class A1, class A2, class A3, class A4> inline typename enable_if_c< (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , unsigned> >::type pow(const detail::expression<tag, A1, A2, A3, A4>& arg, unsigned const& a){ return detail::expression< detail::function , detail::number_kind_integerpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> , detail::expression<tag, A1, A2, A3, A4> , unsigned >( detail::number_kind_integerpow_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer), detail::expression< detail::function , detail::number_kind_integerpow_funct<Backend> , number<Backend, et_on> , unsigned> >::type pow(const number<Backend, et_on>& arg, unsigned const& a){ return detail::expression< detail::function , detail::number_kind_integerpow_funct<Backend> , number<Backend, et_on> , unsigned >( detail::number_kind_integerpow_funct<Backend>() , arg, a );}template <class Backend> inline typename enable_if_c< (number_category<Backend>::value == number_kind_integer), number<Backend, et_off> >::type pow(const number<Backend, et_off>& arg, unsigned const& a){ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a); number<Backend, et_off> result; using default_ops:: eval_pow; eval_pow(result.backend(), arg.backend(), a); return std::move(result);} - - - - - - - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, typename Backend::exponent_type>::type - ilogb(const multiprecision::number<Backend, ExpressionTemplates>& val) -{ - using default_ops::eval_ilogb; - return eval_ilogb(val.backend()); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type::backend_type::exponent_type>::type -ilogb(const detail::expression<tag, A1, A2, A3, A4>& val) -{ - using default_ops::eval_ilogb; - typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type arg(val); - return eval_ilogb(arg.backend()); -} - -} - -namespace math{ - - - -namespace detail{ - template <class T> T sinc_pi_imp(T); - template <class T> T sinhc_pi_imp(T); -} -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x) -{ - boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x); - return std::move(detail::sinc_pi_imp(x)); -} - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy> -inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&) -{ - boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x); - return std::move(detail::sinc_pi_imp(x)); -} - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x) -{ - boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x); - return std::move(detail::sinhc_pi_imp(x)); -} - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy> -inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&) -{ - boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x); - return std::move(boost::math::sinhc_pi(x)); -} - -using boost::multiprecision::gcd; -using boost::multiprecision::lcm; - - - - -} - -namespace integer { - -using boost::multiprecision::gcd; -using boost::multiprecision::lcm; - -} - -} - - - - -# 1 "/usr/include/boost/multiprecision/detail/no_et_ops.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/detail/no_et_ops.hpp" 3 4 -namespace boost{ -namespace multiprecision{ - - - - - - -template <class B> -inline number<B, et_off> operator - (const number<B, et_off>& v) -{ - static_assert(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior."); - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(v); - number<B, et_off> result(v); - result.backend().negate(); - return result; -} -template <class B> -inline number<B, et_off> operator ~ (const number<B, et_off>& v) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(v); - number<B, et_off> result; - eval_complement(result.backend(), v.backend()); - return result; -} - - - -template <class B> -inline number<B, et_off> operator + (const number<B, et_off>& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - number<B, et_off> result; - using default_ops::eval_add; - eval_add(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator + (const number<B, et_off>& a, const V& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a); - number<B, et_off> result; - using default_ops::eval_add; - eval_add(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator + (const V& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b); - number<B, et_off> result; - using default_ops::eval_add; - eval_add(result.backend(), b.backend(), number<B, et_off>::canonical_value(a)); - return result; -} - - - -template <class B> -inline number<B, et_off> operator - (const number<B, et_off>& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - number<B, et_off> result; - using default_ops::eval_subtract; - eval_subtract(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator - (const number<B, et_off>& a, const V& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a); - number<B, et_off> result; - using default_ops::eval_subtract; - eval_subtract(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator - (const V& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b); - number<B, et_off> result; - using default_ops::eval_subtract; - eval_subtract(result.backend(), number<B, et_off>::canonical_value(a), b.backend()); - return result; -} - - - -template <class B> -inline number<B, et_off> operator * (const number<B, et_off>& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - number<B, et_off> result; - using default_ops::eval_multiply; - eval_multiply(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator * (const number<B, et_off>& a, const V& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a); - number<B, et_off> result; - using default_ops::eval_multiply; - eval_multiply(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator * (const V& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b); - number<B, et_off> result; - using default_ops::eval_multiply; - eval_multiply(result.backend(), b.backend(), number<B, et_off>::canonical_value(a)); - return result; -} - - - -template <class B> -inline number<B, et_off> operator / (const number<B, et_off>& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - number<B, et_off> result; - using default_ops::eval_divide; - eval_divide(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator / (const number<B, et_off>& a, const V& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a); - number<B, et_off> result; - using default_ops::eval_divide; - eval_divide(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator / (const V& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b); - number<B, et_off> result; - using default_ops::eval_divide; - eval_divide(result.backend(), number<B, et_off>::canonical_value(a), b.backend()); - return result; -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (const number<B, et_off>& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - number<B, et_off> result; - using default_ops::eval_modulus; - eval_modulus(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator % (const number<B, et_off>& a, const V& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a); - number<B, et_off> result; - using default_ops::eval_modulus; - eval_modulus(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator % (const V& a, const number<B, et_off>& b) -{ - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b); - number<B, et_off> result; - using default_ops::eval_modulus; - eval_modulus(result.backend(), number<B, et_off>::canonical_value(a), b.backend()); - return result; -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_or; - eval_bitwise_or(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator | (const number<B, et_off>& a, const V& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_or; - eval_bitwise_or(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator | (const V& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_or; - eval_bitwise_or(result.backend(), b.backend(), number<B, et_off>::canonical_value(a)); - return result; -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator ^ (const number<B, et_off>& a, const V& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator ^ (const V& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(result.backend(), b.backend(), number<B, et_off>::canonical_value(a)); - return result; -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_and; - eval_bitwise_and(result.backend(), a.backend(), b.backend()); - return result; -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator & (const number<B, et_off>& a, const V& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_and; - eval_bitwise_and(result.backend(), a.backend(), number<B, et_off>::canonical_value(b)); - return result; -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator & (const V& a, const number<B, et_off>& b) -{ - number<B, et_off> result; - using default_ops::eval_bitwise_and; - eval_bitwise_and(result.backend(), b.backend(), number<B, et_off>::canonical_value(a)); - return result; -} - - - -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator << (const number<B, et_off>& a, const I& b) -{ - number<B, et_off> result(a); - using default_ops::eval_left_shift; - detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>()); - eval_left_shift(result.backend(), b); - return result; -} -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator >> (const number<B, et_off>& a, const I& b) -{ - number<B, et_off> result(a); - using default_ops::eval_right_shift; - detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>()); - eval_right_shift(result.backend(), b); - return result; -} -# 322 "/usr/include/boost/multiprecision/detail/no_et_ops.hpp" 3 4 -template <class B> -inline number<B, et_off> operator - (number<B, et_off>&& v) -{ - static_assert(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior."); - v.backend().negate(); - return static_cast<number<B, et_off>&&>(v); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ~ (number<B, et_off>&& v) -{ - eval_complement(v.backend(), v.backend()); - return static_cast<number<B, et_off>&&>(v); -} - - - -template <class B> -inline number<B, et_off> operator + (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_add; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_add(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline number<B, et_off> operator + (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_add; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_add(b.backend(), a.backend()); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline number<B, et_off> operator + (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_add; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_add(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator + (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_add; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_add(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator + (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_add; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_add(b.backend(), number<B, et_off>::canonical_value(a)); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B> -inline number<B, et_off> operator - (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_subtract; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_subtract(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline typename enable_if<is_signed_number<B>, number<B, et_off> >::type operator - (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_subtract; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_subtract(b.backend(), a.backend()); - b.backend().negate(); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline number<B, et_off> operator - (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_subtract; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_subtract(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator - (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_subtract; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_subtract(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if_c<(is_compatible_arithmetic_type<V, number<B, et_off> >::value && is_signed_number<B>::value), number<B, et_off> >::type - operator - (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_subtract; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_subtract(b.backend(), number<B, et_off>::canonical_value(a)); - b.backend().negate(); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B> -inline number<B, et_off> operator * (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_multiply; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_multiply(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline number<B, et_off> operator * (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_multiply; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_multiply(b.backend(), a.backend()); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline number<B, et_off> operator * (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_multiply; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_multiply(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator * (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_multiply; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_multiply(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator * (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_multiply; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_multiply(b.backend(), number<B, et_off>::canonical_value(a)); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B> -inline number<B, et_off> operator / (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_divide; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_divide(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type - operator / (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_divide; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_divide(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_modulus; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_modulus(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator % (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_modulus; - detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b); - eval_modulus(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_bitwise_or; - eval_bitwise_or(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_or; - eval_bitwise_or(b.backend(), a.backend()); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_or; - eval_bitwise_or(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator | (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_bitwise_or; - eval_bitwise_or(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator | (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_or; - eval_bitwise_or(b.backend(), number<B, et_off>::canonical_value(a)); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(b.backend(), a.backend()); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator ^ (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator ^ (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(b.backend(), number<B, et_off>::canonical_value(a)); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, const number<B, et_off>& b) -{ - using default_ops::eval_bitwise_and; - eval_bitwise_and(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_and; - eval_bitwise_and(b.backend(), a.backend()); - return static_cast<number<B, et_off>&&>(b); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_and; - eval_bitwise_and(a.backend(), b.backend()); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator & (number<B, et_off>&& a, const V& b) -{ - using default_ops::eval_bitwise_and; - eval_bitwise_and(a.backend(), number<B, et_off>::canonical_value(b)); - return static_cast<number<B, et_off>&&>(a); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator & (const V& a, number<B, et_off>&& b) -{ - using default_ops::eval_bitwise_and; - eval_bitwise_and(b.backend(), number<B, et_off>::canonical_value(a)); - return static_cast<number<B, et_off>&&>(b); -} - - - -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator << (number<B, et_off>&& a, const I& b) -{ - using default_ops::eval_left_shift; - eval_left_shift(a.backend(), b); - return static_cast<number<B, et_off>&&>(a); -} -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type - operator >> (number<B, et_off>&& a, const I& b) -{ - using default_ops::eval_right_shift; - eval_right_shift(a.backend(), b); - return static_cast<number<B, et_off>&&>(a); -} - - - -}} -# 3816 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/et_ops.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/et_ops.hpp" 3 4 -namespace boost{ namespace multiprecision{ -# 23 "/usr/include/boost/multiprecision/detail/et_ops.hpp" 3 4 -template <class B, expression_template_option ExpressionTemplates> -inline constexpr const number<B, ExpressionTemplates> operator + (const number<B, ExpressionTemplates>& v) { return v; } -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline constexpr const detail::expression<tag, Arg1, Arg2, Arg3, Arg4> operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return v; } -template <class B> -inline detail::expression<detail::negate, number<B, et_on> > operator - (const number<B, et_on>& v) -{ - static_assert(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior."); - return detail::expression<detail::negate, number<B, et_on> >(v); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) -{ - static_assert((is_signed_number<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value), "Negating an unsigned type results in ill-defined behavior."); - return detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v); -} -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::complement_immediates, number<B, et_on> > >::type - operator ~ (const number<B, et_on>& v) { return detail::expression<detail::complement_immediates, number<B, et_on> >(v); } -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer, - detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator ~ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v); } - - - -template <class B> -inline detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > - operator + (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, number<B, et_on>, V > >::type - operator + (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::add_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type - operator + (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b); -} -template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > - operator + (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> > - operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > - operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator + (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class V, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>, - detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type - operator + (const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>, - detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type - operator + (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b); -} -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > - operator + (const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > - operator + (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b); -} - - - -template <class V, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>, - detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> > >::type - operator - (const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> > - (detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a)); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>, - detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type - operator - (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b); -} -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > > - operator - (const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > > - (detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a)); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > - operator - (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b); -} - - - -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::minus, number<B, ET>, Arg1> - operator + (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::minus, number<B, ET>, Arg1>(a, b.left_ref()); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::minus, number<B, ET>, Arg1> - operator + (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::minus, number<B, ET>, Arg1>(b, a.left_ref()); -} -template <class B> -inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> > - operator + (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()); -} -template <class B> -inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> > - operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b) -{ - return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type - operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b) -{ - return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(b, a.left_ref()); -} -template <class B, class B2, expression_template_option ET> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type - operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b) -{ - return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(b, a.left_ref()); -} -template <class B2, expression_template_option ET, class B> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type - operator + (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref()); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > > - operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b.left_ref())); -} - - - -template <class B> -inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> > - operator - (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B, et_on>, V > >::type - operator - (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::subtract_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type - operator - (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(a, b); -} -template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > - operator - (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> > - operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > - operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator - (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::plus, number<B, ET>, Arg1> - operator - (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::plus, number<B, ET>, Arg1>(a, b.left_ref()); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> > - operator - (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >( - detail::expression<detail::plus, number<B, ET>, Arg1>(b, a.left_ref())); -} -template <class B> -inline detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > - operator - (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > > - operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >( - detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref())); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V > > >::type - operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b) -{ - return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V > >(detail::expression<detail::add_immediates, number<B, et_on>, V >(a.left_ref(), b)); -} -template <class B, class B2, expression_template_option ET> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > > >::type - operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b)); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type - operator - (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b.left_ref()); -} -template <class B2, expression_template_option ET, class B> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> > >::type - operator - (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref()); -} - - - -template <class B> -inline detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > - operator * (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::multiply_immediates, number<B, et_on>, V > >::type - operator * (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::multiply_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::multiply_immediates, V, number<B, et_on> > >::type - operator * (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::multiply_immediates, V, number<B, et_on> >(a, b); -} -template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > - operator * (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> > - operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > - operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator * (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> > - operator * (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >( - detail::expression<detail::multiplies, number<B, ET>, Arg1> (a, b.left_ref())); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> > - operator * (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >( - detail::expression<detail::multiplies, number<B, ET>, Arg1>(b, a.left_ref())); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > > - operator * (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >( - detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref())); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > > - operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >( - detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref())); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > >::type - operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > ( - detail::expression<detail::multiply_immediates, number<B, et_on>, V >(a.left_ref(), b)); -} -template <class B, class B2, expression_template_option ET> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type - operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > ( - detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b)); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > >::type - operator * (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > >( - detail::expression<detail::multiply_immediates, number<B, et_on>, V >(b.left_ref(), a)); -} -template <class B2, expression_template_option ET, class B> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type - operator * (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >( - detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(b.left_ref(), a)); -} - - - -template <class B> -inline detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > - operator / (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::divide_immediates, number<B, et_on>, V > >::type - operator / (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::divide_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::divide_immediates, V, number<B, et_on> > >::type - operator / (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b); -} -template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > - operator / (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> > - operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > - operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator / (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4> -inline detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> > - operator / (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >( - detail::expression<detail::divides, number<B, ET>, Arg1>(a, b.left_ref())); -} -template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -inline detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > > - operator / (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >( - detail::expression<detail::divides, Arg1, number<B, ET> >(a.left_ref(), b)); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > > - operator / (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >( - detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref())); -} -template <class B> -inline detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > > - operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >( - detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b)); -} -template <class B, class V> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V > > >::type - operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V > >( - detail::expression<detail::divide_immediates, number<B, et_on>, V>(a.left_ref(), b)); -} -template <class B, class B2, expression_template_option ET> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > > >::type - operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > >( - detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b)); -} -template <class V, class B> -inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > > >::type - operator / (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > >( - detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b.left_ref())); -} -template <class B2, expression_template_option ET, class B> -inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > > >::type - operator / (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b) -{ - return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > >( - detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref())); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> > >::type - operator % (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer), - detail::expression<detail::modulus_immediates, number<B, et_on>, V > >::type - operator % (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::modulus_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer), - detail::expression<detail::modulus_immediates, V, number<B, et_on> > >::type - operator % (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::modulus_immediates, V, number<B, et_on> >(a, b); -} -template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator % (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type - operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer, - detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type - operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator % (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), detail::expression<detail::shift_left, number<B, et_on>, I > >::type - operator << (const number<B, et_on>& a, const I& b) -{ - return detail::expression<detail::shift_left, number<B, et_on>, I>(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type - operator << (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b) -{ - return detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b); -} - - - -template <class B, class I> -inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), - detail::expression<detail::shift_right, number<B, et_on>, I > >::type - operator >> (const number<B, et_on>& a, const I& b) -{ - return detail::expression<detail::shift_right, number<B, et_on>, I>(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I> -inline typename enable_if_c<is_integral<I>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type - operator >> (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b) -{ - return detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> > >::type - operator & (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V > >::type - operator & (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> > >::type - operator & (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> >(a, b); -} -template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator & (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type - operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer, - detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type - operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator & (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> > >::type - operator| (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V > >::type - operator| (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> > >::type - operator| (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> >(a, b); -} -template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator| (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type - operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer, - detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type - operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator| (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - - - -template <class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> > >::type - operator^ (const number<B, et_on>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> >(a, b); -} -template <class B, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V > >::type - operator^ (const number<B, et_on>& a, const V& b) -{ - return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V >(a, b); -} -template <class V, class B> -inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value - && (number_category<B>::value == number_kind_integer), - detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> > >::type - operator^ (const V& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> >(a, b); -} -template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator^ (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B> -inline typename enable_if_c<number_category<B>::value == number_kind_integer, - detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type - operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b) -{ - return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer, - detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type - operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b) -{ - return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b); -} -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), - detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type - operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b) -{ - return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b); -} -template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value - && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type - operator^ (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b) -{ - return detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b); -} - -}} -# 3817 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/multiprecision/detail/min_max.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/min_max.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/traits/is_backend.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/traits/is_backend.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace detail{ - - template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_signed_types { 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::signed_types>* = 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 T, typename fallback_ = boost::mpl::bool_<false> > struct has_unsigned_types { 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::unsigned_types>* = 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 T, typename fallback_ = boost::mpl::bool_<false> > struct has_float_types { 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::float_types>* = 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> - struct is_backend - { - static const bool value = has_signed_types<T>::value && has_unsigned_types<T>::value && has_float_types<T>::value; - }; - - template <class Backend> - struct other_backend - { - typedef typename boost::conditional< - boost::is_same<number<Backend>, number<Backend, et_on> >::value, - number<Backend, et_off>, number<Backend, et_on> >::type type; - }; - - template <class B, class V> - struct number_from_backend - { - typedef typename boost::conditional < - boost::is_convertible<V, number<B> >::value, - number<B>, - typename other_backend<B>::type > ::type type; - }; - - template <bool b, class T, class U> - struct is_first_backend_imp{ static const bool value = false; }; - template <class T, class U> - struct is_first_backend_imp<true, T, U>{ static const bool value = is_convertible<U, number<T, et_on> >::value || is_convertible<U, number<T, et_off> >::value; }; - - template <class T, class U> - struct is_first_backend : is_first_backend_imp<is_backend<T>::value, T, U> {}; - - template <bool b, class T, class U> - struct is_second_backend_imp{ static const bool value = false; }; - template <class T, class U> - struct is_second_backend_imp<true, T, U>{ static const bool value = (is_convertible<T, number<U, et_on> >::value || is_convertible<T, number<U, et_off> >::value) && !is_first_backend<T, U>::value; }; - - template <class T, class U> - struct is_second_backend : is_second_backend_imp<is_backend<U>::value, T, U> {}; - -} -} -} -# 10 "/usr/include/boost/multiprecision/detail/min_max.hpp" 2 3 4 - -namespace boost{ namespace multiprecision{ -# 28 "/usr/include/boost/multiprecision/detail/min_max.hpp" 3 4 -template <class Backend> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on>&>::type - (min)(const number<Backend, et_on>& a, const number<Backend, et_on>& b) -{ - return a < b ? a : b; -} -template <class Backend, class tag, class A1, class A2, class A3, class A4> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type - (min)(const number<Backend, et_on>& a, const detail::expression<tag, A1, A2, A3, A4>& b) -{ - number<Backend, et_on> t(b); - if(a < t) - return a; - return std::move(t); -} -template <class tag, class A1, class A2, class A3, class A4, class Backend> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type - (min)(const detail::expression<tag, A1, A2, A3, A4>& a, const number<Backend, et_on>& b) -{ - number<Backend, et_on> t(a); - if(t < b) - return std::move(t); - return b; -} -template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type - (min)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tagb, A1b, A2b, A3b, A4b>& b) -{ - typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b); - if(t1 < t2) - return std::move(t1); - return std::move(t2); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type (min)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tag, A1, A2, A3, A4>& b) -{ - typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b); - if(t1 < t2) - return std::move(t1); - return std::move(t2); -} - -template <class Backend> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on>&>::type - (max)(const number<Backend, et_on>& a, const number<Backend, et_on>& b) -{ - return a > b ? a : b; -} -template <class Backend, class tag, class A1, class A2, class A3, class A4> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type - (max)(const number<Backend, et_on>& a, const detail::expression<tag, A1, A2, A3, A4>& b) -{ - number<Backend, et_on> t(b); - if(a > t) - return a; - return std::move(t); -} -template <class tag, class A1, class A2, class A3, class A4, class Backend> -inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type - (max)(const detail::expression<tag, A1, A2, A3, A4>& a, const number<Backend, et_on>& b) -{ - number<Backend, et_on> t(a); - if(t > b) - return std::move(t); - return b; -} -template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type - (max)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tagb, A1b, A2b, A3b, A4b>& b) -{ - typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b); - if(t1 > t2) - return std::move(t1); - return std::move(t2); -} -template <class tag, class A1, class A2, class A3, class A4> -inline typename detail::expression<tag, A1, A2, A3, A4>::result_type (max)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tag, A1, A2, A3, A4>& b) -{ - typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b); - if(t1 > t2) - return std::move(t1); - return std::move(t2); -} - -}} -# 3821 "/usr/include/boost/multiprecision/detail/default_ops.hpp" 2 3 4 -# 10 "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp" 2 3 4 - - - - - - -namespace boost{ namespace multiprecision{ namespace detail{ - -template <class To, class From> -inline To do_cast(const From & from) -{ - return static_cast<To>(from); -} -template <class To, class B, ::boost::multiprecision::expression_template_option et> -inline To do_cast(const number<B, et>& from) -{ - return from.template convert_to<To>(); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_integer>& ) -{ - using default_ops::eval_get_sign; - using default_ops::eval_bitwise_and; - using default_ops::eval_convert_to; - using default_ops::eval_right_shift; - using default_ops::eval_ldexp; - using default_ops::eval_add; - using default_ops::eval_is_zero; - - typedef typename canonical<unsigned char, From>::type l_limb_type; - - typedef typename canonical<l_limb_type, To>::type to_type; - From t(from); - bool is_neg = eval_get_sign(t) < 0; - if(is_neg) - t.negate(); - - l_limb_type limb; - l_limb_type mask = static_cast<l_limb_type>(~static_cast<l_limb_type>(0)); - From fl; - eval_bitwise_and(fl, t, mask); - eval_convert_to(&limb, fl); - to = static_cast<to_type>(limb); - eval_right_shift(t, std::numeric_limits<l_limb_type>::digits); - - - - To l; - unsigned shift = std::numeric_limits<l_limb_type>::digits; - while(!eval_is_zero(t)) - { - eval_bitwise_and(fl, t, mask); - eval_convert_to(&limb, fl); - l = static_cast<to_type>(limb); - eval_right_shift(t, std::numeric_limits<l_limb_type>::digits); - eval_ldexp(l, l, shift); - eval_add(to, l); - shift += std::numeric_limits<l_limb_type>::digits; - } - - - - if(is_neg) - to.negate(); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& , const mpl::int_<number_kind_integer>& ) -{ - using default_ops::eval_get_sign; - using default_ops::eval_bitwise_and; - using default_ops::eval_convert_to; - using default_ops::eval_right_shift; - using default_ops::eval_left_shift; - using default_ops::eval_bitwise_or; - using default_ops::eval_is_zero; - - typedef typename canonical<unsigned char, From>::type limb_type; - - typedef typename canonical<limb_type, To>::type to_type; - From t(from); - bool is_neg = eval_get_sign(t) < 0; - if(is_neg) - t.negate(); - - limb_type limb; - limb_type mask = static_cast<limb_type>(~static_cast<limb_type>(0)); - From fl; - eval_bitwise_and(fl, t, mask); - eval_convert_to(&limb, fl); - to = static_cast<to_type>(limb); - eval_right_shift(t, std::numeric_limits<limb_type>::digits); - - - - To l; - unsigned shift = std::numeric_limits<limb_type>::digits; - while(!eval_is_zero(t)) - { - eval_bitwise_and(fl, t, mask); - eval_convert_to(&limb, fl); - l = static_cast<to_type>(limb); - eval_right_shift(t, std::numeric_limits<limb_type>::digits); - eval_left_shift(l, shift); - eval_bitwise_or(to, l); - shift += std::numeric_limits<limb_type>::digits; - } - - - - if(is_neg) - to.negate(); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_floating_point>& ) -{ -# 137 "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp" 3 4 - if(std::numeric_limits<number<From> >::radix != 2) - { - to = from.str(0, std::ios_base::fmtflags()).c_str(); - return; - } - - - typedef typename canonical<unsigned char, To>::type ui_type; - - using default_ops::eval_fpclassify; - using default_ops::eval_add; - using default_ops::eval_subtract; - using default_ops::eval_convert_to; - using default_ops::eval_get_sign; - using default_ops::eval_is_zero; - - - - - int c = eval_fpclassify(from); - - if(c == (int)2) - { - to = ui_type(0); - return; - } - else if(c == (int)0) - { - to = static_cast<const char*>("nan"); - return; - } - else if(c == (int)1) - { - to = static_cast<const char*>("inf"); - if(eval_get_sign(from) < 0) - to.negate(); - return; - } - - typename From::exponent_type e; - From f, term; - to = ui_type(0); - - eval_frexp(f, from, &e); - - static const int shift = std::numeric_limits<boost::intmax_t>::digits - 1; - - while(!eval_is_zero(f)) - { - - eval_ldexp(f, f, shift); - eval_floor(term, f); - e -= shift; - eval_ldexp(to, to, shift); - typename boost::multiprecision::detail::canonical<boost::intmax_t, To>::type ll; - eval_convert_to(&ll, term); - eval_add(to, ll); - eval_subtract(f, term); - } - typedef typename To::exponent_type to_exponent; - if(e > (std::numeric_limits<to_exponent>::max)()) - { - to = static_cast<const char*>("inf"); - if(eval_get_sign(from) < 0) - to.negate(); - return; - } - if (e < (std::numeric_limits<to_exponent>::min)()) - { - to = ui_type(0); - if (eval_get_sign(from) < 0) - to.negate(); - return; - } - eval_ldexp(to, to, static_cast<to_exponent>(e)); - - - -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& , const mpl::int_<number_kind_rational>& ) -{ - typedef typename component_type<number<To> >::type to_component_type; - - number<From> t(from); - to_component_type n(numerator(t)), d(denominator(t)); - using default_ops::assign_components; - assign_components(to, n.backend(), d.backend()); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& , const mpl::int_<number_kind_integer>& ) -{ - typedef typename component_type<number<To> >::type to_component_type; - - number<From> t(from); - to_component_type n(t), d(1); - using default_ops::assign_components; - assign_components(to, n.backend(), d.backend()); -} - -template <class R, class LargeInteger> -R safe_convert_to_float(const LargeInteger& i) -{ - using std::ldexp; - if(!i) - return R(0); - if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::max_exponent) - { - LargeInteger val(i); - if(val.sign() < 0) - val = -val; - unsigned mb = msb(val); - if(mb >= std::numeric_limits<R>::max_exponent) - { - int scale_factor = (int)mb + 1 - std::numeric_limits<R>::max_exponent; - (static_cast <bool> (scale_factor >= 1) ? void (0) : __assert_fail ("scale_factor >= 1", "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp", 254, __extension__ __PRETTY_FUNCTION__)); - val >>= scale_factor; - R result = val.template convert_to<R>(); - if(std::numeric_limits<R>::digits == 0 || std::numeric_limits<R>::digits >= std::numeric_limits<R>::max_exponent) - { - - - - - - - LargeInteger remainder(i); - remainder &= (LargeInteger(1) << scale_factor) - 1; - result += ldexp(safe_convert_to_float<R>(remainder), -scale_factor); - } - return i.sign() < 0 ? static_cast<R>(-result) : result; - } - } - return i.template convert_to<R>(); -} - -template <class To, class Integer> -inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type - generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&) -{ - - - - - - using default_ops::eval_divide; - number<To> fn(safe_convert_to_float<number<To> >(n)), fd(safe_convert_to_float<number<To> >(d)); - eval_divide(result, fn.backend(), fd.backend()); -} -template <class To, class Integer> -inline typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type - generic_convert_rational_to_float_imp(To& result, const Integer& n, const Integer& d, const mpl::true_&) -{ - - - - - - To fd(safe_convert_to_float<To>(d)); - result = safe_convert_to_float<To>(n); - result /= fd; -} - -template <class To, class Integer> -typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type - generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_&) -{ - - - - - - if(num == 0) - { - result = 0; - return; - } - bool s = false; - if(num < 0) - { - s = true; - num = -num; - } - int denom_bits = msb(denom); - int shift = std::numeric_limits<To>::digits + denom_bits - msb(num); - if(shift > 0) - num <<= shift; - else if(shift < 0) - denom <<= boost::multiprecision::detail::unsigned_abs(shift); - Integer q, r; - divide_qr(num, denom, q, r); - int q_bits = msb(q); - if(q_bits == std::numeric_limits<To>::digits - 1) - { - - - - r <<= 1; - int c = r.compare(denom); - if(c > 0) - ++q; - else if((c == 0) && (q & 1u)) - { - ++q; - } - } - else - { - (static_cast <bool> (q_bits == std::numeric_limits<To>::digits) ? void (0) : __assert_fail ("q_bits == std::numeric_limits<To>::digits", "/usr/include/boost/multiprecision/detail/generic_interconvert.hpp", 347, __extension__ __PRETTY_FUNCTION__)); - - - - if(q & 1u) - { - if(r || (q & 2u)) - ++q; - } - } - using std::ldexp; - result = do_cast<To>(q); - result = ldexp(result, -shift); - if(s) - result = -result; -} -template <class To, class Integer> -inline typename disable_if_c<is_number<To>::value || is_floating_point<To>::value>::type - generic_convert_rational_to_float_imp(To& result, Integer& num, Integer& denom, const mpl::false_& tag) -{ - number<To> t; - generic_convert_rational_to_float_imp(t, num, denom, tag); - result = t.backend(); -} - -template <class To, class From> -inline void generic_convert_rational_to_float(To& result, const From& f) -{ - - - - - - - - typedef typename mpl::if_c<is_number<From>::value, From, number<From> >::type actual_from_type; - typedef typename mpl::if_c<is_number<To>::value || is_floating_point<To>::value, To, number<To> >::type actual_to_type; - typedef typename component_type<actual_from_type>::type integer_type; - typedef mpl::bool_<!std::numeric_limits<integer_type>::is_specialized - || std::numeric_limits<integer_type>::is_bounded - || !std::numeric_limits<actual_to_type>::is_specialized - || !std::numeric_limits<actual_to_type>::is_bounded - || (std::numeric_limits<actual_to_type>::radix != 2)> dispatch_tag; - - integer_type n(numerator(static_cast<actual_from_type>(f))), d(denominator(static_cast<actual_from_type>(f))); - generic_convert_rational_to_float_imp(result, n, d, dispatch_tag()); -} - -template <class To, class From> -inline void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_rational>& ) -{ - generic_convert_rational_to_float(to, from); -} - -template <class To, class From> -void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<2>& ) -{ - typedef typename mpl::front<typename To::unsigned_types>::type ui_type; - static const int shift = std::numeric_limits<boost::long_long_type>::digits; - typename From::exponent_type e; - typename component_type<number<To> >::type num, denom; - number<From> val(from); - val = frexp(val, &e); - while(val) - { - val = ldexp(val, shift); - e -= shift; - boost::long_long_type ll = boost::math::lltrunc(val); - val -= ll; - num <<= shift; - num += ll; - } - denom = ui_type(1u); - if(e < 0) - denom <<= -e; - else if(e > 0) - num <<= e; - assign_components(to, num.backend(), denom.backend()); -} - -template <class To, class From, int Radix> -void generic_interconvert_float2rational(To& to, const From& from, const mpl::int_<Radix>& ) -{ - - - - - - typedef typename mpl::front<typename To::unsigned_types>::type ui_type; - typename From::exponent_type e; - typename component_type<number<To> >::type num, denom; - number<From> val(from); - - if (!val) - { - to = ui_type(0u); - return; - } - - e = ilogb(val); - val = scalbn(val, -e); - while(val) - { - boost::long_long_type ll = boost::math::lltrunc(val); - val -= ll; - val = scalbn(val, 1); - num *= Radix; - num += ll; - --e; - } - ++e; - denom = ui_type(Radix); - denom = pow(denom, abs(e)); - if(e > 0) - { - num *= denom; - denom = 1; - } - assign_components(to, num.backend(), denom.backend()); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& , const mpl::int_<number_kind_floating_point>& ) -{ - generic_interconvert_float2rational(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>()); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& , const mpl::int_<number_kind_rational>& ) -{ - number<From> t(from); - number<To> result(numerator(t) / denominator(t)); - to = result.backend(); -} - -template <class To, class From> -void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<2>& ) -{ - typedef typename From::exponent_type exponent_type; - static const exponent_type shift = std::numeric_limits<boost::long_long_type>::digits; - exponent_type e; - number<To> num(0u); - number<From> val(from); - val = frexp(val, &e); - bool neg = false; - if (val.sign() < 0) - { - val.backend().negate(); - neg = true; - } - while(e > 0) - { - exponent_type s = (std::min)(e, shift); - val = ldexp(val, s); - e -= s; - boost::long_long_type ll = boost::math::lltrunc(val); - val -= ll; - num <<= s; - num += ll; - } - to = num.backend(); - if (neg) - to.negate(); -} - -template <class To, class From, int Radix> -void generic_interconvert_float2int(To& to, const From& from, const mpl::int_<Radix>& ) -{ - - - - - - typename From::exponent_type e; - number<To> num(0u); - number<From> val(from); - e = ilogb(val); - val = scalbn(val, -e); - while(e >= 0) - { - boost::long_long_type ll = boost::math::lltrunc(val); - val -= ll; - val = scalbn(val, 1); - num *= Radix; - num += ll; - --e; - } - to = num.backend(); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& , const mpl::int_<number_kind_floating_point>& ) -{ - generic_interconvert_float2int(to, from, mpl::int_<std::numeric_limits<number<From> >::radix>()); -} - -template <class To, class From, class tag> -void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::true_&, const tag&) -{ - - eval_real(to, from); - - To im; - eval_imag(im, from); - if(!eval_is_zero(im)) - ::boost::exception_detail::throw_exception_(std::runtime_error("Could not convert imaginary number to scalar."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/generic_interconvert.hpp",552); -} -template <class To, class From> -void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::true_&) -{ - typedef typename component_type<number<From> >::type component_number; - typedef typename component_number::backend_type component_backend; - - - - component_backend r; - generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_()); - to = r; -} -template <class To, class From> -void generic_interconvert_complex_to_scalar(To& to, const From& from, const mpl::false_&, const mpl::false_&) -{ - typedef typename component_type<number<From> >::type component_number; - typedef typename component_number::backend_type component_backend; - - - - component_backend r; - generic_interconvert_complex_to_scalar(r, from, mpl::true_(), mpl::true_()); - generic_interconvert(to, r, mpl::int_<number_category<To>::value>(), mpl::int_<number_category<To>::value>()); -} - -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& , const mpl::int_<number_kind_complex>& ) -{ - typedef typename component_type<number<From> >::type component_number; - typedef typename component_number::backend_type component_backend; - - generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>()); -} -template <class To, class From> -void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& , const mpl::int_<number_kind_complex>& ) -{ - typedef typename component_type<number<From> >::type component_number; - typedef typename component_number::backend_type component_backend; - - generic_interconvert_complex_to_scalar(to, from, mpl::bool_<boost::is_same<component_backend, To>::value>(), mpl::bool_<boost::is_constructible<To, const component_backend&>::value>()); -} - -} -} -} -# 26 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/number_compare.hpp" 1 3 4 -# 15 "/usr/include/boost/multiprecision/detail/number_compare.hpp" 3 4 -namespace boost{ namespace multiprecision{ - -namespace default_ops{ - - - - - - -template <class B> -inline bool eval_eq(const B& a, const B& b) -{ - return a.compare(b) == 0; -} -template <class T, class U> -inline bool eval_eq_imp(const T& a, const U& b, const mpl::true_&) -{ - typename boost::multiprecision::detail::number_from_backend<T, U>::type t(b); - return eval_eq(a, t.backend()); -} -template <class T, class U> -inline bool eval_eq_imp(const T& a, const U& b, const mpl::false_&) -{ - typename boost::multiprecision::detail::number_from_backend<U, T>::type t(a); - return eval_eq(t.backend(), b); -} -template <class T, class U> -inline bool eval_eq(const T& a, const U& b) -{ - typedef mpl::bool_<boost::multiprecision::detail::is_first_backend<T, U>::value> tag_type; - return eval_eq_imp(a, b, tag_type()); -} - -template <class B> -inline bool eval_lt(const B& a, const B& b) -{ - return a.compare(b) < 0; -} -template <class T, class U> -inline bool eval_lt_imp(const T& a, const U& b, const mpl::true_&) -{ - typename boost::multiprecision::detail::number_from_backend<T, U>::type t(b); - return eval_lt(a, t.backend()); -} -template <class T, class U> -inline bool eval_lt_imp(const T& a, const U& b, const mpl::false_&) -{ - typename boost::multiprecision::detail::number_from_backend<U, T>::type t(a); - return eval_lt(t.backend(), b); -} -template <class T, class U> -inline bool eval_lt(const T& a, const U& b) -{ - typedef mpl::bool_<boost::multiprecision::detail::is_first_backend<T, U>::value> tag_type; - return eval_lt_imp(a, b, tag_type()); -} - -template <class B> -inline bool eval_gt(const B& a, const B& b) -{ - return a.compare(b) > 0; -} -template <class T, class U> -inline bool eval_gt_imp(const T& a, const U& b, const mpl::true_&) -{ - typename boost::multiprecision::detail::number_from_backend<T, U>::type t(b); - return eval_gt(a, t.backend()); -} -template <class T, class U> -inline bool eval_gt_imp(const T& a, const U& b, const mpl::false_&) -{ - typename boost::multiprecision::detail::number_from_backend<U, T>::type t(a); - return eval_gt(t.backend(), b); -} -template <class T, class U> -inline bool eval_gt(const T& a, const U& b) -{ - typedef mpl::bool_<boost::multiprecision::detail::is_first_backend<T, U>::value> tag_type; - return eval_gt_imp(a, b, tag_type()); -} - -} - -namespace detail{ - -template <class Num, class Val> -struct is_valid_mixed_compare : public mpl::false_ {}; - -template <class B, expression_template_option ET, class Val> -struct is_valid_mixed_compare<number<B, ET>, Val> : public is_convertible<Val, number<B, ET> > {}; - -template <class B, expression_template_option ET> -struct is_valid_mixed_compare<number<B, ET>, number<B, ET> > : public mpl::false_ {}; - -template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -struct is_valid_mixed_compare<number<B, ET>, expression<tag, Arg1, Arg2, Arg3, Arg4> > - : public mpl::bool_<is_convertible<expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::value> {}; - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET> -struct is_valid_mixed_compare<expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> > - : public mpl::bool_<is_convertible<expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::value> {}; - -template <class Backend, expression_template_option ExpressionTemplates> -inline constexpr typename boost::enable_if_c<number_category<Backend>::value != number_kind_floating_point, bool>::type is_unordered_value(const number<Backend, ExpressionTemplates>&) -{ - return false; -} -template <class Backend, expression_template_option ExpressionTemplates> -inline - -constexpr - - typename boost::enable_if_c<number_category<Backend>::value == number_kind_floating_point, bool>::type is_unordered_value(const number<Backend, ExpressionTemplates>& a) -{ - using default_ops::eval_fpclassify; - return eval_fpclassify(a.backend()) == 0; -} - -template <class Arithmetic> -inline constexpr typename boost::enable_if_c<number_category<Arithmetic>::value != number_kind_floating_point, bool>::type is_unordered_value(const Arithmetic&) -{ - return false; -} -template <class Arithmetic> -inline constexpr typename boost::enable_if_c<number_category<Arithmetic>::value == number_kind_floating_point, bool>::type is_unordered_value(const Arithmetic& a) -{ - return (boost::math::isnan)(a); -} - -template <class T, class U> -inline constexpr bool is_unordered_comparison(const T& a, const U& b) -{ - return is_unordered_value(a) || is_unordered_value(b); -} - -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool operator == (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_eq(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - operator == (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_eq(a.backend(), number<Backend, ExpressionTemplates>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - operator == (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_eq(b.backend(), number<Backend, ExpressionTemplates>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - operator == (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_eq; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return false; - return eval_eq(t.backend(), result_type::canonical_value(a)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - operator == (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_eq; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return false; - return eval_eq(t.backend(), result_type::canonical_value(b)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type - operator == (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_eq; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return false; - return eval_eq(t.backend(), t2.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool operator != (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return true; - return !eval_eq(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - operator != (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return true; - return !eval_eq(a.backend(), number<Backend, et_on>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - operator != (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_eq; - if(detail::is_unordered_comparison(a, b)) return true; - return !eval_eq(b.backend(), number<Backend, et_on>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - operator != (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_eq; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return true; - return !eval_eq(t.backend(), result_type::canonical_value(a)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - operator != (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_eq; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return true; - return !eval_eq(t.backend(), result_type::canonical_value(b)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type - operator != (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_eq; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return true; - return !eval_eq(t.backend(), t2.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline typename boost::enable_if_c<(number_category<Backend>::value != number_kind_complex) && (number_category<Backend2>::value != number_kind_complex), bool>::type - operator < (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_lt(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator < (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_lt(a.backend(), number<Backend, ExpressionTemplates>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator < (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_gt(b.backend(), number<Backend, ExpressionTemplates>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator < (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_gt; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return false; - return eval_gt(t.backend(), result_type::canonical_value(a)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator < (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_lt; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return false; - return eval_lt(t.backend(), result_type::canonical_value(b)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if_c<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator < (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_lt; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return false; - return eval_lt(t.backend(), t2.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline typename boost::enable_if_c<(number_category<Backend>::value != number_kind_complex) && (number_category<Backend2>::value != number_kind_complex), bool>::type - operator > (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_gt(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator > (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_gt(a.backend(), number<Backend, ExpressionTemplates>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator > (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return eval_lt(b.backend(), number<Backend, ExpressionTemplates>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator > (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_lt; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return false; - return a > t; -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator > (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_gt; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return false; - return t > b; -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if_c<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator > (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_gt; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return false; - return t > t2; -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline typename boost::enable_if_c<(number_category<Backend>::value != number_kind_complex) && (number_category<Backend2>::value != number_kind_complex), bool>::type - operator <= (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_gt(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator <= (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_gt(a.backend(), number<Backend, ExpressionTemplates>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator <= (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_lt(b.backend(), number<Backend, ExpressionTemplates>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator <= (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_lt; - if(detail::is_unordered_value(a) || detail::is_unordered_value(b)) - return false; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return false; - return !eval_lt(t.backend(), result_type::canonical_value(a)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator <= (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_gt; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return false; - return !eval_gt(t.backend(), result_type::canonical_value(b)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if_c<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator <= (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_gt; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return false; - return !eval_gt(t.backend(), t2.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline typename boost::enable_if_c<(number_category<Backend>::value != number_kind_complex) && (number_category<Backend2>::value != number_kind_complex), bool>::type - operator >= (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_lt(a.backend(), b.backend()); -} -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator >= (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - using default_ops::eval_lt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_lt(a.backend(), number<Backend, ExpressionTemplates>::canonical_value(b)); -} -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value && (number_category<Backend>::value != number_kind_complex), bool>::type - operator >= (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - using default_ops::eval_gt; - if(detail::is_unordered_comparison(a, b)) return false; - return !eval_gt(b.backend(), number<Backend, ExpressionTemplates>::canonical_value(a)); -} -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator >= (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_gt; - result_type t(b); - if(detail::is_unordered_comparison(a, t)) return false; - return !eval_gt(t.backend(), result_type::canonical_value(a)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator >= (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) -{ - typedef typename detail::expression<Tag, A1, A2, A3, A4>::result_type result_type; - using default_ops::eval_lt; - result_type t(a); - if(detail::is_unordered_comparison(t, b)) return false; - return !eval_lt(t.backend(), result_type::canonical_value(b)); -} -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if_c<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>::value && (number_category<typename detail::expression<Tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex), bool>::type - operator >= (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) -{ - using default_ops::eval_lt; - typename detail::expression<Tag, A1, A2, A3, A4>::result_type t(a); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type t2(b); - if(detail::is_unordered_comparison(t, t2)) return false; - return !eval_lt(t.backend(), t2.backend()); -} - - - - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool isgreater (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) { return a > b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - isgreater (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) { return a > b; } - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - isgreater (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) { return a > b; } - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - isgreater (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) { return a > b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - isgreater (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) { return a > b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type - isgreater (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) { return a > b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool isgreaterequal (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) { return a >= b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - isgreaterequal (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) { return a >= b; } - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type - isgreaterequal (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) { return a >= b; } - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - isgreaterequal (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) { return a >= b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type - isgreaterequal (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) { return a >= b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type - isgreaterequal (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) { return a >= b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool islessequal (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) { return a <= b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -islessequal (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) { return a <= b; } - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -islessequal (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) { return a <= b; } - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -islessequal (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) { return a <= b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -islessequal (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) { return a <= b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type -islessequal (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) { return a <= b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool isless (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) { return a < b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -isless (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) { return a < b; } - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -isless (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) { return a < b; } - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -isless (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& b) { return a < b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -isless (const detail::expression<Tag, A1, A2, A3, A4>& a, const Arithmetic& b) { return a < b; } - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type -isless (const detail::expression<Tag, A1, A2, A3, A4>& a, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& b) { return a < b; } - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool islessgreater (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) -{ - if(detail::is_unordered_comparison(a, b)) return false; - return a != b; -} - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -islessgreater (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) -{ - if(detail::is_unordered_comparison(a, b)) return false; - return a != b; -} - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -islessgreater (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) -{ - if(detail::is_unordered_comparison(a, b)) return false; - return a != b; -} - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -islessgreater (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& bb) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type b(bb); - return islessgreater (a, b); -} - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -islessgreater (const detail::expression<Tag, A1, A2, A3, A4>& aa, const Arithmetic& b) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type a(aa); - return islessgreater (a, b); -} - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type -islessgreater (const detail::expression<Tag, A1, A2, A3, A4>& aa, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& bb) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type a(aa); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type b(bb); - return islessgreater (a, b); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Backend2, expression_template_option ExpressionTemplates2> -inline bool isunordered (const number<Backend, ExpressionTemplates>& a, const number<Backend2, ExpressionTemplates2>& b) { return detail::is_unordered_comparison(a, b); } - -template <class Backend, expression_template_option ExpressionTemplates, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -isunordered (const number<Backend, ExpressionTemplates>& a, const Arithmetic& b) { return detail::is_unordered_comparison(a, b); } - -template <class Arithmetic, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<detail::is_valid_mixed_compare<number<Backend, ExpressionTemplates>, Arithmetic>::value, bool>::type -isunordered (const Arithmetic& a, const number<Backend, ExpressionTemplates>& b) { return detail::is_unordered_comparison(a, b); } - -template <class Arithmetic, class Tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -isunordered (const Arithmetic& a, const detail::expression<Tag, A1, A2, A3, A4>& bb) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type b(bb); - return detail::is_unordered_comparison(a, b); -} - -template <class Tag, class A1, class A2, class A3, class A4, class Arithmetic> -inline typename enable_if_c<detail::is_valid_mixed_compare<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, Arithmetic>::value, bool>::type -isunordered (const detail::expression<Tag, A1, A2, A3, A4>& aa, const Arithmetic& b) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type a(aa); - return detail::is_unordered_comparison(a, b); -} - -template <class Tag, class A1, class A2, class A3, class A4, class Tagb, class A1b, class A2b, class A3b, class A4b> -inline typename enable_if<is_same<typename detail::expression<Tag, A1, A2, A3, A4>::result_type, typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type>, bool>::type -isunordered (const detail::expression<Tag, A1, A2, A3, A4>& aa, const detail::expression<Tagb, A1b, A2b, A3b, A4b>& bb) -{ - typename detail::expression<Tag, A1, A2, A3, A4>::result_type a(aa); - typename detail::expression<Tagb, A1b, A2b, A3b, A4b>::result_type b(bb); - return detail::is_unordered_comparison(a, b); -} - -}} -# 27 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/traits/is_restricted_conversion.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/traits/is_restricted_conversion.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/traits/explicit_conversion.hpp" 1 3 4 -# 17 "/usr/include/boost/multiprecision/traits/explicit_conversion.hpp" 3 4 -namespace boost { - namespace multiprecision { - namespace detail { - - template <unsigned int N> - struct dummy_size {}; - - template<typename S, typename T> - struct has_generic_interconversion - { - typedef typename boost::conditional < - is_number<S>::value && is_number<T>::value, - typename boost::conditional < - number_category<S>::value == number_kind_integer, - typename boost::conditional< - number_category<T>::value == number_kind_integer - || number_category<T>::value == number_kind_floating_point - || number_category<T>::value == number_kind_rational - || number_category<T>::value == number_kind_fixed_point, - boost::true_type, - boost::false_type - >::type, - typename boost::conditional< - number_category<S>::value == number_kind_rational, - typename boost::conditional< - number_category<T>::value == number_kind_rational - || number_category<T>::value == number_kind_rational, - boost::true_type, - boost::false_type - >::type, - typename boost::conditional< - number_category<T>::value == number_kind_floating_point, - boost::true_type, - boost::false_type - >::type - >::type - > ::type, - boost::false_type - > ::type type; - }; - - template<typename S, typename T> - struct is_explicitly_convertible_imp - { - - template<typename S1, typename T1> - static type_traits::yes_type selector(dummy_size<sizeof(new T1(boost::declval< - - S1 - - - - >()))>*); - - template<typename S1, typename T1> - static type_traits::no_type selector(...); - - static const bool value = sizeof(selector<S, T>(0)) == sizeof(type_traits::yes_type); - - typedef boost::integral_constant<bool, value> type; - - - - - }; - -template<typename From, typename To> -struct is_explicitly_convertible : public is_explicitly_convertible_imp<From, To>::type -{ -}; -# 96 "/usr/include/boost/multiprecision/traits/explicit_conversion.hpp" 3 4 -}}} -# 11 "/usr/include/boost/multiprecision/traits/is_restricted_conversion.hpp" 2 3 4 - - - -namespace boost{ namespace multiprecision{ namespace detail{ - - -template <class From, class To> -struct is_lossy_conversion -{ - typedef typename mpl::if_c< - ((number_category<From>::value == number_kind_floating_point) && (number_category<To>::value == number_kind_integer)) - - || ((number_category<From>::value == number_kind_rational) && (number_category<To>::value == number_kind_integer)) - || ((number_category<From>::value == number_kind_fixed_point) && (number_category<To>::value == number_kind_integer)) - || (number_category<From>::value == number_kind_unknown) - || (number_category<To>::value == number_kind_unknown), - mpl::true_, - mpl::false_ - >::type type; - static const bool value = type::value; -}; - -template<typename From, typename To> -struct is_restricted_conversion -{ - typedef typename mpl::if_c< - ((is_explicitly_convertible<From, To>::value && !is_convertible<From, To>::value) - || is_lossy_conversion<From, To>::value), - mpl::true_, - mpl::false_ - >::type type; - static const bool value = type::value; -}; - -}}} -# 28 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/boost/container_hash/hash.hpp" 1 3 4 -# 19 "/usr/include/boost/container_hash/hash.hpp" 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); - - - - - -} -# 20 "/usr/include/boost/container_hash/hash.hpp" 2 3 4 - -# 1 "/usr/include/boost/container_hash/detail/hash_float.hpp" 1 3 4 -# 11 "/usr/include/boost/container_hash/detail/hash_float.hpp" 3 4 - - - -# 1 "/usr/include/boost/container_hash/detail/float_functions.hpp" 1 3 4 -# 11 "/usr/include/boost/container_hash/detail/float_functions.hpp" 3 4 - -# 76 "/usr/include/boost/container_hash/detail/float_functions.hpp" 3 4 -namespace boost { - namespace hash_detail { - template <typename Float> - struct call_ldexp { - typedef Float float_type; - inline Float operator()(Float x, int y) const { - return std::ldexp(x, y); - } - }; - - template <typename Float> - struct call_frexp { - typedef Float float_type; - inline Float operator()(Float x, int* y) const { - return std::frexp(x, y); - } - }; - - template <typename Float> - struct select_hash_type - { - typedef Float type; - }; - } -} -# 15 "/usr/include/boost/container_hash/detail/hash_float.hpp" 2 3 4 -# 1 "/usr/include/boost/container_hash/detail/limits.hpp" 1 3 4 -# 14 "/usr/include/boost/container_hash/detail/limits.hpp" 3 4 - -# 27 "/usr/include/boost/container_hash/detail/limits.hpp" 3 4 -namespace boost -{ - namespace hash_detail - { - template <class T> - struct limits : std::numeric_limits<T> {}; -# 59 "/usr/include/boost/container_hash/detail/limits.hpp" 3 4 - } -} -# 16 "/usr/include/boost/container_hash/detail/hash_float.hpp" 2 3 4 - -# 1 "/usr/include/boost/integer/static_log2.hpp" 1 3 4 -# 21 "/usr/include/boost/integer/static_log2.hpp" 3 4 -namespace boost { - - namespace detail { - - namespace static_log2_impl { -# 44 "/usr/include/boost/integer/static_log2.hpp" 3 4 - typedef boost::static_log2_argument_type argument_type; - typedef boost::static_log2_result_type result_type; - - template <result_type n> - struct choose_initial_n { - - static const bool c = (argument_type(1) << n << n) != 0; - static const result_type value = !c*n + choose_initial_n<2*c*n>::value - - - ; - - }; - - template <> - struct choose_initial_n<0> { - static const result_type value = 0; - }; - - - - - const result_type n_zero = 16; - const result_type initial_n = choose_initial_n<n_zero>::value; -# 84 "/usr/include/boost/integer/static_log2.hpp" 3 4 - template <argument_type x, result_type n = initial_n> - struct static_log2_impl { - - static const bool c = (x >> n) > 0; - static const result_type value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) - - - ; - - }; - - template <> - struct static_log2_impl<1, 0> { - static const result_type value = 0; - }; - - } - } - - - - - - - - template <static_log2_argument_type x> - struct static_log2 { - - static const static_log2_result_type value = detail::static_log2_impl::static_log2_impl<x>::value - - - ; - - }; - - - template <> - struct static_log2<0> { }; - -} -# 18 "/usr/include/boost/container_hash/detail/hash_float.hpp" 2 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 19 "/usr/include/boost/container_hash/detail/hash_float.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 20 "/usr/include/boost/container_hash/detail/hash_float.hpp" 2 3 4 - -# 1 "/usr/include/c++/9.2.0/cstring" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstring" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstring" 3 -# 22 "/usr/include/boost/container_hash/detail/hash_float.hpp" 2 3 4 -# 51 "/usr/include/boost/container_hash/detail/hash_float.hpp" 3 4 -namespace boost -{ - namespace hash_detail - { - inline void hash_float_combine(std::size_t& seed, std::size_t value) - { - seed ^= value + (seed<<6) + (seed>>2); - } - - - - - - - - inline std::size_t hash_binary(char* ptr, std::size_t length) - { - std::size_t seed = 0; - - if (length >= sizeof(std::size_t)) { - std::memcpy(&seed, ptr, sizeof(std::size_t)); - length -= sizeof(std::size_t); - ptr += sizeof(std::size_t); - - while(length >= sizeof(std::size_t)) { - std::size_t buffer = 0; - std::memcpy(&buffer, ptr, sizeof(std::size_t)); - hash_float_combine(seed, buffer); - length -= sizeof(std::size_t); - ptr += sizeof(std::size_t); - } - } - - if (length > 0) { - std::size_t buffer = 0; - std::memcpy(&buffer, ptr, length); - hash_float_combine(seed, buffer); - } - - return seed; - } - - template <typename Float, unsigned digits, unsigned max_exponent> - struct enable_binary_hash - { - static const bool value = std::numeric_limits<Float>::is_iec559 && std::numeric_limits<Float>::digits == digits && std::numeric_limits<Float>::radix == 2 && std::numeric_limits<Float>::max_exponent == max_exponent - - - - ; - }; - - template <typename Float> - inline std::size_t float_hash_impl(Float v, - typename boost::enable_if_c< - enable_binary_hash<Float, 24, 128>::value, - std::size_t>::type) - { - return hash_binary((char*) &v, 4); - } - - - template <typename Float> - inline std::size_t float_hash_impl(Float v, - typename boost::enable_if_c< - enable_binary_hash<Float, 53, 1024>::value, - std::size_t>::type) - { - return hash_binary((char*) &v, 8); - } - - template <typename Float> - inline std::size_t float_hash_impl(Float v, - typename boost::enable_if_c< - enable_binary_hash<Float, 64, 16384>::value, - std::size_t>::type) - { - return hash_binary((char*) &v, 10); - } - - template <typename Float> - inline std::size_t float_hash_impl(Float v, - typename boost::enable_if_c< - enable_binary_hash<Float, 113, 16384>::value, - std::size_t>::type) - { - return hash_binary((char*) &v, 16); - } - - - - - - - template <class T> - inline std::size_t float_hash_impl2(T v) - { - boost::hash_detail::call_frexp<T> frexp; - boost::hash_detail::call_ldexp<T> ldexp; - - int exp = 0; - - v = frexp(v, &exp); - - - - if(v < 0) { - v = -v; - exp += limits<T>::max_exponent - - limits<T>::min_exponent; - } - - v = ldexp(v, limits<std::size_t>::digits); - std::size_t seed = static_cast<std::size_t>(v); - v -= static_cast<T>(seed); - - - std::size_t const length - = (limits<T>::digits * - boost::static_log2<limits<T>::radix>::value - + limits<std::size_t>::digits - 1) - / limits<std::size_t>::digits; - - for(std::size_t i = 0; i != length; ++i) - { - v = ldexp(v, limits<std::size_t>::digits); - std::size_t part = static_cast<std::size_t>(v); - v -= static_cast<T>(part); - hash_float_combine(seed, part); - } - - hash_float_combine(seed, static_cast<std::size_t>(exp)); - - return seed; - } - - - template <class T> - inline std::size_t float_hash_impl(T v, ...) - { - typedef typename select_hash_type<T>::type type; - return float_hash_impl2(static_cast<type>(v)); - } - - } -} - - - - - -namespace boost -{ - namespace hash_detail - { - template <class T> - inline std::size_t float_hash_value(T v) - { - - - - switch (std::fpclassify(v)) - - - - - { - case 2: - return 0; - case 1: - return (std::size_t)(v > 0 ? -1 : -2); - case 0: - return (std::size_t)(-3); - case 4: - case 3: - return float_hash_impl(v, 0); - default: - (static_cast <bool> (0) ? void (0) : __assert_fail ("0", "/usr/include/boost/container_hash/detail/hash_float.hpp", 228, __extension__ __PRETTY_FUNCTION__)); - return 0; - } - } - } -} -# 22 "/usr/include/boost/container_hash/hash.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 28 "/usr/include/boost/container_hash/hash.hpp" 2 3 4 - - - - - - -# 1 "/usr/include/c++/9.2.0/typeindex" 1 3 4 -# 32 "/usr/include/c++/9.2.0/typeindex" 3 4 - -# 33 "/usr/include/c++/9.2.0/typeindex" 3 - - - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 52 "/usr/include/c++/9.2.0/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); } - - 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(); } - }; - - -} -# 35 "/usr/include/boost/container_hash/hash.hpp" 2 3 4 -# 117 "/usr/include/boost/container_hash/hash.hpp" 3 4 -namespace boost -{ - namespace hash_detail - { -# 129 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <typename T> - struct hash_base : std::unary_function<T, std::size_t> {}; - - - struct enable_hash_value { typedef std::size_t type; }; - - template <typename T> struct basic_numbers {}; - template <typename T> struct long_numbers; - template <typename T> struct ulong_numbers; - template <typename T> struct float_numbers {}; - - template <> struct basic_numbers<bool> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<char> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<unsigned char> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<signed char> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<short> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<unsigned short> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<int> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<unsigned int> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<long> : - boost::hash_detail::enable_hash_value {}; - template <> struct basic_numbers<unsigned long> : - boost::hash_detail::enable_hash_value {}; - - - template <> struct basic_numbers<wchar_t> : - boost::hash_detail::enable_hash_value {}; - - - - template <> struct basic_numbers<char16_t> : - boost::hash_detail::enable_hash_value {}; - - - - template <> struct basic_numbers<char32_t> : - boost::hash_detail::enable_hash_value {}; - - - - - - template <typename T> struct long_numbers2 {}; - template <typename T> struct ulong_numbers2 {}; - template <typename T> struct long_numbers : long_numbers2<T> {}; - template <typename T> struct ulong_numbers : ulong_numbers2<T> {}; - - - template <> struct long_numbers<boost::long_long_type> : - boost::hash_detail::enable_hash_value {}; - template <> struct ulong_numbers<boost::ulong_long_type> : - boost::hash_detail::enable_hash_value {}; - - - - template <> struct long_numbers2<boost::int128_type> : - boost::hash_detail::enable_hash_value {}; - template <> struct ulong_numbers2<boost::uint128_type> : - boost::hash_detail::enable_hash_value {}; - - - template <> struct float_numbers<float> : - boost::hash_detail::enable_hash_value {}; - template <> struct float_numbers<double> : - boost::hash_detail::enable_hash_value {}; - template <> struct float_numbers<long double> : - boost::hash_detail::enable_hash_value {}; - } - - template <typename T> - typename boost::hash_detail::basic_numbers<T>::type hash_value(T); - template <typename T> - typename boost::hash_detail::long_numbers<T>::type hash_value(T); - template <typename T> - typename boost::hash_detail::ulong_numbers<T>::type hash_value(T); - - template <typename T> - typename boost::enable_if<boost::is_enum<T>, std::size_t>::type - hash_value(T); - - - template <class T> std::size_t hash_value(T* const&); - - - - - - template< class T, unsigned N > - std::size_t hash_value(const T (&x)[N]); - - template< class T, unsigned N > - std::size_t hash_value(T (&x)[N]); - - - template <class Ch, class A> - std::size_t hash_value( - std::basic_string<Ch, std::char_traits<Ch>, A> const&); - - - - - - - - template <typename T> - typename boost::hash_detail::float_numbers<T>::type hash_value(T); -# 256 "/usr/include/boost/container_hash/hash.hpp" 3 4 - std::size_t hash_value(std::type_index); - - - - std::size_t hash_value(std::error_code const&); - std::size_t hash_value(std::error_condition const&); - - - - - namespace hash_detail - { - template <class T> - inline std::size_t hash_value_signed(T val) - { - const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits; - - const int length = (std::numeric_limits<T>::digits - 1) - / static_cast<int>(size_t_bits); - - std::size_t seed = 0; - T positive = val < 0 ? -1 - val : val; - - - for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) - { - seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); - } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); - - return seed; - } - - template <class T> - inline std::size_t hash_value_unsigned(T val) - { - const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits; - - const int length = (std::numeric_limits<T>::digits - 1) - / static_cast<int>(size_t_bits); - - std::size_t seed = 0; - - - for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) - { - seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); - } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); - - return seed; - } - - template <typename SizeT> - inline void hash_combine_impl(SizeT& seed, SizeT value) - { - seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); - } - - inline void hash_combine_impl(boost::uint32_t& h1, - boost::uint32_t k1) - { - const uint32_t c1 = 0xcc9e2d51; - const uint32_t c2 = 0x1b873593; - - k1 *= c1; - k1 = (k1 << 15) | (k1 >> (32 - 15)); - k1 *= c2; - - h1 ^= k1; - h1 = (h1 << 13) | (h1 >> (32 - 13)); - h1 = h1*5+0xe6546b64; - } - - - - - - - - inline void hash_combine_impl(boost::uint64_t& h, - boost::uint64_t k) - { - const boost::uint64_t m = 0xc6a4a7935bd1e995UL; - const int r = 47; - - k *= m; - k ^= k >> r; - k *= m; - - h ^= k; - h *= m; - - - - h += 0xe6546b64; - } - - - } - - template <typename T> - typename boost::hash_detail::basic_numbers<T>::type hash_value(T v) - { - return static_cast<std::size_t>(v); - } - - template <typename T> - typename boost::hash_detail::long_numbers<T>::type hash_value(T v) - { - return hash_detail::hash_value_signed(v); - } - - template <typename T> - typename boost::hash_detail::ulong_numbers<T>::type hash_value(T v) - { - return hash_detail::hash_value_unsigned(v); - } - - template <typename T> - typename boost::enable_if<boost::is_enum<T>, std::size_t>::type - hash_value(T v) - { - return static_cast<std::size_t>(v); - } - - - - template <class T> std::size_t hash_value(T* const& v) - - - - { - - - - - - - std::size_t x = static_cast<std::size_t>( - reinterpret_cast<std::ptrdiff_t>(v)); - - return x + (x >> 3); - } -# 411 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <class T> - inline void hash_combine(std::size_t& seed, T const& v) - { - boost::hash<T> hasher; - return boost::hash_detail::hash_combine_impl(seed, hasher(v)); - } - - - - - - template <class It> - inline std::size_t hash_range(It first, It last) - { - std::size_t seed = 0; - - for(; first != last; ++first) - { - hash_combine(seed, *first); - } - - return seed; - } - - template <class It> - inline void hash_range(std::size_t& seed, It first, It last) - { - for(; first != last; ++first) - { - hash_combine(seed, *first); - } - } -# 471 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template< class T, unsigned N > - inline std::size_t hash_value(const T (&x)[N]) - { - return hash_range(x, x + N); - } - - template< class T, unsigned N > - inline std::size_t hash_value(T (&x)[N]) - { - return hash_range(x, x + N); - } - - - template <class Ch, class A> - inline std::size_t hash_value( - std::basic_string<Ch, std::char_traits<Ch>, A> const& v) - { - return hash_range(v.begin(), v.end()); - } -# 500 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <typename T> - typename boost::hash_detail::float_numbers<T>::type hash_value(T v) - { - return boost::hash_detail::float_hash_value(v); - } -# 535 "/usr/include/boost/container_hash/hash.hpp" 3 4 - inline std::size_t hash_value(std::type_index v) - { - return v.hash_code(); - } - - - - inline std::size_t hash_value(std::error_code const& v) { - std::size_t seed = 0; - hash_combine(seed, v.value()); - hash_combine(seed, &v.category()); - return seed; - } - - inline std::size_t hash_value(std::error_condition const& v) { - std::size_t seed = 0; - hash_combine(seed, v.value()); - hash_combine(seed, &v.category()); - return seed; - } -# 603 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <> struct hash<bool> : public boost::hash_detail::hash_base<bool> { std::size_t operator()(bool v) const { return boost::hash_value(v); } }; - template <> struct hash<char> : public boost::hash_detail::hash_base<char> { std::size_t operator()(char v) const { return boost::hash_value(v); } }; - template <> struct hash<signed char> : public boost::hash_detail::hash_base<signed char> { std::size_t operator()(signed char v) const { return boost::hash_value(v); } }; - template <> struct hash<unsigned char> : public boost::hash_detail::hash_base<unsigned char> { std::size_t operator()(unsigned char v) const { return boost::hash_value(v); } }; - - template <> struct hash<wchar_t> : public boost::hash_detail::hash_base<wchar_t> { std::size_t operator()(wchar_t v) const { return boost::hash_value(v); } }; - - - template <> struct hash<char16_t> : public boost::hash_detail::hash_base<char16_t> { std::size_t operator()(char16_t v) const { return boost::hash_value(v); } }; - - - template <> struct hash<char32_t> : public boost::hash_detail::hash_base<char32_t> { std::size_t operator()(char32_t v) const { return boost::hash_value(v); } }; - - template <> struct hash<short> : public boost::hash_detail::hash_base<short> { std::size_t operator()(short v) const { return boost::hash_value(v); } }; - template <> struct hash<unsigned short> : public boost::hash_detail::hash_base<unsigned short> { std::size_t operator()(unsigned short v) const { return boost::hash_value(v); } }; - template <> struct hash<int> : public boost::hash_detail::hash_base<int> { std::size_t operator()(int v) const { return boost::hash_value(v); } }; - template <> struct hash<unsigned int> : public boost::hash_detail::hash_base<unsigned int> { std::size_t operator()(unsigned int v) const { return boost::hash_value(v); } }; - template <> struct hash<long> : public boost::hash_detail::hash_base<long> { std::size_t operator()(long v) const { return boost::hash_value(v); } }; - template <> struct hash<unsigned long> : public boost::hash_detail::hash_base<unsigned long> { std::size_t operator()(unsigned long v) const { return boost::hash_value(v); } }; - - template <> struct hash<float> : public boost::hash_detail::hash_base<float> { std::size_t operator()(float v) const { return boost::hash_value(v); } }; - template <> struct hash<double> : public boost::hash_detail::hash_base<double> { std::size_t operator()(double v) const { return boost::hash_value(v); } }; - template <> struct hash<long double> : public boost::hash_detail::hash_base<long double> { std::size_t operator()(long double v) const { return boost::hash_value(v); } }; - - template <> struct hash<std::string> : public boost::hash_detail::hash_base<std::string> { std::size_t operator()(std::string const& v) const { return boost::hash_value(v); } }; - - template <> struct hash<std::wstring> : public boost::hash_detail::hash_base<std::wstring> { std::size_t operator()(std::wstring const& v) const { return boost::hash_value(v); } }; - - - template <> struct hash<std::basic_string<char16_t> > : public boost::hash_detail::hash_base<std::basic_string<char16_t> > { std::size_t operator()(std::basic_string<char16_t> const& v) const { return boost::hash_value(v); } }; - - - template <> struct hash<std::basic_string<char32_t> > : public boost::hash_detail::hash_base<std::basic_string<char32_t> > { std::size_t operator()(std::basic_string<char32_t> const& v) const { return boost::hash_value(v); } }; -# 652 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <> struct hash<boost::long_long_type> : public boost::hash_detail::hash_base<boost::long_long_type> { std::size_t operator()(boost::long_long_type v) const { return boost::hash_value(v); } }; - template <> struct hash<boost::ulong_long_type> : public boost::hash_detail::hash_base<boost::ulong_long_type> { std::size_t operator()(boost::ulong_long_type v) const { return boost::hash_value(v); } }; - - - - template <> struct hash<boost::int128_type> : public boost::hash_detail::hash_base<boost::int128_type> { std::size_t operator()(boost::int128_type v) const { return boost::hash_value(v); } }; - template <> struct hash<boost::uint128_type> : public boost::hash_detail::hash_base<boost::uint128_type> { std::size_t operator()(boost::uint128_type v) const { return boost::hash_value(v); } }; -# 673 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <> struct hash<std::type_index> : public boost::hash_detail::hash_base<std::type_index> { std::size_t operator()(std::type_index v) const { return boost::hash_value(v); } }; -# 684 "/usr/include/boost/container_hash/hash.hpp" 3 4 - template <class T> - struct hash<T*> - : public boost::hash_detail::hash_base<T*> - { - std::size_t operator()(T* v) const - { - - return boost::hash_value(v); - - - - - - - } - }; -# 743 "/usr/include/boost/container_hash/hash.hpp" 3 4 -} -# 760 "/usr/include/boost/container_hash/hash.hpp" 3 4 -# 1 "/usr/include/boost/container_hash/extensions.hpp" 1 3 4 -# 18 "/usr/include/boost/container_hash/extensions.hpp" 3 4 - - - -# 1 "/usr/include/boost/container_hash/hash.hpp" 1 3 4 -# 22 "/usr/include/boost/container_hash/extensions.hpp" 2 3 4 -# 1 "/usr/include/boost/detail/container_fwd.hpp" 1 3 4 -# 91 "/usr/include/boost/detail/container_fwd.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/deque" 1 3 4 -# 58 "/usr/include/c++/9.2.0/deque" 3 4 - -# 59 "/usr/include/c++/9.2.0/deque" 3 -# 67 "/usr/include/c++/9.2.0/deque" 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_deque.h" 1 3 -# 69 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - -# 92 "/usr/include/c++/9.2.0/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)); } -# 109 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _Tp, typename _Ref, typename _Ptr> - struct _Deque_iterator - { - - - - - - - private: - template<typename _Up> - using __ptr_to = typename pointer_traits<_Ptr>::template rebind<_Up>; - template<typename _CvTp> - using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_to<_CvTp>>; - public: - typedef __iter<_Tp> iterator; - typedef __iter<const _Tp> const_iterator; - typedef __ptr_to<_Tp> _Elt_pointer; - typedef __ptr_to<_Elt_pointer> _Map_pointer; - - - 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() { } -# 160 "/usr/include/c++/9.2.0/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&) = default; - _Deque_iterator& operator=(const _Deque_iterator&) = default; - - - iterator - _M_const_cast() const noexcept - { return iterator(_M_cur, _M_node); } - - reference - operator*() const noexcept - { return *_M_cur; } - - 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) const noexcept - { - _Self __tmp = *this; - return __tmp += __n; - } - - _Self& - operator-=(difference_type __n) noexcept - { return *this += -__n; } - - _Self - operator-(difference_type __n) const noexcept - { - _Self __tmp = *this; - return __tmp -= __n; - } - - 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()); - } - }; - - - - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return __x._M_cur == __y._M_cur; } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return __x._M_cur == __y._M_cur; } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return !(__x == __y); } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return !(__x == __y); } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) - : (__x._M_node < __y._M_node); } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) - : (__x._M_node < __y._M_node); } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return __y < __x; } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return __y < __x; } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return !(__y < __x); } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return !(__y < __x); } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline bool - operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { return !(__x < __y); } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline bool - operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { return !(__x < __y); } - - - - - - template<typename _Tp, typename _Ref, typename _Ptr> - inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type - operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, - const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept - { - return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type - (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) - * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) - + (__y._M_last - __y._M_cur); - } - - template<typename _Tp, typename _RefL, typename _PtrL, - typename _RefR, typename _PtrR> - inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type - operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, - const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept - { - return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type - (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) - * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) - + (__y._M_last - __y._M_cur); - } - - template<typename _Tp, typename _Ref, typename _Ptr> - inline _Deque_iterator<_Tp, _Ref, _Ptr> - operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) - noexcept - { return __x + __n; } - - template<typename _Tp> - void - fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, - const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, _Tp&, _Tp*>); - - template<typename _Tp> - inline _Deque_iterator<_Tp, _Tp&, _Tp*> - copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, - _Deque_iterator<_Tp, _Tp&, _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), - _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), - __result); } - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, _Tp&, _Tp*>); - - template<typename _Tp> - inline _Deque_iterator<_Tp, _Tp&, _Tp*> - copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, - _Deque_iterator<_Tp, _Tp&, _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { return std::copy_backward(_Deque_iterator<_Tp, - const _Tp&, const _Tp*>(__first), - _Deque_iterator<_Tp, - const _Tp&, const _Tp*>(__last), - __result); } - - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, _Tp&, _Tp*>); - - template<typename _Tp> - inline _Deque_iterator<_Tp, _Tp&, _Tp*> - move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, - _Deque_iterator<_Tp, _Tp&, _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), - _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), - __result); } - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, const _Tp&, const _Tp*>, - _Deque_iterator<_Tp, _Tp&, _Tp*>); - - template<typename _Tp> - inline _Deque_iterator<_Tp, _Tp&, _Tp*> - move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, - _Deque_iterator<_Tp, _Tp&, _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { return std::move_backward(_Deque_iterator<_Tp, - const _Tp&, const _Tp*>(__first), - _Deque_iterator<_Tp, - const _Tp&, const _Tp*>(__last), - __result); } -# 475 "/usr/include/c++/9.2.0/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; - - public: - 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, false_type) - : _M_impl(__x._M_move_impl()) - { } - - _Deque_base(_Deque_base&& __x, true_type) - : _M_impl(std::move(__x._M_get_Tp_allocator())) - { - _M_initialize_map(0); - if (__x._M_impl._M_map) - this->_M_impl._M_swap_data(__x._M_impl); - } - - _Deque_base(_Deque_base&& __x) - : _Deque_base(std::move(__x), typename _Alloc_traits::is_always_equal{}) - { } - - _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_t __n) - : _M_impl(__a) - { - if (__x.get_allocator() == __a) - { - if (__x._M_impl._M_map) - { - _M_initialize_map(0); - this->_M_impl._M_swap_data(__x._M_impl); - } - } - else - { - _M_initialize_map(__n); - } - } - - - ~_Deque_base() noexcept; - - protected: - typedef typename iterator::_Map_pointer _Map_pointer; - - - - - struct _Deque_impl - : public _Tp_alloc_type - { - _Map_pointer _M_map; - size_t _M_map_size; - iterator _M_start; - iterator _M_finish; - - _Deque_impl() - : _Tp_alloc_type(), _M_map(), _M_map_size(0), - _M_start(), _M_finish() - { } - - _Deque_impl(const _Tp_alloc_type& __a) noexcept - : _Tp_alloc_type(__a), _M_map(), _M_map_size(0), - _M_start(), _M_finish() - { } - - - _Deque_impl(_Deque_impl&&) = default; - - _Deque_impl(_Tp_alloc_type&& __a) noexcept - : _Tp_alloc_type(std::move(__a)), _M_map(), _M_map_size(0), - _M_start(), _M_finish() - { } - - - void _M_swap_data(_Deque_impl& __x) noexcept - { - using std::swap; - swap(this->_M_start, __x._M_start); - swap(this->_M_finish, __x._M_finish); - swap(this->_M_map, __x._M_map); - swap(this->_M_map_size, __x._M_map_size); - } - }; - - _Tp_alloc_type& - _M_get_Tp_allocator() noexcept - { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } - - const _Tp_alloc_type& - _M_get_Tp_allocator() const noexcept - { return *static_cast<const _Tp_alloc_type*>(&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); - } - - protected: - void _M_initialize_map(size_t); - void _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish); - void _M_destroy_nodes(_Map_pointer __nstart, - _Map_pointer __nfinish) noexcept; - enum { _S_initial_map_size = 8 }; - - _Deque_impl _M_impl; - - - private: - _Deque_impl - _M_move_impl() - { - if (!_M_impl._M_map) - return std::move(_M_impl); - - - _Tp_alloc_type __alloc{_M_get_Tp_allocator()}; - - _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)}; - - _Deque_base __empty{__alloc}; - __empty._M_initialize_map(0); - - _Deque_impl __ret{std::move(_M_get_Tp_allocator())}; - _M_impl._M_swap_data(__ret); - _M_impl._M_swap_data(__empty._M_impl); - return __ret; - } - - }; - - 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); - } - } -# 694 "/usr/include/c++/9.2.0/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); - } -# 845 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _Tp, typename _Alloc = std::allocator<_Tp> > - class deque : protected _Deque_base<_Tp, _Alloc> - { -# 858 "/usr/include/c++/9.2.0/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"); - - - - - - - typedef _Deque_base<_Tp, _Alloc> _Base; - typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; - typedef typename _Base::_Alloc_traits _Alloc_traits; - typedef typename _Base::_Map_pointer _Map_pointer; - - public: - typedef _Tp value_type; - typedef typename _Alloc_traits::pointer pointer; - typedef typename _Alloc_traits::const_pointer const_pointer; - typedef typename _Alloc_traits::reference reference; - typedef typename _Alloc_traits::const_reference const_reference; - typedef typename _Base::iterator iterator; - typedef typename _Base::const_iterator const_iterator; - typedef std::reverse_iterator<const_iterator> const_reverse_iterator; - typedef std::reverse_iterator<iterator> reverse_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Alloc allocator_type; - - protected: - static size_t _S_buffer_size() 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() : _Base() { } - - - - - - explicit - deque(const allocator_type& __a) - : _Base(__a, 0) { } -# 931 "/usr/include/c++/9.2.0/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(); } -# 944 "/usr/include/c++/9.2.0/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); } -# 971 "/usr/include/c++/9.2.0/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()); } -# 986 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - deque(deque&& __x) - : _Base(std::move(__x)) { } - - - deque(const deque& __x, const allocator_type& __a) - : _Base(__a, __x.size()) - { std::__uninitialized_copy_a(__x.begin(), __x.end(), - this->_M_impl._M_start, - _M_get_Tp_allocator()); } - - - deque(deque&& __x, const allocator_type& __a) - : _Base(std::move(__x), __a, __x.size()) - { - if (__x.get_allocator() != __a) - { - std::__uninitialized_move_a(__x.begin(), __x.end(), - this->_M_impl._M_start, - _M_get_Tp_allocator()); - __x.clear(); - } - } -# 1020 "/usr/include/c++/9.2.0/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()); - } -# 1045 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - deque(_InputIterator __first, _InputIterator __last, - const allocator_type& __a = allocator_type()) - : _Base(__a) - { _M_initialize_dispatch(__first, __last, __false_type()); } -# 1068 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - ~deque() - { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } -# 1080 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - deque& - operator=(const deque& __x); -# 1092 "/usr/include/c++/9.2.0/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; - } -# 1111 "/usr/include/c++/9.2.0/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; - } -# 1130 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - assign(size_type __n, const value_type& __val) - { _M_fill_assign(__n, __val); } -# 1147 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - void - assign(_InputIterator __first, _InputIterator __last) - { _M_assign_dispatch(__first, __last, __false_type()); } -# 1174 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - assign(initializer_list<value_type> __l) - { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } - - - - allocator_type - get_allocator() const noexcept - { return _Base::get_allocator(); } - - - - - - - iterator - begin() noexcept - { return this->_M_impl._M_start; } - - - - - - const_iterator - begin() const noexcept - { return this->_M_impl._M_start; } - - - - - - - iterator - end() noexcept - { return this->_M_impl._M_finish; } - - - - - - - const_iterator - end() const noexcept - { return this->_M_impl._M_finish; } - - - - - - - reverse_iterator - rbegin() noexcept - { return reverse_iterator(this->_M_impl._M_finish); } - - - - - - - const_reverse_iterator - rbegin() const noexcept - { return const_reverse_iterator(this->_M_impl._M_finish); } - - - - - - - reverse_iterator - rend() noexcept - { return reverse_iterator(this->_M_impl._M_start); } - - - - - - - const_reverse_iterator - rend() const noexcept - { return const_reverse_iterator(this->_M_impl._M_start); } - - - - - - - const_iterator - cbegin() const noexcept - { return this->_M_impl._M_start; } - - - - - - - const_iterator - cend() const noexcept - { return this->_M_impl._M_finish; } - - - - - - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(this->_M_impl._M_finish); } - - - - - - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(this->_M_impl._M_start); } - - - - - size_type - size() const noexcept - { return this->_M_impl._M_finish - this->_M_impl._M_start; } - - - size_type - max_size() const noexcept - { return _S_max_size(_M_get_Tp_allocator()); } -# 1313 "/usr/include/c++/9.2.0/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)); - } -# 1335 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - resize(size_type __new_size, const value_type& __x) - { - const size_type __len = size(); - if (__new_size > __len) - _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); - else if (__new_size < __len) - _M_erase_at_end(this->_M_impl._M_start - + difference_type(__new_size)); - } -# 1371 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - shrink_to_fit() noexcept - { _M_shrink_to_fit(); } - - - - - - - bool - empty() const noexcept - { return this->_M_impl._M_finish == this->_M_impl._M_start; } -# 1396 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - reference - operator[](size_type __n) noexcept - { - ; - return this->_M_impl._M_start[difference_type(__n)]; - } -# 1414 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - 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: -# 1445 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - reference - at(size_type __n) - { - _M_range_check(__n); - return (*this)[__n]; - } -# 1463 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - const_reference - at(size_type __n) const - { - _M_range_check(__n); - return (*this)[__n]; - } - - - - - - reference - front() noexcept - { - ; - return *begin(); - } - - - - - - const_reference - front() const noexcept - { - ; - return *begin(); - } - - - - - - reference - back() noexcept - { - ; - iterator __tmp = end(); - --__tmp; - return *__tmp; - } - - - - - - const_reference - back() const noexcept - { - ; - const_iterator __tmp = end(); - --__tmp; - return *__tmp; - } -# 1528 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_front(_Args&&... __args); -# 1565 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_back(_Args&&... __args); -# 1601 "/usr/include/c++/9.2.0/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(this->_M_impl, - this->_M_impl._M_start._M_cur); - ++this->_M_impl._M_start._M_cur; - } - else - _M_pop_front_aux(); - } -# 1624 "/usr/include/c++/9.2.0/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(this->_M_impl, - this->_M_impl._M_finish._M_cur); - } - else - _M_pop_back_aux(); - } -# 1649 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename... _Args> - iterator - emplace(const_iterator __position, _Args&&... __args); -# 1662 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - iterator - insert(const_iterator __position, const value_type& __x); -# 1688 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - iterator - insert(const_iterator __position, value_type&& __x) - { return emplace(__position, std::move(__x)); } -# 1701 "/usr/include/c++/9.2.0/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; - } -# 1722 "/usr/include/c++/9.2.0/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; - } -# 1756 "/usr/include/c++/9.2.0/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_insert_dispatch(__position._M_const_cast(), - __first, __last, __false_type()); - return begin() + __offset; - } -# 1802 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - iterator - - erase(const_iterator __position) - - - - { return _M_erase(__position._M_const_cast()); } -# 1826 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - iterator - - erase(const_iterator __first, const_iterator __last) - - - - { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } -# 1845 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - swap(deque& __x) noexcept - { - - - ; - - _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: - - - - - - - template<typename _Integer> - void - _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) - { - _M_initialize_map(_S_check_init_len(static_cast<size_type>(__n), - _M_get_Tp_allocator())); - _M_fill_initialize(__x); - } - - static size_t - _S_check_init_len(size_t __n, const allocator_type& __a) - { - if (__n > _S_max_size(__a)) - __throw_length_error( - ("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); - } - - - template<typename _InputIterator> - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, - __false_type) - { - _M_range_initialize(__first, __last, - std::__iterator_category(__first)); - } -# 1922 "/usr/include/c++/9.2.0/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); -# 1944 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - void - _M_fill_initialize(const value_type& __value); - - - - void - _M_default_initialize(); -# 1960 "/usr/include/c++/9.2.0/bits/stl_deque.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) - { - 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); - } - } -# 2021 "/usr/include/c++/9.2.0/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(); -# 2040 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _Integer> - void - _M_insert_dispatch(iterator __pos, - _Integer __n, _Integer __x, __true_type) - { _M_fill_insert(__pos, __n, __x); } - - - template<typename _InputIterator> - void - _M_insert_dispatch(iterator __pos, - _InputIterator __first, _InputIterator __last, - __false_type) - { - _M_range_insert_aux(__pos, __first, __last, - std::__iterator_category(__first)); - } - - - 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); -# 2190 "/usr/include/c++/9.2.0/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) - { - 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_if_noexcept_iterator(__x.begin()), - std::__make_move_if_noexcept_iterator(__x.end()), - std::random_access_iterator_tag()); - __x.clear(); - } - } - - }; -# 2307 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _Tp, typename _Alloc> - inline bool - operator==(const deque<_Tp, _Alloc>& __x, - const deque<_Tp, _Alloc>& __y) - { return __x.size() == __y.size() - && std::equal(__x.begin(), __x.end(), __y.begin()); } -# 2325 "/usr/include/c++/9.2.0/bits/stl_deque.h" 3 - template<typename _Tp, typename _Alloc> - inline bool - operator<(const deque<_Tp, _Alloc>& __x, - const deque<_Tp, _Alloc>& __y) - { return std::lexicographical_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()); } - - - template<typename _Tp, typename _Alloc> - inline bool - operator!=(const deque<_Tp, _Alloc>& __x, - const deque<_Tp, _Alloc>& __y) - { return !(__x == __y); } - - - template<typename _Tp, typename _Alloc> - inline bool - operator>(const deque<_Tp, _Alloc>& __x, - const deque<_Tp, _Alloc>& __y) - { return __y < __x; } - - - template<typename _Tp, typename _Alloc> - inline bool - operator<=(const deque<_Tp, _Alloc>& __x, - const deque<_Tp, _Alloc>& __y) - { return !(__y < __x); } - - - template<typename _Tp, typename _Alloc> - 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 { }; - - - -} -# 68 "/usr/include/c++/9.2.0/deque" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/deque.tcc" 1 3 -# 59 "/usr/include/c++/9.2.0/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 (&__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> - - - - void - - 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)...); - - - - } - - template<typename _Tp, typename _Alloc> - template<typename... _Args> - - - - void - - 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)...); - - - - } - - - - 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) - { - _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> - void - fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, - const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) - { - typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; - - for (typename _Self::_Map_pointer __node = __first._M_node + 1; - __node < __last._M_node; ++__node) - std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); - - if (__first._M_node != __last._M_node) - { - std::fill(__first._M_cur, __first._M_last, __value); - std::fill(__last._M_first, __last._M_cur, __value); - } - else - std::fill(__first._M_cur, __last._M_cur, __value); - } - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, - _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { - typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; - typedef typename _Self::difference_type difference_type; - - difference_type __len = __last - __first; - while (__len > 0) - { - const difference_type __clen - = std::min(__len, std::min(__first._M_last - __first._M_cur, - __result._M_last - __result._M_cur)); - std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); - __first += __clen; - __result += __clen; - __len -= __clen; - } - return __result; - } - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, - _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { - typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; - typedef typename _Self::difference_type difference_type; - - difference_type __len = __last - __first; - while (__len > 0) - { - difference_type __llen = __last._M_cur - __last._M_first; - _Tp* __lend = __last._M_cur; - - difference_type __rlen = __result._M_cur - __result._M_first; - _Tp* __rend = __result._M_cur; - - if (!__llen) - { - __llen = _Self::_S_buffer_size(); - __lend = *(__last._M_node - 1) + __llen; - } - if (!__rlen) - { - __rlen = _Self::_S_buffer_size(); - __rend = *(__result._M_node - 1) + __rlen; - } - - const difference_type __clen = std::min(__len, - std::min(__llen, __rlen)); - std::copy_backward(__lend - __clen, __lend, __rend); - __last -= __clen; - __result -= __clen; - __len -= __clen; - } - return __result; - } - - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, - _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { - typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; - typedef typename _Self::difference_type difference_type; - - difference_type __len = __last - __first; - while (__len > 0) - { - const difference_type __clen - = std::min(__len, std::min(__first._M_last - __first._M_cur, - __result._M_last - __result._M_cur)); - std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); - __first += __clen; - __result += __clen; - __len -= __clen; - } - return __result; - } - - template<typename _Tp> - _Deque_iterator<_Tp, _Tp&, _Tp*> - move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, - _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, - _Deque_iterator<_Tp, _Tp&, _Tp*> __result) - { - typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; - typedef typename _Self::difference_type difference_type; - - difference_type __len = __last - __first; - while (__len > 0) - { - difference_type __llen = __last._M_cur - __last._M_first; - _Tp* __lend = __last._M_cur; - - difference_type __rlen = __result._M_cur - __result._M_first; - _Tp* __rend = __result._M_cur; - - if (!__llen) - { - __llen = _Self::_S_buffer_size(); - __lend = *(__last._M_node - 1) + __llen; - } - if (!__rlen) - { - __rlen = _Self::_S_buffer_size(); - __rend = *(__result._M_node - 1) + __rlen; - } - - const difference_type __clen = std::min(__len, - std::min(__llen, __rlen)); - std::move_backward(__lend - __clen, __lend, __rend); - __last -= __clen; - __result -= __clen; - __len -= __clen; - } - return __result; - } - - - - -} -# 70 "/usr/include/c++/9.2.0/deque" 2 3 -# 92 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/list" 1 3 4 -# 58 "/usr/include/c++/9.2.0/list" 3 4 - -# 59 "/usr/include/c++/9.2.0/list" 3 - - - - -# 1 "/usr/include/c++/9.2.0/bits/stl_list.h" 1 3 -# 63 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/allocated_ptr.h" 1 3 -# 40 "/usr/include/c++/9.2.0/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) }; - } - - -} -# 64 "/usr/include/c++/9.2.0/bits/stl_list.h" 2 3 -# 1 "/usr/include/c++/9.2.0/ext/aligned_buffer.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/aligned_buffer.h" 3 - -# 33 "/usr/include/c++/9.2.0/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()); } - }; -# 89 "/usr/include/c++/9.2.0/ext/aligned_buffer.h" 3 - 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()); } - }; - - -} -# 65 "/usr/include/c++/9.2.0/bits/stl_list.h" 2 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; } - }; - } - - - - - 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; } - - - reference - operator*() const noexcept - { return *static_cast<_Node*>(_M_node)->_M_valptr(); } - - 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; - } - - 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; } - - - __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)); } - - - reference - operator*() const noexcept - { return *static_cast<_Node*>(_M_node)->_M_valptr(); } - - 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; - } - - 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; } - - - 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(); } -# 436 "/usr/include/c++/9.2.0/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(); } - }; -# 551 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _Tp, typename _Alloc = std::allocator<_Tp> > - class list : protected _List_base<_Tp, _Alloc> - { -# 564 "/usr/include/c++/9.2.0/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"); - - - - - - - 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; -# 626 "/usr/include/c++/9.2.0/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(); } -# 661 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - public: - - - - - - - - list() = default; -# 678 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - explicit - list(const allocator_type& __a) noexcept - : _Base(_Node_alloc_type(__a)) { } -# 691 "/usr/include/c++/9.2.0/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); } -# 704 "/usr/include/c++/9.2.0/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); } -# 731 "/usr/include/c++/9.2.0/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()); } -# 744 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - list(list&&) = default; -# 754 "/usr/include/c++/9.2.0/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 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 allocator_type& __a) - noexcept(_Node_alloc_traits::_S_always_equal()) - : list(std::move(__x), __a, - typename _Node_alloc_traits::is_always_equal{}) - { } -# 797 "/usr/include/c++/9.2.0/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()); } -# 823 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - ~list() = default; -# 834 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - list& - operator=(const list& __x); -# 848 "/usr/include/c++/9.2.0/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; - } -# 866 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - list& - operator=(initializer_list<value_type> __l) - { - this->assign(__l.begin(), __l.end()); - return *this; - } -# 884 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - assign(size_type __n, const value_type& __val) - { _M_fill_assign(__n, __val); } -# 901 "/usr/include/c++/9.2.0/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()); } -# 925 "/usr/include/c++/9.2.0/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()); } - - - - - - - iterator - begin() noexcept - { return iterator(this->_M_impl._M_node._M_next); } - - - - - - - const_iterator - begin() const noexcept - { return const_iterator(this->_M_impl._M_node._M_next); } - - - - - - - iterator - end() noexcept - { return iterator(&this->_M_impl._M_node); } - - - - - - - const_iterator - end() const noexcept - { return const_iterator(&this->_M_impl._M_node); } - - - - - - - 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()); } - - - - - - - - const_iterator - cbegin() const noexcept - { return const_iterator(this->_M_impl._M_node._M_next); } - - - - - - - const_iterator - cend() const noexcept - { return const_iterator(&this->_M_impl._M_node); } - - - - - - - const_reverse_iterator - crbegin() const noexcept - { return const_reverse_iterator(end()); } - - - - - - - const_reverse_iterator - crend() const noexcept - { return const_reverse_iterator(begin()); } - - - - - - - - bool - empty() const noexcept - { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } - - - size_type - size() const noexcept - { return _M_node_count(); } - - - size_type - max_size() const noexcept - { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } -# 1074 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - resize(size_type __new_size); -# 1087 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - resize(size_type __new_size, const value_type& __x); -# 1109 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - reference - front() noexcept - { return *begin(); } - - - - - - const_reference - front() const noexcept - { return *begin(); } - - - - - - reference - back() noexcept - { - iterator __tmp = end(); - --__tmp; - return *__tmp; - } - - - - - - const_reference - back() const noexcept - { - const_iterator __tmp = end(); - --__tmp; - return *__tmp; - } -# 1156 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_front(_Args&&... __args) - { - this->_M_insert(begin(), std::forward<_Args>(__args)...); - - - - } -# 1192 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - pop_front() noexcept - { this->_M_erase(begin()); } -# 1206 "/usr/include/c++/9.2.0/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> - - - - void - - emplace_back(_Args&&... __args) - { - this->_M_insert(end(), std::forward<_Args>(__args)...); - - - - } -# 1241 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - pop_back() noexcept - { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } -# 1258 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename... _Args> - iterator - emplace(const_iterator __position, _Args&&... __args); -# 1273 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - iterator - insert(const_iterator __position, const value_type& __x); -# 1303 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - iterator - insert(const_iterator __position, value_type&& __x) - { return emplace(__position, std::move(__x)); } -# 1322 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - iterator - insert(const_iterator __p, initializer_list<value_type> __l) - { return this->insert(__p, __l.begin(), __l.end()); } -# 1342 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - iterator - insert(const_iterator __position, size_type __n, const value_type& __x); -# 1381 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _InputIterator, - typename = std::_RequireInputIter<_InputIterator>> - iterator - insert(const_iterator __position, _InputIterator __first, - _InputIterator __last); -# 1425 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - iterator - - erase(const_iterator __position) noexcept; -# 1450 "/usr/include/c++/9.2.0/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(); - } -# 1473 "/usr/include/c++/9.2.0/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(); - } -# 1512 "/usr/include/c++/9.2.0/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)); } -# 1548 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - splice(const_iterator __position, list&& __x, const_iterator __i) noexcept -# 1563 "/usr/include/c++/9.2.0/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); - } -# 1590 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - splice(const_iterator __position, list& __x, const_iterator __i) noexcept - { splice(__position, std::move(__x), __i); } -# 1609 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - splice(const_iterator __position, list&& __x, const_iterator __first, - const_iterator __last) noexcept -# 1629 "/usr/include/c++/9.2.0/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()); - } - } -# 1659 "/usr/include/c++/9.2.0/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: -# 1688 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - - __remove_return_type - remove(const _Tp& __value); -# 1703 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _Predicate> - __remove_return_type - remove_if(_Predicate); -# 1717 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - - __remove_return_type - unique(); -# 1733 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _BinaryPredicate> - __remove_return_type - unique(_BinaryPredicate); -# 1749 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - void - merge(list&& __x); - - void - merge(list& __x) - { merge(std::move(__x)); } -# 1774 "/usr/include/c++/9.2.0/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); } -# 1793 "/usr/include/c++/9.2.0/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); -# 1871 "/usr/include/c++/9.2.0/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); } -# 1903 "/usr/include/c++/9.2.0/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(list& __x) noexcept - { - if (std::__alloc_neq<typename _Base::_Node_alloc_type>:: - _S_do_it(_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->_M_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_if_noexcept_iterator(__x.begin()), - std::__make_move_if_noexcept_iterator(__x.end()), - __false_type{}); - } - - }; -# 1977 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 -} -# 1989 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _Tp, typename _Alloc> - 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; - } -# 2023 "/usr/include/c++/9.2.0/bits/stl_list.h" 3 - template<typename _Tp, typename _Alloc> - 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> - inline bool - operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) - { return !(__x == __y); } - - - template<typename _Tp, typename _Alloc> - inline bool - operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) - { return __y < __x; } - - - template<typename _Tp, typename _Alloc> - inline bool - operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) - { return !(__y < __x); } - - - template<typename _Tp, typename _Alloc> - 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; - } - - - -} -# 64 "/usr/include/c++/9.2.0/list" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/list.tcc" 1 3 -# 59 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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) - { - size_type __removed __attribute__((__unused__)) = 0; - iterator __first = begin(); - iterator __last = end(); - iterator __extra = __last; - while (__first != __last) - { - iterator __next = __first; - ++__next; - if (*__first == __value) - { - - - - if (std::__addressof(*__first) != std::__addressof(__value)) - { - _M_erase(__first); - ; - } - else - __extra = __first; - } - __first = __next; - } - if (__extra != __last) - { - _M_erase(__extra); - ; - } - 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 ; - size_type __removed __attribute__((__unused__)) = 0; - iterator __next = __first; - while (++__next != __last) - { - if (*__first == *__next) - { - _M_erase(__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 size_t __orig_size = __x.size(); - try { - 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); - - this->_M_inc_size(__x._M_get_size()); - __x._M_set_size(0); - } - catch(...) - { - const size_t __dist = std::distance(__first2, __last2); - this->_M_inc_size(__orig_size - __dist); - __x._M_set_size(__dist); - throw; - } - } - } - - 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 size_t __orig_size = __x.size(); - try - { - 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); - - this->_M_inc_size(__x._M_get_size()); - __x._M_set_size(0); - } - catch(...) - { - const size_t __dist = std::distance(__first2, __last2); - this->_M_inc_size(__orig_size - __dist); - __x._M_set_size(__dist); - throw; - } - } - } - - 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) - { - list __carry; - list __tmp[64]; - list * __fill = __tmp; - list * __counter; - try - { - do - { - __carry.splice(__carry.begin(), *this, begin()); - - for(__counter = __tmp; - __counter != __fill && !__counter->empty(); - ++__counter) - { - __counter->merge(__carry); - __carry.swap(*__counter); - } - __carry.swap(*__counter); - if (__counter == __fill) - ++__fill; - } - while ( !empty() ); - - for (__counter = __tmp + 1; __counter != __fill; ++__counter) - __counter->merge(*(__counter - 1)); - swap( *(__fill - 1) ); - } - catch(...) - { - this->splice(this->end(), __carry); - for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) - this->splice(this->end(), __tmp[__i]); - throw; - } - } - } - - template<typename _Tp, typename _Alloc> - template <typename _Predicate> - typename list<_Tp, _Alloc>::__remove_return_type - list<_Tp, _Alloc>:: - remove_if(_Predicate __pred) - { - size_type __removed __attribute__((__unused__)) = 0; - iterator __first = begin(); - iterator __last = end(); - while (__first != __last) - { - iterator __next = __first; - ++__next; - if (__pred(*__first)) - { - _M_erase(__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 ; - size_type __removed __attribute__((__unused__)) = 0; - iterator __next = __first; - while (++__next != __last) - { - if (__binary_pred(*__first, *__next)) - { - _M_erase(__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) - { - list __carry; - list __tmp[64]; - list * __fill = __tmp; - list * __counter; - try - { - do - { - __carry.splice(__carry.begin(), *this, begin()); - - for(__counter = __tmp; - __counter != __fill && !__counter->empty(); - ++__counter) - { - __counter->merge(__carry, __comp); - __carry.swap(*__counter); - } - __carry.swap(*__counter); - if (__counter == __fill) - ++__fill; - } - while ( !empty() ); - - for (__counter = __tmp + 1; __counter != __fill; ++__counter) - __counter->merge(*(__counter - 1), __comp); - swap(*(__fill - 1)); - } - catch(...) - { - this->splice(this->end(), __carry); - for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) - this->splice(this->end(), __tmp[__i]); - throw; - } - } - } - - - -} -# 65 "/usr/include/c++/9.2.0/list" 2 3 -# 93 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 - -# 1 "/usr/include/c++/9.2.0/map" 1 3 4 -# 58 "/usr/include/c++/9.2.0/map" 3 4 - -# 59 "/usr/include/c++/9.2.0/map" 3 - -# 1 "/usr/include/c++/9.2.0/bits/stl_tree.h" 1 3 -# 61 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - -# 62 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 -# 75 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 99 "/usr/include/c++/9.2.0/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++/9.2.0/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; - }; - - 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 (); - - _Rb_tree_node_base* - _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, - _Rb_tree_node_base& __header) throw (); - - - template<typename _Cmp, typename _SfinaeType, typename = __void_t<>> - struct __has_is_transparent - { }; - - template<typename _Cmp, typename _SfinaeType> - struct __has_is_transparent<_Cmp, _SfinaeType, - __void_t<typename _Cmp::is_transparent>> - { typedef void type; }; - - template<typename _Cmp, typename _SfinaeType> - using __has_is_transparent_t - = typename __has_is_transparent<_Cmp, _SfinaeType>::type; - - - - - - - - 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); } -# 607 "/usr/include/c++/9.2.0/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<typename _NodeGen> - _Link_type - _M_clone_node(_Const_Link_type __x, _NodeGen& __node_gen) - { - _Link_type __tmp = __node_gen(*__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_impl(_Rb_tree_impl&&) = 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_begin() noexcept - { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } - - _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_reference - _S_value(_Const_Link_type __x) - { return *__x->_M_valptr(); } - - 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"); -# 785 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - 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_reference - _S_value(_Const_Base_ptr __x) - { return *static_cast<_Const_Link_type>(__x)->_M_valptr(); } - - 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; -# 842 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - 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); -# 893 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - template<typename _NodeGen> - _Link_type - _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); - - template<typename _NodeGen> - _Link_type - _M_copy(const _Rb_tree& __x, _NodeGen& __gen) - { - _Link_type __root = _M_copy(__x._M_begin(), _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(__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()); } - - 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) - { - _Alloc_node __an(*this); - for (; __first != __last; ++__first) - _M_emplace_equal(*__first); - } -# 1190 "/usr/include/c++/9.2.0/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) - { - ; - const_iterator __result = __position; - ++__result; - _M_erase_aux(__position); - return __result._M_const_cast(); - } - - - __attribute ((__abi_tag__ ("cxx11"))) - iterator - erase(iterator __position) - { - ; - iterator __result = __position; - ++__result; - _M_erase_aux(__position); - return __result; - } -# 1238 "/usr/include/c++/9.2.0/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(); - } -# 1260 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - void - erase(const key_type* __first, const key_type* __last); - - 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); -# 1615 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - friend bool - operator==(const _Rb_tree& __x, const _Rb_tree& __y) - { - return __x.size() == __y.size() - && std::equal(__x.begin(), __x.end(), __y.begin()); - } - - friend bool - operator<(const _Rb_tree& __x, const _Rb_tree& __y) - { - return std::lexicographical_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()); - } - - friend bool __attribute__ ((__deprecated__)) - operator!=(const _Rb_tree& __x, const _Rb_tree& __y) - { return !(__x == __y); } - - friend bool __attribute__ ((__deprecated__)) - operator>(const _Rb_tree& __x, const _Rb_tree& __y) - { return __y < __x; } - - friend bool __attribute__ ((__deprecated__)) - operator<=(const _Rb_tree& __x, const _Rb_tree& __y) - { return !(__y < __x); } - - friend bool __attribute__ ((__deprecated__)) - operator>=(const _Rb_tree& __x, const _Rb_tree& __y) - { return !(__x < __y); } - }; - - 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 - { - _Alloc_node __an(*this); - auto __lbd = - [&__an](const value_type& __cval) - { - auto& __val = const_cast<value_type&>(__cval); - return __an(std::move_if_noexcept(__val)); - }; - _M_root() = _M_copy(__x, __lbd); - } - } - - 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) - { - auto __lbd = - [&__roan](const value_type& __cval) - { - auto& __val = const_cast<value_type&>(__cval); - return __roan(std::move_if_noexcept(__val)); - }; - _M_root() = _M_copy(__x, __lbd); - __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 != &__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(__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<typename _NodeGen> - typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type - _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: - _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) - { - - _Link_type __top = _M_clone_node(__x, __node_gen); - __top->_M_parent = __p; - - try - { - if (__x->_M_right) - __top->_M_right = _M_copy(_S_right(__x), __top, __node_gen); - __p = __top; - __x = _S_left(__x); - - while (__x != 0) - { - _Link_type __y = _M_clone_node(__x, __node_gen); - __p->_M_left = __y; - __y->_M_parent = __p; - if (__x->_M_right) - __y->_M_right = _M_copy(_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> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) - { - 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> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_insert_lower_node(_Base_ptr __p, _Link_type __z) - { - 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> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_insert_equal_lower_node(_Link_type __z) - { - _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> - pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, - _Compare, _Alloc>::iterator, bool> - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_emplace_unique(_Args&&... __args) - { - _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); - - try - { - typedef pair<iterator, bool> _Res; - auto __res = _M_get_insert_unique_pos(_S_key(__z)); - if (__res.second) - return _Res(_M_insert_node(__res.first, __res.second, __z), true); - - _M_drop_node(__z); - return _Res(iterator(__res.first), false); - } - catch(...) - { - _M_drop_node(__z); - throw; - } - } - - template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc> - template<typename... _Args> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_emplace_equal(_Args&&... __args) - { - _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); - - try - { - auto __res = _M_get_insert_equal_pos(_S_key(__z)); - return _M_insert_node(__res.first, __res.second, __z); - } - catch(...) - { - _M_drop_node(__z); - throw; - } - } - - template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc> - template<typename... _Args> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) - { - _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); - - try - { - auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z)); - - if (__res.second) - return _M_insert_node(__res.first, __res.second, __z); - - _M_drop_node(__z); - return iterator(__res.first); - } - catch(...) - { - _M_drop_node(__z); - throw; - } - } - - template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc> - template<typename... _Args> - typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) - { - _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); - - try - { - auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z)); - - if (__res.second) - return _M_insert_node(__res.first, __res.second, __z); - - return _M_insert_equal_lower_node(__z); - } - catch(...) - { - _M_drop_node(__z); - throw; - } - } - - - - 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> - void - _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: - erase(const _Key* __first, const _Key* __last) - { - while (__first != __last) - erase(*__first++); - } - - 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; - } -# 2645 "/usr/include/c++/9.2.0/bits/stl_tree.h" 3 - -} -# 61 "/usr/include/c++/9.2.0/map" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_map.h" 1 3 -# 66 "/usr/include/c++/9.2.0/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++/9.2.0/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: -# 126 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - public: - 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); } - }; - - 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; -# 183 "/usr/include/c++/9.2.0/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)) { } -# 205 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - map(const map&) = default; - - - - - - - - map(map&&) = default; -# 226 "/usr/include/c++/9.2.0/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 allocator_type& __a) - : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } - - - map(map&& __m, const 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); } -# 270 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - template<typename _InputIterator> - map(_InputIterator __first, _InputIterator __last) - : _M_t() - { _M_t._M_insert_range_unique(__first, __last); } -# 287 "/usr/include/c++/9.2.0/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; -# 316 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - map& - operator=(const map&) = default; - - - map& - operator=(map&&) = default; -# 334 "/usr/include/c++/9.2.0/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(); } - - - - - - - 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(); } -# 489 "/usr/include/c++/9.2.0/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; - } -# 534 "/usr/include/c++/9.2.0/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; - } -# 572 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - template<typename... _Args> - std::pair<iterator, bool> - emplace(_Args&&... __args) - { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } -# 602 "/usr/include/c++/9.2.0/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)...); - } -# 800 "/usr/include/c++/9.2.0/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) - { return _M_t._M_emplace_unique(std::forward<_Pair>(__x)); } -# 827 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - void - insert(std::initializer_list<value_type> __list) - { insert(__list.begin(), __list.end()); } -# 856 "/usr/include/c++/9.2.0/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)); - } -# 889 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - template<typename _InputIterator> - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_range_unique(__first, __last); } -# 1029 "/usr/include/c++/9.2.0/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); } -# 1066 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - size_type - erase(const key_type& __x) - { return _M_t.erase(__x); } -# 1086 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - iterator - erase(const_iterator __first, const_iterator __last) - { return _M_t.erase(__first, __last); } -# 1120 "/usr/include/c++/9.2.0/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()); } -# 1167 "/usr/include/c++/9.2.0/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); } -# 1192 "/usr/include/c++/9.2.0/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); } -# 1213 "/usr/include/c++/9.2.0/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); } -# 1256 "/usr/include/c++/9.2.0/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)); } -# 1281 "/usr/include/c++/9.2.0/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)); } -# 1301 "/usr/include/c++/9.2.0/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)); } -# 1321 "/usr/include/c++/9.2.0/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)); } -# 1350 "/usr/include/c++/9.2.0/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)); } -# 1379 "/usr/include/c++/9.2.0/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>&); - }; -# 1453 "/usr/include/c++/9.2.0/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; } -# 1470 "/usr/include/c++/9.2.0/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); } - - -# 1535 "/usr/include/c++/9.2.0/bits/stl_map.h" 3 - -} -# 62 "/usr/include/c++/9.2.0/map" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 1 3 -# 64 "/usr/include/c++/9.2.0/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++/9.2.0/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: -# 125 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - public: - 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); } - }; - - 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; -# 180 "/usr/include/c++/9.2.0/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)) { } -# 202 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - multimap(const multimap&) = default; -# 211 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - multimap(multimap&&) = default; -# 223 "/usr/include/c++/9.2.0/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 allocator_type& __a) - : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } - - - multimap(multimap&& __m, const 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); } -# 266 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - template<typename _InputIterator> - multimap(_InputIterator __first, _InputIterator __last) - : _M_t() - { _M_t._M_insert_range_equal(__first, __last); } -# 282 "/usr/include/c++/9.2.0/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; -# 311 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - multimap& - operator=(const multimap&) = default; - - - multimap& - operator=(multimap&&) = default; -# 329 "/usr/include/c++/9.2.0/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(); } - - - - - 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(); } -# 487 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - template<typename... _Args> - iterator - emplace(_Args&&... __args) - { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } -# 514 "/usr/include/c++/9.2.0/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)...); - } -# 536 "/usr/include/c++/9.2.0/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)); } -# 575 "/usr/include/c++/9.2.0/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)); - } -# 609 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - template<typename _InputIterator> - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_range_equal(__first, __last); } -# 622 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - void - insert(initializer_list<value_type> __l) - { this->insert(__l.begin(), __l.end()); } -# 699 "/usr/include/c++/9.2.0/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); } -# 736 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - size_type - erase(const key_type& __x) - { return _M_t.erase(__x); } -# 757 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - iterator - erase(const_iterator __first, const_iterator __last) - { return _M_t.erase(__first, __last); } -# 794 "/usr/include/c++/9.2.0/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()); } -# 840 "/usr/include/c++/9.2.0/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); } -# 864 "/usr/include/c++/9.2.0/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); } -# 882 "/usr/include/c++/9.2.0/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); } -# 925 "/usr/include/c++/9.2.0/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)); } -# 950 "/usr/include/c++/9.2.0/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)); } -# 970 "/usr/include/c++/9.2.0/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)); } -# 990 "/usr/include/c++/9.2.0/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)); } -# 1017 "/usr/include/c++/9.2.0/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)); } -# 1044 "/usr/include/c++/9.2.0/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>&); - }; -# 1117 "/usr/include/c++/9.2.0/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; } -# 1134 "/usr/include/c++/9.2.0/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); } - - -# 1199 "/usr/include/c++/9.2.0/bits/stl_multimap.h" 3 - -} -# 63 "/usr/include/c++/9.2.0/map" 2 3 - -# 1 "/usr/include/c++/9.2.0/bits/erase_if.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/erase_if.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/erase_if.h" 3 - - - -namespace std -{ - - - - - - - namespace __detail - { - template<typename _Container, typename _Predicate> - typename _Container::size_type - __erase_nodes_if(_Container& __cont, _Predicate __pred) - { - typename _Container::size_type __num = 0; - for (auto __iter = __cont.begin(), __last = __cont.end(); - __iter != __last;) - { - if (__pred(*__iter)) - { - __iter = __cont.erase(__iter); - ++__num; - } - else - ++__iter; - } - return __num; - } - } - - -} -# 65 "/usr/include/c++/9.2.0/map" 2 3 -# 95 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/set" 1 3 4 -# 58 "/usr/include/c++/9.2.0/set" 3 4 - -# 59 "/usr/include/c++/9.2.0/set" 3 - - -# 1 "/usr/include/c++/9.2.0/bits/stl_set.h" 1 3 -# 64 "/usr/include/c++/9.2.0/bits/stl_set.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - template<typename _Key, typename _Compare, typename _Alloc> - class multiset; -# 92 "/usr/include/c++/9.2.0/bits/stl_set.h" 3 - template<typename _Key, typename _Compare = std::less<_Key>, - typename _Alloc = std::allocator<_Key> > - class set - { -# 108 "/usr/include/c++/9.2.0/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"); - - - - - - - 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; -# 167 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/bits/stl_set.h" 3 - set(const set&) = default; - - - - - - - - set(set&&) = default; -# 243 "/usr/include/c++/9.2.0/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 allocator_type& __a) - : _M_t(__x._M_t, _Key_alloc_type(__a)) { } - - - set(set&& __x, const 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++/9.2.0/bits/stl_set.h" 3 - set& - operator=(const set&) = default; - - - set& - operator=(set&&) = default; -# 315 "/usr/include/c++/9.2.0/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(); } - - - - 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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/bits/stl_set.h" 3 - void - insert(initializer_list<value_type> __l) - { this->insert(__l.begin(), __l.end()); } -# 652 "/usr/include/c++/9.2.0/bits/stl_set.h" 3 - __attribute ((__abi_tag__ ("cxx11"))) - iterator - erase(const_iterator __position) - { return _M_t.erase(__position); } -# 683 "/usr/include/c++/9.2.0/bits/stl_set.h" 3 - size_type - erase(const key_type& __x) - { return _M_t.erase(__x); } -# 704 "/usr/include/c++/9.2.0/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++/9.2.0/bits/stl_set.h" 3 - void - clear() noexcept - { _M_t.clear(); } -# 747 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/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>&); - }; -# 977 "/usr/include/c++/9.2.0/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; } -# 994 "/usr/include/c++/9.2.0/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); } - - -# 1056 "/usr/include/c++/9.2.0/bits/stl_set.h" 3 - -} -# 62 "/usr/include/c++/9.2.0/set" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 1 3 -# 64 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - template<typename _Key, typename _Compare, typename _Alloc> - class set; -# 94 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - template <typename _Key, typename _Compare = std::less<_Key>, - typename _Alloc = std::allocator<_Key> > - class multiset - { -# 110 "/usr/include/c++/9.2.0/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"); - - - - - - - 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; -# 164 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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++/9.2.0/bits/stl_multiset.h" 3 - multiset(const multiset&) = default; -# 227 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - multiset(multiset&&) = default; -# 239 "/usr/include/c++/9.2.0/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 allocator_type& __a) - : _M_t(__m._M_t, _Key_alloc_type(__a)) { } - - - multiset(multiset&& __m, const 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; -# 293 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - multiset& - operator=(const multiset&) = default; - - - multiset& - operator=(multiset&&) = default; -# 311 "/usr/include/c++/9.2.0/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(); } - - - - 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(); } -# 436 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - void - swap(multiset& __x) - noexcept(__is_nothrow_swappable<_Compare>::value) - { _M_t.swap(__x._M_t); } -# 455 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - template<typename... _Args> - iterator - emplace(_Args&&... __args) - { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } -# 481 "/usr/include/c++/9.2.0/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)...); - } -# 501 "/usr/include/c++/9.2.0/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)); } -# 531 "/usr/include/c++/9.2.0/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)); } -# 549 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - template<typename _InputIterator> - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_range_equal(__first, __last); } -# 562 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - void - insert(initializer_list<value_type> __l) - { this->insert(__l.begin(), __l.end()); } -# 637 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - __attribute ((__abi_tag__ ("cxx11"))) - iterator - erase(const_iterator __position) - { return _M_t.erase(__position); } -# 668 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - size_type - erase(const key_type& __x) - { return _M_t.erase(__x); } -# 689 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - __attribute ((__abi_tag__ ("cxx11"))) - iterator - erase(const_iterator __first, const_iterator __last) - { return _M_t.erase(__first, __last); } -# 717 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - void - clear() noexcept - { _M_t.clear(); } -# 729 "/usr/include/c++/9.2.0/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); } -# 774 "/usr/include/c++/9.2.0/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)}; } -# 809 "/usr/include/c++/9.2.0/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)); } -# 839 "/usr/include/c++/9.2.0/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)); } -# 878 "/usr/include/c++/9.2.0/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>&); - }; -# 962 "/usr/include/c++/9.2.0/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; } -# 979 "/usr/include/c++/9.2.0/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); } - - -# 1044 "/usr/include/c++/9.2.0/bits/stl_multiset.h" 3 - -} -# 63 "/usr/include/c++/9.2.0/set" 2 3 -# 96 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/bitset" 1 3 4 -# 45 "/usr/include/c++/9.2.0/bitset" 3 4 - -# 46 "/usr/include/c++/9.2.0/bitset" 3 -# 64 "/usr/include/c++/9.2.0/bitset" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - - 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); } - - _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)]; } - - - 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]; - } - - 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]; - } - - 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]; - } - - void - _M_do_left_shift(size_t __shift) noexcept; - - void - _M_do_right_shift(size_t __shift) noexcept; - - void - _M_do_flip() noexcept - { - for (size_t __i = 0; __i < _Nw; __i++) - _M_w[__i] = ~_M_w[__i]; - } - - void - _M_do_set() noexcept - { - for (size_t __i = 0; __i < _Nw; __i++) - _M_w[__i] = ~static_cast<_WordT>(0); - } - - void - _M_do_reset() noexcept - { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); } - - 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> - 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)); - } - - 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; - } - - 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; - } - - unsigned long - _M_do_to_ulong() const; - - - unsigned long long - _M_do_to_ullong() const; - - - - size_t - _M_do_find_first(size_t) const noexcept; - - - size_t - _M_do_find_next(size_t, size_t) const noexcept; - }; - - - template<size_t _Nw> - 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> - 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> - 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> - 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> - 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> - 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); } - - _WordT& - _M_getword(size_t) noexcept - { return _M_w; } - - constexpr _WordT - _M_getword(size_t) const noexcept - { return _M_w; } - - - const _WordT* - _M_getdata() const noexcept - { return &_M_w; } - - - _WordT& - _M_hiword() noexcept - { return _M_w; } - - constexpr _WordT - _M_hiword() const noexcept - { return _M_w; } - - void - _M_do_and(const _Base_bitset<1>& __x) noexcept - { _M_w &= __x._M_w; } - - void - _M_do_or(const _Base_bitset<1>& __x) noexcept - { _M_w |= __x._M_w; } - - void - _M_do_xor(const _Base_bitset<1>& __x) noexcept - { _M_w ^= __x._M_w; } - - void - _M_do_left_shift(size_t __shift) noexcept - { _M_w <<= __shift; } - - void - _M_do_right_shift(size_t __shift) noexcept - { _M_w >>= __shift; } - - void - _M_do_flip() noexcept - { _M_w = ~_M_w; } - - void - _M_do_set() noexcept - { _M_w = ~static_cast<_WordT>(0); } - - void - _M_do_reset() noexcept - { _M_w = 0; } - - bool - _M_is_equal(const _Base_bitset<1>& __x) const noexcept - { return _M_w == __x._M_w; } - - template<size_t _Nb> - bool - _M_are_all() const noexcept - { return _M_w == (~static_cast<_WordT>(0) - >> ((8 * 8) - _Nb)); } - - bool - _M_is_any() const noexcept - { return _M_w != 0; } - - size_t - _M_do_count() const noexcept - { return __builtin_popcountl(_M_w); } - - unsigned long - _M_do_to_ulong() const noexcept - { return _M_w; } - - - unsigned long long - _M_do_to_ullong() const noexcept - { return _M_w; } - - - 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; - } - - - 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); } -# 560 "/usr/include/c++/9.2.0/bitset" 3 - _WordT& - _M_getword(size_t) noexcept - { - __throw_out_of_range(("_Base_bitset::_M_getword")); - return *new _WordT; - } - - constexpr _WordT - _M_getword(size_t) const noexcept - { return 0; } - - constexpr _WordT - _M_hiword() const noexcept - { return 0; } - - void - _M_do_and(const _Base_bitset<0>&) noexcept - { } - - void - _M_do_or(const _Base_bitset<0>&) noexcept - { } - - void - _M_do_xor(const _Base_bitset<0>&) noexcept - { } - - void - _M_do_left_shift(size_t) noexcept - { } - - void - _M_do_right_shift(size_t) noexcept - { } - - void - _M_do_flip() noexcept - { } - - void - _M_do_set() noexcept - { } - - void - _M_do_reset() noexcept - { } - - - - - bool - _M_is_equal(const _Base_bitset<0>&) const noexcept - { return true; } - - template<size_t _Nb> - bool - _M_are_all() const noexcept - { return true; } - - bool - _M_is_any() const noexcept - { return false; } - - size_t - _M_do_count() const noexcept - { return 0; } - - unsigned long - _M_do_to_ulong() const noexcept - { return 0; } - - - unsigned long long - _M_do_to_ullong() const noexcept - { return 0; } - - - - - size_t - _M_do_find_first(size_t) const noexcept - { return 0; } - - 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 void - _S_do_sanitize(_WordT& __val) noexcept - { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } - }; - - template<> - struct _Sanitize<0> - { - typedef unsigned long _WordT; - - static 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); } - }; -# 750 "/usr/include/c++/9.2.0/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: -# 802 "/usr/include/c++/9.2.0/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)) { } -# 891 "/usr/include/c++/9.2.0/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')); - } -# 913 "/usr/include/c++/9.2.0/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); - } -# 944 "/usr/include/c++/9.2.0/bitset" 3 - template<typename _CharT> - explicit - bitset(const _CharT* __str, - typename std::basic_string<_CharT>::size_type __n - = std::basic_string<_CharT>::npos, - _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) - : _Base() - { - if (!__str) - __throw_logic_error(("bitset::bitset(const _CharT*, ...)")); - - if (__n == std::basic_string<_CharT>::npos) - __n = std::char_traits<_CharT>::length(__str); - _M_copy_from_ptr<_CharT, std::char_traits<_CharT>>(__str, __n, 0, - __n, __zero, - __one); - } -# 971 "/usr/include/c++/9.2.0/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; - } -# 1000 "/usr/include/c++/9.2.0/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; - } -# 1033 "/usr/include/c++/9.2.0/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; - } -# 1112 "/usr/include/c++/9.2.0/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(); } -# 1162 "/usr/include/c++/9.2.0/bitset" 3 - reference - operator[](size_t __position) - { return reference(*this, __position); } - - constexpr bool - operator[](size_t __position) const - { return _Unchecked_test(__position); } -# 1177 "/usr/include/c++/9.2.0/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(); } -# 1195 "/usr/include/c++/9.2.0/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); - } - - - 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, class _Alloc> - void - _M_copy_from_string(const std::basic_string<_CharT, - _Traits, _Alloc>& __s, size_t __pos, size_t __n) - { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); } - - template<class _CharT, class _Traits, class _Alloc> - void - _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const - { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); } - - - 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); } -# 1320 "/usr/include/c++/9.2.0/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; } -# 1370 "/usr/include/c++/9.2.0/bitset" 3 - size_t - _Find_first() const noexcept - { return this->_M_do_find_first(_Nb); } -# 1381 "/usr/include/c++/9.2.0/bitset" 3 - size_t - _Find_next(size_t __prev) const noexcept - { return this->_M_do_find_next(__prev, _Nb); } - }; - - - 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); - for (size_t __i = _Nb; __i > 0; --__i) - if (_Unchecked_test(__i - 1)) - _Traits::assign(__s[_Nb - __i], __one); - } -# 1431 "/usr/include/c++/9.2.0/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; - } -# 1468 "/usr/include/c++/9.2.0/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; - - std::basic_string<_CharT, _Traits> __tmp; - __tmp.reserve(_Nb); - - - - 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)) - __tmp.push_back(__zero); - else if (_Traits::eq(__c2, __one)) - __tmp.push_back(__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 (__tmp.empty() && _Nb) - __state |= __ios_base::failbit; - else - __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb, - __zero, __one); - 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; } - }; - - -} -# 97 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 -# 23 "/usr/include/boost/container_hash/extensions.hpp" 2 3 4 -# 36 "/usr/include/boost/container_hash/extensions.hpp" 3 4 -# 1 "/usr/include/c++/9.2.0/memory" 1 3 4 -# 46 "/usr/include/c++/9.2.0/memory" 3 4 - -# 47 "/usr/include/c++/9.2.0/memory" 3 -# 67 "/usr/include/c++/9.2.0/memory" 3 -# 1 "/usr/include/c++/9.2.0/bits/stl_raw_storage_iter.h" 1 3 -# 59 "/usr/include/c++/9.2.0/bits/stl_raw_storage_iter.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - template <class _OutputIterator, class _Tp> - class 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; } - }; - - -} -# 68 "/usr/include/c++/9.2.0/memory" 2 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/ext/concurrence.h" 1 3 -# 32 "/usr/include/c++/9.2.0/ext/concurrence.h" 3 - -# 33 "/usr/include/c++/9.2.0/ext/concurrence.h" 3 - - - - - - - -namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; - - - - static 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, 0, 0, 0, { 0, 0 } } }; - - - - - __mutex(const __mutex&); - __mutex& operator=(const __mutex&); - - public: - __mutex() - { - - - - - } -# 144 "/usr/include/c++/9.2.0/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++/9.2.0/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++/9.2.0/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(); - } - - } - }; - - - -} -# 75 "/usr/include/c++/9.2.0/memory" 2 3 - - - - - - -# 1 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 1 3 -# 52 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/shared_ptr_base.h" 1 3 -# 58 "/usr/include/c++/9.2.0/bits/shared_ptr_base.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - template<typename> class auto_ptr; -#pragma GCC diagnostic pop - - - - - - - class bad_weak_ptr : public std::exception - { - public: - 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(); - - bool - _M_add_ref_lock_nothrow(); - - void - _M_release() noexcept - { - - ; - if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) - { - ; - _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(); - } - } - } - - 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 void - _Sp_counted_base<_S_single>:: - _M_add_ref_lock() - { - if (_M_use_count == 0) - __throw_bad_weak_ptr(); - ++_M_use_count; - } - - template<> - inline void - _Sp_counted_base<_S_mutex>:: - _M_add_ref_lock() - { - __gnu_cxx::__scoped_lock sentry(*this); - if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) - { - _M_use_count = 0; - __throw_bad_weak_ptr(); - } - } - - template<> - inline void - _Sp_counted_base<_S_atomic>:: - _M_add_ref_lock() - { - - _Atomic_word __count = _M_get_use_count(); - do - { - if (__count == 0) - __throw_bad_weak_ptr(); - - - } - while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, - true, 4, - 0)); - } - - template<> - inline bool - _Sp_counted_base<_S_single>:: - _M_add_ref_lock_nothrow() - { - 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() - { - __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() - { - - _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_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 - : _M_ptr(__p), _Del_base(std::move(__d)), _Alloc_base(__a) - { } - - _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 std::type_info& __ti) 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; - }; - - - 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(); - } - - -#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 = typename conditional<is_reference<_Del>::value, - reference_wrapper<typename remove_reference<_Del>::type>, - _Del>::type; - 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(), - __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); - - ~__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 != 0) - _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 != 0) - __tmp->_M_add_ref_copy(); - if (_M_pi != 0) - _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 != 0 ? _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(); - else - __throw_bad_weak_ptr(); - } - - - template<_Lock_policy _Lp> - inline - __shared_count<_Lp>:: - __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) - : _M_pi(__r._M_pi) - { - if (_M_pi != nullptr) - if (!_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 - { - ; - 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; - - - [[__deprecated__("shared_ptr<T[]>::operator* is absent from C++17")]] - element_type& - operator*() const noexcept - { - ; - return *_M_get(); - } - - [[__deprecated__("shared_ptr<T[]>::operator-> is absent from C++17")]] - element_type* - operator->() const noexcept - { - ; - return _M_get(); - } - - - element_type& - operator[](ptrdiff_t __i) const - { - ; - ; - 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 = typename enable_if<__and_< - __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> - >::value, _Res>::type; - - - template<typename _Yp, typename _Del> - using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; - - public: - - - - - - 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) - { } - - __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 = 0; - } - - 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 = 0; - } - - 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); - } - - - protected: - - template<typename _Tp1, typename _Del, - typename enable_if<__and_< - __not_<is_array<_Tp>>, is_array<_Tp1>, - is_convertible<typename unique_ptr<_Tp1, _Del>::pointer, _Tp*> - >::value, bool>::type = true> - __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) - : _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); - } - public: - - - -#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) - { - - ; - __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 - { return _M_ptr == 0 ? false : true; } - - 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); - } - - 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); - - - - __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) - : _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; } - - 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); } -# 1530 "/usr/include/c++/9.2.0/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(); - } -# 1576 "/usr/include/c++/9.2.0/bits/shared_ptr_base.h" 3 - 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; -# 1612 "/usr/include/c++/9.2.0/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 - { - _M_ptr = __r._M_ptr; - _M_refcount = std::move(__r._M_refcount); - __r._M_ptr = nullptr; - 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); } - - 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); } - }; - - 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) - { - 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()); - } - }; - - -} -# 53 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - - 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))); - - - - } - - - - - - - - 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; -# 127 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - 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) { } -# 154 "/usr/include/c++/9.2.0/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)) { } -# 172 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - template<typename _Deleter> - shared_ptr(nullptr_t __p, _Deleter __d) - : __shared_ptr<_Tp>(__p, std::move(__d)) { } -# 191 "/usr/include/c++/9.2.0/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)) { } -# 211 "/usr/include/c++/9.2.0/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)) { } -# 233 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - template<typename _Yp> - shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept - : __shared_ptr<_Tp>(__r, __p) { } -# 244 "/usr/include/c++/9.2.0/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)) { } -# 274 "/usr/include/c++/9.2.0/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)) { } - - - - - - template<typename _Yp, typename _Del, - _Constructible<unique_ptr<_Yp, _Del>, __sp_array_delete>* = 0> - shared_ptr(unique_ptr<_Yp, _Del>&& __r) - : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } - - - - - - - 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<_Yp> - allocate_shared(const _Alloc& __a, _Args&&... __args); - - - shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) - : __shared_ptr<_Tp>(__r, std::nothrow) { } - - friend class weak_ptr<_Tp>; - }; -# 381 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - template<typename _Tp, typename _Up> - inline bool - operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept - { return __a.get() == __b.get(); } - - template<typename _Tp> - inline bool - operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return !__a; } - - template<typename _Tp> - inline bool - operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return !__a; } - - template<typename _Tp, typename _Up> - inline bool - operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept - { return __a.get() != __b.get(); } - - template<typename _Tp> - inline bool - operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return (bool)__a; } - - template<typename _Tp> - inline bool - operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return (bool)__a; } - - template<typename _Tp, typename _Up> - 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> - 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> - 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> - inline bool - operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept - { return !(__b < __a); } - - template<typename _Tp> - inline bool - operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return !(nullptr < __a); } - - template<typename _Tp> - inline bool - operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return !(__a < nullptr); } - - template<typename _Tp, typename _Up> - inline bool - operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept - { return (__b < __a); } - - template<typename _Tp> - inline bool - operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return nullptr < __a; } - - template<typename _Tp> - inline bool - operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept - { return __a < nullptr; } - - template<typename _Tp, typename _Up> - inline bool - operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept - { return !(__a < __b); } - - template<typename _Tp> - inline bool - operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept - { return !(__a < nullptr); } - - template<typename _Tp> - 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(); - } -# 530 "/usr/include/c++/9.2.0/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> - 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; - }; -# 697 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - template<typename _Tp, typename _Alloc, typename... _Args> - inline shared_ptr<_Tp> - allocate_shared(const _Alloc& __a, _Args&&... __args) - { - return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, - std::forward<_Args>(__args)...); - } -# 712 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - template<typename _Tp, typename... _Args> - inline shared_ptr<_Tp> - make_shared(_Args&&... __args) - { - typedef typename std::remove_cv<_Tp>::type _Tp_nc; - return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), - std::forward<_Args>(__args)...); - } - - - 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()); - } - }; -# 756 "/usr/include/c++/9.2.0/bits/shared_ptr.h" 3 - -} -# 82 "/usr/include/c++/9.2.0/memory" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/shared_ptr_atomic.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/shared_ptr_atomic.h" 3 -# 1 "/usr/include/c++/9.2.0/bits/atomic_base.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/atomic_base.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/atomic_base.h" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/atomic_lockfree_defines.h" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/atomic_lockfree_defines.h" 3 - -# 34 "/usr/include/c++/9.2.0/bits/atomic_lockfree_defines.h" 3 -# 38 "/usr/include/c++/9.2.0/bits/atomic_base.h" 2 3 - - - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 73 "/usr/include/c++/9.2.0/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)); - } - - 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; - } - - - - template<typename _IntTp> - struct __atomic_base; - - - - - template<typename _Tp> - struct atomic; - - template<typename _Tp> - struct atomic<_Tp*>; - - - - typedef bool __atomic_flag_data_type; -# 167 "/usr/include/c++/9.2.0/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)); - } - - inline __attribute__((__always_inline__)) void - clear(memory_order __m = memory_order_seq_cst) noexcept - { - memory_order __b = __m & __memory_order_mask; - ; - ; - ; - - __atomic_clear (&_M_i, int(__m)); - } - - inline __attribute__((__always_inline__)) void - clear(memory_order __m = memory_order_seq_cst) volatile noexcept - { - memory_order __b = __m & __memory_order_mask; - ; - ; - ; - - __atomic_clear (&_M_i, int(__m)); - } - - private: - static constexpr __atomic_flag_data_type - _S_init(bool __i) - { return __i ? 1 : 0; } - }; -# 257 "/usr/include/c++/9.2.0/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 = __m & __memory_order_mask; - ; - ; - ; - - __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 = __m & __memory_order_mask; - ; - ; - ; - - __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 = __m & __memory_order_mask; - ; - ; - - 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 = __m & __memory_order_mask; - ; - ; - - 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 - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - ; - ; - ; - - 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 - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - ; - ; - ; - - 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 - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - ; - ; - ; - - 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 - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - - ; - ; - ; - - 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)); - } - - 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 = __m & __memory_order_mask; - - ; - ; - ; - - __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 = __m & __memory_order_mask; - ; - ; - ; - - __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 = __m & __memory_order_mask; - ; - ; - - 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 = __m & __memory_order_mask; - ; - ; - - 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_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) noexcept - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - ; - ; - ; - - 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 - { - memory_order __b2 = __m2 & __memory_order_mask; - memory_order __b1 = __m1 & __memory_order_mask; - - ; - ; - ; - - return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, - int(__m1), int(__m2)); - } - - 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)); } - }; - - - - -} -# 34 "/usr/include/c++/9.2.0/bits/shared_ptr_atomic.h" 2 3 - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - - - - - - - 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; - - - - }; - - - - - - - - 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); } -# 96 "/usr/include/c++/9.2.0/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); } -# 132 "/usr/include/c++/9.2.0/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); } -# 169 "/usr/include/c++/9.2.0/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); - } -# 218 "/usr/include/c++/9.2.0/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); - } - - - - - -} -# 83 "/usr/include/c++/9.2.0/memory" 2 3 - -# 1 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 1 3 -# 36 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 47 "/usr/include/c++/9.2.0/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" -# 88 "/usr/include/c++/9.2.0/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) { } -# 114 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } -# 126 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - template<typename _Tp1> - auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } -# 137 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - auto_ptr& - operator=(auto_ptr& __a) throw() - { - reset(__a.release()); - return *this; - } -# 154 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - template<typename _Tp1> - auto_ptr& - operator=(auto_ptr<_Tp1>& __a) throw() - { - reset(__a.release()); - return *this; - } -# 172 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - ~auto_ptr() { delete _M_ptr; } -# 182 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - element_type& - operator*() const throw() - { - ; - return *_M_ptr; - } - - - - - - - - element_type* - operator->() const throw() - { - ; - return _M_ptr; - } -# 212 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - element_type* - get() const throw() { return _M_ptr; } -# 226 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - element_type* - release() throw() - { - element_type* __tmp = _M_ptr; - _M_ptr = 0; - return __tmp; - } -# 241 "/usr/include/c++/9.2.0/backward/auto_ptr.h" 3 - void - reset(element_type* __p = 0) throw() - { - if (__p != _M_ptr) - { - delete _M_ptr; - _M_ptr = __p; - } - } -# 266 "/usr/include/c++/9.2.0/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__)); - - - - 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 - - -} -# 85 "/usr/include/c++/9.2.0/memory" 2 3 -# 97 "/usr/include/c++/9.2.0/memory" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 117 "/usr/include/c++/9.2.0/memory" 3 -inline void* -align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept -{ - - const auto __intptr = reinterpret_cast<uintptr_t>(__ptr); - - - - - - - const auto __aligned = (__intptr - 1u + __align) & -__align; - const auto __diff = __aligned - __intptr; - if ((__size + __diff) > __space) - return nullptr; - else - { - __space -= __diff; - return __ptr = reinterpret_cast<void*>(__aligned); - } -} - - - -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; } -# 365 "/usr/include/c++/9.2.0/memory" 3 - -} -# 37 "/usr/include/boost/container_hash/extensions.hpp" 2 3 4 - - - - - - -namespace boost -{ - template <class A, class B> - std::size_t hash_value(std::pair<A, B> const&); - template <class T, class A> - std::size_t hash_value(std::vector<T, A> const&); - template <class T, class A> - std::size_t hash_value(std::list<T, A> const& v); - template <class T, class A> - std::size_t hash_value(std::deque<T, A> const& v); - template <class K, class C, class A> - std::size_t hash_value(std::set<K, C, A> const& v); - template <class K, class C, class A> - std::size_t hash_value(std::multiset<K, C, A> const& v); - template <class K, class T, class C, class A> - std::size_t hash_value(std::map<K, T, C, A> const& v); - template <class K, class T, class C, class A> - std::size_t hash_value(std::multimap<K, T, C, A> const& v); - - template <class T> - std::size_t hash_value(std::complex<T> const&); - - template <class A, class B> - std::size_t hash_value(std::pair<A, B> const& v) - { - std::size_t seed = 0; - boost::hash_combine(seed, v.first); - boost::hash_combine(seed, v.second); - return seed; - } - - inline std::size_t hash_range( - std::vector<bool>::iterator first, - std::vector<bool>::iterator last) - { - std::size_t seed = 0; - - for(; first != last; ++first) - { - hash_combine<bool>(seed, *first); - } - - return seed; - } - - inline std::size_t hash_range( - std::vector<bool>::const_iterator first, - std::vector<bool>::const_iterator last) - { - std::size_t seed = 0; - - for(; first != last; ++first) - { - hash_combine<bool>(seed, *first); - } - - return seed; - } - - inline void hash_range( - std::size_t& seed, - std::vector<bool>::iterator first, - std::vector<bool>::iterator last) - { - for(; first != last; ++first) - { - hash_combine<bool>(seed, *first); - } - } - - inline void hash_range( - std::size_t& seed, - std::vector<bool>::const_iterator first, - std::vector<bool>::const_iterator last) - { - for(; first != last; ++first) - { - hash_combine<bool>(seed, *first); - } - } - - template <class T, class A> - std::size_t hash_value(std::vector<T, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class T, class A> - std::size_t hash_value(std::list<T, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class T, class A> - std::size_t hash_value(std::deque<T, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class K, class C, class A> - std::size_t hash_value(std::set<K, C, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class K, class C, class A> - std::size_t hash_value(std::multiset<K, C, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class K, class T, class C, class A> - std::size_t hash_value(std::map<K, T, C, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class K, class T, class C, class A> - std::size_t hash_value(std::multimap<K, T, C, A> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - template <class T> - std::size_t hash_value(std::complex<T> const& v) - { - boost::hash<T> hasher; - std::size_t seed = hasher(v.imag()); - seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); - return seed; - } - - - template <class T, std::size_t N> - std::size_t hash_value(std::array<T, N> const& v) - { - return boost::hash_range(v.begin(), v.end()); - } - - - - namespace hash_detail { - template <std::size_t I, typename T> - inline typename boost::enable_if_c<(I == std::tuple_size<T>::value), - void>::type - hash_combine_tuple(std::size_t&, T const&) - { - } - - template <std::size_t I, typename T> - inline typename boost::enable_if_c<(I < std::tuple_size<T>::value), - void>::type - hash_combine_tuple(std::size_t& seed, T const& v) - { - boost::hash_combine(seed, std::get<I>(v)); - boost::hash_detail::hash_combine_tuple<I + 1>(seed, v); - } - - template <typename T> - inline std::size_t hash_tuple(T const& v) - { - std::size_t seed = 0; - boost::hash_detail::hash_combine_tuple<0>(seed, v); - return seed; - } - } - - - template <typename... T> - inline std::size_t hash_value(std::tuple<T...> const& v) - { - return boost::hash_detail::hash_tuple(v); - } -# 288 "/usr/include/boost/container_hash/extensions.hpp" 3 4 - template <typename T> - inline std::size_t hash_value(std::shared_ptr<T> const& x) { - return boost::hash_value(x.get()); - } - - template <typename T, typename Deleter> - inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) { - return boost::hash_value(x.get()); - } -# 352 "/usr/include/boost/container_hash/extensions.hpp" 3 4 - template <class T> struct hash - : boost::hash_detail::hash_base<T> - { - - std::size_t operator()(T const& val) const - { - return hash_value(val); - } - - - - - - - }; -# 412 "/usr/include/boost/container_hash/extensions.hpp" 3 4 -} -# 761 "/usr/include/boost/container_hash/hash.hpp" 2 3 4 -# 29 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 - -# 1 "/usr/include/c++/9.2.0/cstdio" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdio" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstdio" 3 -# 31 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/cctype" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cctype" 3 4 - -# 40 "/usr/include/c++/9.2.0/cctype" 3 -# 32 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 - - - - -namespace boost{ namespace multiprecision{ -# 45 "/usr/include/boost/multiprecision/number.hpp" 3 4 -template <class Backend, expression_template_option ExpressionTemplates> -class number -{ - typedef number<Backend, ExpressionTemplates> self_type; -public: - typedef Backend backend_type; - typedef typename component_type<self_type>::type value_type; - inline constexpr number() noexcept((noexcept(Backend()))) {} - inline constexpr number(const number& e) noexcept((noexcept(Backend(std::declval<Backend const&>())))) : m_backend(e.m_backend){} - template <class V> - inline number(const V& v, typename boost::enable_if_c< - (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value) - && !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value - && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - - && !boost::is_same<V, __float128>::value - - >::type* = 0) - { - m_backend = canonical_value(v); - } - template <class V> - inline constexpr number(const V& v, typename boost::enable_if_c< - is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value - && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - >::type* = 0) - - noexcept((noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))) - - : m_backend(canonical_value(v)) {} - template <class V> - inline constexpr number(const V& v, unsigned digits10, typename boost::enable_if_c< - (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value) - && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_complex) - && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_rational) - - && !boost::is_same<V, __float128>::value - - >::type* = 0) - : m_backend(canonical_value(v), digits10) {} - inline constexpr number(const number& e, unsigned digits10) - noexcept((noexcept(Backend(std::declval<Backend const&>(), std::declval<unsigned>())))) - : m_backend(e.m_backend, digits10){} - template <class V> - explicit inline number(const V& v, typename boost::enable_if_c< - (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value) - && !detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value - && detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - >::type* = 0) - noexcept((noexcept(std::declval<Backend&>() = std::declval<typename detail::canonical<V, Backend>::type const&>()))) - { - m_backend = canonical_value(v); - } - template <class V> - explicit inline constexpr number(const V& v, typename boost::enable_if_c< - detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value - && (detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - || !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value) - >::type* = 0) - noexcept((noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))) - : m_backend(canonical_value(v)) {} - template <class V> - explicit inline constexpr number(const V& v, unsigned digits10, typename boost::enable_if_c< - (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value) - && detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value - && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_complex) - && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_rational) - >::type* = 0) - : m_backend(canonical_value(v), digits10) {} - - template<expression_template_option ET> - inline constexpr number(const number<Backend, ET>& val) - noexcept((noexcept(Backend(std::declval<Backend const&>())))) : m_backend(val.backend()) {} - - template <class Other, expression_template_option ET> - inline number(const number<Other, ET>& val, - typename boost::enable_if_c<(boost::is_convertible<Other, Backend>::value && !detail::is_restricted_conversion<Other, Backend>::value)>::type* = 0) - noexcept((noexcept(Backend(std::declval<Other const&>())))) - : m_backend(val.backend()) {} - - template <class Other, expression_template_option ET> - explicit number(const number<Other, ET>& val, typename boost::enable_if_c< - (!detail::is_explicitly_convertible<Other, Backend>::value) - >::type* = 0) - { - - - - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard_1(val); - detail::scoped_default_precision<number<Other, ET> > precision_guard_2(val); - using detail::generic_interconvert; - generic_interconvert(backend(), val.backend(), number_category<Backend>(), number_category<Other>()); - } - template <class Other, expression_template_option ET> - explicit inline number(const number<Other, ET>& val, typename boost::enable_if_c< - (detail::is_explicitly_convertible<Other, Backend>::value - && (detail::is_restricted_conversion<Other, Backend>::value || !boost::is_convertible<Other, Backend>::value)) - >::type* = 0) noexcept((noexcept(Backend(std::declval<Other const&>())))) - : m_backend(val.backend()) {} - - template <class V, class U> - inline number(const V& v1, const U& v2, - typename boost::enable_if_c<(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value && !is_same<typename component_type<self_type>::type, self_type>::value)>::type* = 0) - { - using default_ops::assign_components; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2); - assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2))); - } - template <class V, class U> - inline explicit number(const V& v1, const U& v2, - typename boost::enable_if_c< - (is_constructible<value_type, V>::value || is_convertible<V, std::string>::value) - && (is_constructible<value_type, U>::value || is_convertible<U, std::string>::value) - && !is_same<typename component_type<self_type>::type, self_type>::value - && !is_same<V, self_type>::value - && !(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value) - >::type* = 0) - { - using default_ops::assign_components; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2); - assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2))); - } -# 196 "/usr/include/boost/multiprecision/number.hpp" 3 4 - template <class V, class U> - inline number(const V& v1, const U& v2, unsigned digits10, - typename boost::enable_if_c<(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value && !is_same<typename component_type<self_type>::type, self_type>::value)>::type* = 0) - : m_backend(canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)), digits10) {} - template <class V, class U> - inline explicit number(const V& v1, const U& v2, unsigned digits10, - typename boost::enable_if_c<((is_constructible<value_type, V>::value || is_convertible<V, std::string>::value) && (is_constructible<value_type, U>::value || is_convertible<U, std::string>::value) && !is_same<typename component_type<self_type>::type, self_type>::value) && !(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value)>::type* = 0) - : m_backend(canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)), digits10){} - - - template <class Other, expression_template_option ET> - inline number(const number<Other, ET>& v1, const number<Other, ET>& v2, typename boost::enable_if<boost::is_convertible<Other, Backend> >::type* = 0) - { - using default_ops::assign_components; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2); - assign_components(m_backend, v1.backend(), v2.backend()); - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e); -# 228 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(e); - return *this = std::move(t); - } - do_assign(e, tag_type()); - return *this; - } - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - number& assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e); -# 251 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t; - t.assign(e); - return *this = std::move(t); - } - do_assign(e, tag_type()); - return *this; - } - - inline number& operator=(const number& e) - noexcept((noexcept(std::declval<Backend&>() = std::declval<Backend const&>()))) - { - m_backend = e.m_backend; - return *this; - } - - template <class V> - inline typename boost::enable_if<is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator=(const V& v) - noexcept((noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))) - { - m_backend = canonical_value(v); - return *this; - } - template <class V> - inline number<Backend, ExpressionTemplates>& assign(const V& v) - noexcept((noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))) - { - m_backend = canonical_value(v); - return *this; - } - template <class V> - inline number<Backend, ExpressionTemplates>& assign(const V& v, unsigned digits10) - noexcept((noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))) - { - number t(v, digits10); - return *this = t; - } - template <class Other, expression_template_option ET> - typename boost::disable_if<boost::multiprecision::detail::is_explicitly_convertible<Other, Backend>, number<Backend, ExpressionTemplates>& >::type - assign(const number<Other, ET>& v) - { - - - - using detail::generic_interconvert; - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v); - detail::scoped_default_precision<number<Other, ET> > precision_guard2(v); -# 310 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(v); - return *this = std::move(t); - } - generic_interconvert(backend(), v.backend(), number_category<Backend>(), number_category<Other>()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, typename boost::enable_if_c<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0) - { - - - - *this = e; - } - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - explicit number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, - typename boost::enable_if_c<!is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value - && boost::multiprecision::detail::is_explicitly_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0) - { - - - - assign(e); - } - - - inline constexpr number(number&& r) - noexcept((noexcept(Backend(std::declval<Backend>())))) - : m_backend(static_cast<Backend&&>(r.m_backend)){} - inline number& operator=(number&& r) noexcept((noexcept(std::declval<Backend&>() = std::declval<Backend>()))) - { - m_backend = static_cast<Backend&&>(r.m_backend); - return *this; - } - - - number& operator+=(const self_type& val) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, val); -# 362 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this + val); - return *this = std::move(t); - } - do_add(detail::expression<detail::terminal, self_type>(val), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator+=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); - - - if((contains_self(e) && !is_self(e))) - { - self_type temp(e); - do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_add(e, tag()); - } - return *this; - } - - template <class Arg1, class Arg2, class Arg3, class Arg4> - number& operator+=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); -# 403 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this + e); - return *this = std::move(t); - } - - - - using default_ops::eval_multiply_add; - eval_multiply_add(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref())); - return *this; - } - - template <class V> - typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator+=(const V& v) - { - using default_ops::eval_add; - eval_add(m_backend, canonical_value(v)); - return *this; - } - - number& operator-=(const self_type& val) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, val); -# 438 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this - val); - return *this = std::move(t); - } - do_subtract(detail::expression<detail::terminal, self_type>(val), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator-=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); - - if(contains_self(e)) - { - self_type temp(e); - do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_subtract(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator-=(const V& v) - { - using default_ops::eval_subtract; - eval_subtract(m_backend, canonical_value(v)); - return *this; - } - - template <class Arg1, class Arg2, class Arg3, class Arg4> - number& operator-=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); -# 487 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this - e); - return *this = std::move(t); - } - - - - using default_ops::eval_multiply_subtract; - eval_multiply_subtract(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref())); - return *this; - } - - - number& operator *= (const self_type& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); -# 514 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this * e); - return *this = std::move(t); - } - do_multiplies(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator*=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); - - - if((contains_self(e) && !is_self(e))) - { - self_type temp(e); - do_multiplies(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_multiplies(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator*=(const V& v) - { - using default_ops::eval_multiply; - eval_multiply(m_backend, canonical_value(v)); - return *this; - } - - number& operator%=(const self_type& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); -# 564 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this % e); - return *this = std::move(t); - } - do_modulus(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator%=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); - - if(contains_self(e)) - { - self_type temp(e); - do_modulus(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_modulus(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - template <class V> - typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator%=(const V& v) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - using default_ops::eval_modulus; - eval_modulus(m_backend, canonical_value(v)); - return *this; - } -# 608 "/usr/include/boost/multiprecision/number.hpp" 3 4 - inline number& operator++() - { - using default_ops::eval_increment; - eval_increment(m_backend); - return *this; - } - - inline number& operator--() - { - using default_ops::eval_decrement; - eval_decrement(m_backend); - return *this; - } - - inline number operator++(int) - { - using default_ops::eval_increment; - self_type temp(*this); - eval_increment(m_backend); - return std::move(temp); - } - - inline number operator--(int) - { - using default_ops::eval_decrement; - self_type temp(*this); - eval_decrement(m_backend); - return std::move(temp); - } - - template <class V> - inline typename boost::enable_if<is_integral<V>, number&>::type operator <<= (V val) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The left-shift operation is only valid for integer types"); - detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>()); - eval_left_shift(m_backend, static_cast<std::size_t>(canonical_value(val))); - return *this; - } - - template <class V> - inline typename boost::enable_if<is_integral<V>, number&>::type operator >>= (V val) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The right-shift operation is only valid for integer types"); - detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>()); - eval_right_shift(m_backend, static_cast<std::size_t>(canonical_value(val))); - return *this; - } - - inline number& operator /= (const self_type& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); -# 668 "/usr/include/boost/multiprecision/number.hpp" 3 4 - if(boost::multiprecision::detail::is_variable_precision<number>::value) - if (precision_guard.precision() != boost::multiprecision::detail::current_precision_of(*this)) - { - number t(*this / e); - return *this = std::move(t); - } - do_divide(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator/=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e); - - if(contains_self(e)) - { - self_type temp(e); - do_divide(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_divide(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - inline typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator/=(const V& v) - { - using default_ops::eval_divide; - eval_divide(m_backend, canonical_value(v)); - return *this; - } - - inline number& operator&=(const self_type& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - do_bitwise_and(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator&=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - - - if(contains_self(e) && !is_self(e)) - { - self_type temp(e); - do_bitwise_and(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_bitwise_and(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - inline typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator&=(const V& v) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - using default_ops::eval_bitwise_and; - eval_bitwise_and(m_backend, canonical_value(v)); - return *this; - } - - inline number& operator|=(const self_type& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - do_bitwise_or(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator|=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - - - if(contains_self(e) && !is_self(e)) - { - self_type temp(e); - do_bitwise_or(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_bitwise_or(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - inline typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator|=(const V& v) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - using default_ops::eval_bitwise_or; - eval_bitwise_or(m_backend, canonical_value(v)); - return *this; - } - - inline number& operator^=(const self_type& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - do_bitwise_xor(detail::expression<detail::terminal, self_type>(e), detail::terminal()); - return *this; - } - - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator^=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - if(contains_self(e)) - { - self_type temp(e); - do_bitwise_xor(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - else - { - do_bitwise_xor(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type()); - } - return *this; - } - - template <class V> - inline typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type - operator^=(const V& v) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(m_backend, canonical_value(v)); - return *this; - } - - - - inline void swap(self_type& other) noexcept((noexcept(std::declval<Backend>().swap(std::declval<Backend&>())))) - { - m_backend.swap(other.backend()); - } - - - - inline bool is_zero()const - { - using default_ops::eval_is_zero; - return eval_is_zero(m_backend); - } - inline int sign()const - { - using default_ops::eval_get_sign; - return eval_get_sign(m_backend); - } - - - - std::string str(std::streamsize digits = 0, std::ios_base::fmtflags f = std::ios_base::fmtflags(0))const - { - return m_backend.str(digits, f); - } - template<class Archive> - void serialize(Archive & ar, const unsigned int ) - { - ar & boost::serialization::make_nvp("backend", m_backend); - } -private: - template <class T> - void convert_to_imp(T* result)const - { - using default_ops::eval_convert_to; - eval_convert_to(result, m_backend); - } - template <class B2, expression_template_option ET> - void convert_to_imp(number<B2, ET>* result)const - { - result->assign(*this); - } - void convert_to_imp(std::string* result)const - { - *result = this->str(); - } -public: - template <class T> - T convert_to()const - { - T result; - convert_to_imp(&result); - return result; - } -# 887 "/usr/include/boost/multiprecision/number.hpp" 3 4 - template <class T, class = typename boost::disable_if_c<boost::is_constructible<T, self_type const&>::value || !boost::is_default_constructible<T>::value || (!boost::is_arithmetic<T>::value && !boost::is_complex<T>::value), T>::type> - - explicit operator T ()const - { - return this->template convert_to<T>(); - } - inline explicit operator bool()const - { - return !is_zero(); - } -# 912 "/usr/include/boost/multiprecision/number.hpp" 3 4 - static unsigned default_precision() noexcept - { - return Backend::default_precision(); - } - static void default_precision(unsigned digits10) - { - Backend::default_precision(digits10); - } - unsigned precision()const noexcept - { - return m_backend.precision(); - } - void precision(unsigned digits10) - { - m_backend.precision(digits10); - } - - - - inline int compare(const number<Backend, ExpressionTemplates>& o)const - noexcept((noexcept(std::declval<Backend>().compare(std::declval<Backend>())))) - { - return m_backend.compare(o.m_backend); - } - template <class V> - inline typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value != number_kind_complex), int>::type compare(const V& o)const - { - using default_ops::eval_get_sign; - if(o == 0) - return eval_get_sign(m_backend); - return m_backend.compare(canonical_value(o)); - } - template <class V> - inline typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value == number_kind_complex), int>::type compare(const V& o)const - { - using default_ops::eval_get_sign; - return m_backend.compare(canonical_value(o)); - } - - - - - inline Backend& backend()& noexcept { return m_backend; } - inline constexpr const Backend& backend()const& noexcept { return m_backend; } - inline Backend&& backend()&& noexcept { return static_cast<Backend&&>(m_backend); } - inline Backend const&& backend()const&& noexcept { return static_cast<Backend const&&>(m_backend); } - - - - - - - - typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type - real()const - { - using default_ops::eval_real; - detail::scoped_default_precision<typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type> precision_guard(*this); - typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result; - eval_real(result.backend(), backend()); - return result; - } - typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type - imag()const - { - using default_ops::eval_imag; - detail::scoped_default_precision<typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type> precision_guard(*this); - typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result; - eval_imag(result.backend(), backend()); - return result; - } - template <class T> - inline typename enable_if_c<boost::is_convertible<T, self_type>::value, self_type&>::type real(const T& val) - { - using default_ops::eval_set_real; - eval_set_real(backend(), canonical_value(val)); - return *this; - } - template <class T> - inline typename enable_if_c<boost::is_convertible<T, self_type>::value && number_category<self_type>::value == number_kind_complex, self_type&>::type imag(const T& val) - { - using default_ops::eval_set_imag; - eval_set_imag(backend(), canonical_value(val)); - return *this; - } -private: - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::true_&) - { - do_assign(e, tag()); - } - template <class tag, class Arg1, class Arg2, class Arg3, class Arg4> - void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::false_&) - { - - - typedef typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type temp_type; - temp_type t(e); - this->assign(t); - } - - - template <class Exp> - void do_assign(const Exp& e, const detail::add_immediates&) - { - using default_ops::eval_add; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_add(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - template <class Exp> - void do_assign(const Exp& e, const detail::subtract_immediates&) - { - using default_ops::eval_subtract; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - template <class Exp> - void do_assign(const Exp& e, const detail::multiply_immediates&) - { - using default_ops::eval_multiply; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - template <class Exp> - void do_assign(const Exp& e, const detail::multiply_add&) - { - using default_ops::eval_multiply_add; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply_add(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value())); - } - template <class Exp> - void do_assign(const Exp& e, const detail::multiply_subtract&) - { - using default_ops::eval_multiply_subtract; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value())); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::divide_immediates&) - { - using default_ops::eval_divide; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_divide(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::negate&) - { - typedef typename Exp::left_type left_type; - do_assign(e.left(), typename left_type::tag_type()); - m_backend.negate(); - } - template <class Exp> - void do_assign(const Exp& e, const detail::plus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && br) - { - self_type temp(e); - temp.m_backend.swap(this->m_backend); - } - else if(bl && is_self(e.left())) - { - - do_add(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - - do_add(e.left(), typename left_type::tag_type()); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_add(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_add(e.left(), typename left_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::minus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && br) - { - self_type temp(e); - temp.m_backend.swap(this->m_backend); - } - else if(bl && is_self(e.left())) - { - - do_subtract(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - - do_subtract(e.left(), typename left_type::tag_type()); - m_backend.negate(); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_subtract(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_subtract(e.left(), typename left_type::tag_type()); - m_backend.negate(); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::multiplies&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && br) - { - self_type temp(e); - temp.m_backend.swap(this->m_backend); - } - else if(bl && is_self(e.left())) - { - - do_multiplies(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - - do_multiplies(e.left(), typename left_type::tag_type()); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_multiplies(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_multiplies(e.left(), typename left_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::divides&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && is_self(e.left())) - { - - do_divide(e.right(), typename right_type::tag_type()); - } - else if(br) - { - self_type temp(e); - temp.m_backend.swap(this->m_backend); - } - else - { - do_assign(e.left(), typename left_type::tag_type()); - do_divide(e.right(), typename right_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::modulus&) - { - - - - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && is_self(e.left())) - { - - do_modulus(e.right(), typename right_type::tag_type()); - } - else if(br) - { - self_type temp(e); - temp.m_backend.swap(this->m_backend); - } - else - { - do_assign(e.left(), typename left_type::tag_type()); - do_modulus(e.right(), typename right_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::modulus_immediates&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - using default_ops::eval_modulus; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_modulus(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_and&) - { - - - - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && is_self(e.left())) - { - - do_bitwise_and(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - do_bitwise_and(e.left(), typename left_type::tag_type()); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_bitwise_and(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_bitwise_and(e.left(), typename left_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_and_immediates&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - using default_ops::eval_bitwise_and; - eval_bitwise_and(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_or&) - { - - - - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && is_self(e.left())) - { - - do_bitwise_or(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - do_bitwise_or(e.left(), typename left_type::tag_type()); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_bitwise_or(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_bitwise_or(e.left(), typename left_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_or_immediates&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - using default_ops::eval_bitwise_or; - eval_bitwise_or(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_xor&) - { - - - - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - - static int const left_depth = left_type::depth; - static int const right_depth = right_type::depth; - - bool bl = contains_self(e.left()); - bool br = contains_self(e.right()); - - if(bl && is_self(e.left())) - { - - do_bitwise_xor(e.right(), typename right_type::tag_type()); - } - else if(br && is_self(e.right())) - { - do_bitwise_xor(e.left(), typename left_type::tag_type()); - } - else if(!br && (bl || (left_depth >= right_depth))) - { - do_assign(e.left(), typename left_type::tag_type()); - do_bitwise_xor(e.right(), typename right_type::tag_type()); - } - else - { - do_assign(e.right(), typename right_type::tag_type()); - do_bitwise_xor(e.left(), typename left_type::tag_type()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_xor_immediates&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types"); - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value())); - } - template <class Exp> - void do_assign(const Exp& e, const detail::terminal&) - { - if(!is_self(e)) - { - m_backend = canonical_value(e.value()); - } - } - template <class Exp> - void do_assign(const Exp& e, const detail::function&) - { - typedef typename Exp::arity tag_type; - boost::multiprecision::detail::maybe_promote_precision(this); - do_assign_function(e, tag_type()); - } - template <class Exp> - void do_assign(const Exp& e, const detail::shift_left&) - { - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - typedef typename right_type::arity right_arity; - static_assert(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand."); - typedef typename right_type::result_type right_value_type; - static_assert(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand."); - typedef typename left_type::tag_type tag_type; - do_assign_left_shift(e.left(), canonical_value(e.right().value()), tag_type()); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::shift_right&) - { - - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - typedef typename right_type::arity right_arity; - static_assert(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand."); - typedef typename right_type::result_type right_value_type; - static_assert(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand."); - typedef typename left_type::tag_type tag_type; - do_assign_right_shift(e.left(), canonical_value(e.right().value()), tag_type()); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::bitwise_complement&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types"); - using default_ops::eval_complement; - self_type temp(e.left()); - eval_complement(m_backend, temp.backend()); - } - - template <class Exp> - void do_assign(const Exp& e, const detail::complement_immediates&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types"); - using default_ops::eval_complement; - eval_complement(m_backend, canonical_value(e.left().value())); - } - - template <class Exp, class Val> - void do_assign_right_shift(const Exp& e, const Val& val, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types"); - using default_ops::eval_right_shift; - detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>()); - eval_right_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val)); - } - - template <class Exp, class Val> - void do_assign_left_shift(const Exp& e, const Val& val, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types"); - using default_ops::eval_left_shift; - detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>()); - eval_left_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val)); - } - - template <class Exp, class Val, class Tag> - void do_assign_right_shift(const Exp& e, const Val& val, const Tag&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types"); - using default_ops::eval_right_shift; - self_type temp(e); - detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>()); - eval_right_shift(m_backend, temp.backend(), static_cast<std::size_t>(val)); - } - - template <class Exp, class Val, class Tag> - void do_assign_left_shift(const Exp& e, const Val& val, const Tag&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types"); - using default_ops::eval_left_shift; - self_type temp(e); - detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>()); - eval_left_shift(m_backend, temp.backend(), static_cast<std::size_t>(val)); - } - - template <class Exp> - void do_assign_function(const Exp& e, const mpl::int_<1>&) - { - e.left().value()(&m_backend); - } - template <class Exp> - void do_assign_function(const Exp& e, const mpl::int_<2>&) - { - typedef typename Exp::right_type right_type; - typedef typename right_type::tag_type tag_type; - do_assign_function_1(e.left().value(), e.right_ref(), tag_type()); - } - template <class F, class Exp> - void do_assign_function_1(const F& f, const Exp& val, const detail::terminal&) - { - f(m_backend, function_arg_value(val)); - } - template <class F, class Exp, class Tag> - void do_assign_function_1(const F& f, const Exp& val, const Tag&) - { - typename Exp::result_type t(val); - f(m_backend, t.backend()); - } - template <class Exp> - void do_assign_function(const Exp& e, const mpl::int_<3>&) - { - typedef typename Exp::middle_type middle_type; - typedef typename middle_type::tag_type tag_type; - typedef typename Exp::right_type end_type; - typedef typename end_type::tag_type end_tag; - do_assign_function_2(e.left().value(), e.middle_ref(), e.right_ref(), tag_type(), end_tag()); - } - template <class F, class Exp1, class Exp2> - void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const detail::terminal&) - { - f(m_backend, function_arg_value(val1), function_arg_value(val2)); - } - template <class F, class Exp1, class Exp2, class Tag1> - void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const detail::terminal&) - { - typename Exp1::result_type temp1(val1); - f(m_backend, std::move(temp1.backend()), function_arg_value(val2)); - } - template <class F, class Exp1, class Exp2, class Tag2> - void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const Tag2&) - { - typename Exp2::result_type temp2(val2); - f(m_backend, function_arg_value(val1), std::move(temp2.backend())); - } - template <class F, class Exp1, class Exp2, class Tag1, class Tag2> - void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const Tag2&) - { - typename Exp1::result_type temp1(val1); - typename Exp2::result_type temp2(val2); - f(m_backend, std::move(temp1.backend()), std::move(temp2.backend())); - } - - template <class Exp> - void do_assign_function(const Exp& e, const mpl::int_<4>&) - { - typedef typename Exp::left_middle_type left_type; - typedef typename left_type::tag_type left_tag_type; - typedef typename Exp::right_middle_type middle_type; - typedef typename middle_type::tag_type middle_tag_type; - typedef typename Exp::right_type right_type; - typedef typename right_type::tag_type right_tag_type; - do_assign_function_3a(e.left().value(), e.left_middle_ref(), e.right_middle_ref(), e.right_ref(), left_tag_type(), middle_tag_type(), right_tag_type()); - } - template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3> - void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag2& t2, const Tag3& t3) - { - do_assign_function_3b(f, val1, val2, val3, t2, t3); - } - template <class F, class Exp1, class Exp2, class Exp3, class Tag1, class Tag2, class Tag3> - void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag1&, const Tag2& t2, const Tag3& t3) - { - typename Exp1::result_type t(val1); - do_assign_function_3b(f, std::move(t), val2, val3, t2, t3); - } - template <class F, class Exp1, class Exp2, class Exp3, class Tag3> - void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag3& t3) - { - do_assign_function_3c(f, val1, val2, val3, t3); - } - template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3> - void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag2& , const Tag3& t3) - { - typename Exp2::result_type t(val2); - do_assign_function_3c(f, val1, std::move(t), val3, t3); - } - template <class F, class Exp1, class Exp2, class Exp3> - void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&) - { - f(m_backend, function_arg_value(val1), function_arg_value(val2), function_arg_value(val3)); - } - template <class F, class Exp1, class Exp2, class Exp3, class Tag3> - void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag3& ) - { - typename Exp3::result_type t(val3); - do_assign_function_3c(f, val1, val2, std::move(t), detail::terminal()); - } - - template <class Exp> - void do_add(const Exp& e, const detail::terminal&) - { - using default_ops::eval_add; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_add(m_backend, canonical_value(e.value())); - } - - template <class Exp> - void do_add(const Exp& e, const detail::negate&) - { - typedef typename Exp::left_type left_type; - boost::multiprecision::detail::maybe_promote_precision(this); - do_subtract(e.left(), typename left_type::tag_type()); - } - - template <class Exp> - void do_add(const Exp& e, const detail::plus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_add(e.left(), typename left_type::tag_type()); - do_add(e.right(), typename right_type::tag_type()); - } - - template <class Exp> - void do_add(const Exp& e, const detail::minus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_add(e.left(), typename left_type::tag_type()); - do_subtract(e.right(), typename right_type::tag_type()); - } - - template <class Exp, class unknown> - void do_add(const Exp& e, const unknown&) - { - self_type temp(e); - do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - - template <class Exp> - void do_add(const Exp& e, const detail::add_immediates&) - { - using default_ops::eval_add; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_add(m_backend, canonical_value(e.left().value())); - eval_add(m_backend, canonical_value(e.right().value())); - } - template <class Exp> - void do_add(const Exp& e, const detail::subtract_immediates&) - { - using default_ops::eval_add; - using default_ops::eval_subtract; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_add(m_backend, canonical_value(e.left().value())); - eval_subtract(m_backend, canonical_value(e.right().value())); - } - template <class Exp> - void do_subtract(const Exp& e, const detail::terminal&) - { - using default_ops::eval_subtract; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_subtract(m_backend, canonical_value(e.value())); - } - - template <class Exp> - void do_subtract(const Exp& e, const detail::negate&) - { - typedef typename Exp::left_type left_type; - do_add(e.left(), typename left_type::tag_type()); - } - - template <class Exp> - void do_subtract(const Exp& e, const detail::plus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_subtract(e.left(), typename left_type::tag_type()); - do_subtract(e.right(), typename right_type::tag_type()); - } - - template <class Exp> - void do_subtract(const Exp& e, const detail::minus&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_subtract(e.left(), typename left_type::tag_type()); - do_add(e.right(), typename right_type::tag_type()); - } - template <class Exp> - void do_subtract(const Exp& e, const detail::add_immediates&) - { - using default_ops::eval_subtract; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_subtract(m_backend, canonical_value(e.left().value())); - eval_subtract(m_backend, canonical_value(e.right().value())); - } - template <class Exp> - void do_subtract(const Exp& e, const detail::subtract_immediates&) - { - using default_ops::eval_add; - using default_ops::eval_subtract; - eval_subtract(m_backend, canonical_value(e.left().value())); - eval_add(m_backend, canonical_value(e.right().value())); - } - template <class Exp, class unknown> - void do_subtract(const Exp& e, const unknown&) - { - self_type temp(e); - do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal()); - } - - template <class Exp> - void do_multiplies(const Exp& e, const detail::terminal&) - { - using default_ops::eval_multiply; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply(m_backend, canonical_value(e.value())); - } - - template <class Exp> - void do_multiplies(const Exp& e, const detail::negate&) - { - typedef typename Exp::left_type left_type; - do_multiplies(e.left(), typename left_type::tag_type()); - m_backend.negate(); - } - - template <class Exp> - void do_multiplies(const Exp& e, const detail::multiplies&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_multiplies(e.left(), typename left_type::tag_type()); - do_multiplies(e.right(), typename right_type::tag_type()); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_multiplies(const Exp& e, const detail::divides&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_multiplies(e.left(), typename left_type::tag_type()); - do_divide(e.right(), typename right_type::tag_type()); - } - - template <class Exp> - void do_multiplies(const Exp& e, const detail::multiply_immediates&) - { - using default_ops::eval_multiply; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply(m_backend, canonical_value(e.left().value())); - eval_multiply(m_backend, canonical_value(e.right().value())); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_multiplies(const Exp& e, const detail::divide_immediates&) - { - using default_ops::eval_multiply; - using default_ops::eval_divide; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_multiply(m_backend, canonical_value(e.left().value())); - eval_divide(m_backend, canonical_value(e.right().value())); - } - template <class Exp, class unknown> - void do_multiplies(const Exp& e, const unknown&) - { - using default_ops::eval_multiply; - boost::multiprecision::detail::maybe_promote_precision(this); - self_type temp(e); - eval_multiply(m_backend, temp.m_backend); - } - - template <class Exp> - void do_divide(const Exp& e, const detail::terminal&) - { - using default_ops::eval_divide; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_divide(m_backend, canonical_value(e.value())); - } - - template <class Exp> - void do_divide(const Exp& e, const detail::negate&) - { - typedef typename Exp::left_type left_type; - do_divide(e.left(), typename left_type::tag_type()); - m_backend.negate(); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_divide(const Exp& e, const detail::multiplies&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_divide(e.left(), typename left_type::tag_type()); - do_divide(e.right(), typename right_type::tag_type()); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_divide(const Exp& e, const detail::divides&) - { - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_divide(e.left(), typename left_type::tag_type()); - do_multiplies(e.right(), typename right_type::tag_type()); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_divides(const Exp& e, const detail::multiply_immediates&) - { - using default_ops::eval_divide; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_divide(m_backend, canonical_value(e.left().value())); - eval_divide(m_backend, canonical_value(e.right().value())); - } - - - - - template <class Exp> - typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type - do_divides(const Exp& e, const detail::divide_immediates&) - { - using default_ops::eval_multiply; - using default_ops::eval_divide; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_divide(m_backend, canonical_value(e.left().value())); - mutiply(m_backend, canonical_value(e.right().value())); - } - - template <class Exp, class unknown> - void do_divide(const Exp& e, const unknown&) - { - using default_ops::eval_multiply; - boost::multiprecision::detail::maybe_promote_precision(this); - self_type temp(e); - eval_divide(m_backend, temp.m_backend); - } - - template <class Exp> - void do_modulus(const Exp& e, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - using default_ops::eval_modulus; - boost::multiprecision::detail::maybe_promote_precision(this); - eval_modulus(m_backend, canonical_value(e.value())); - } - - template <class Exp, class Unknown> - void do_modulus(const Exp& e, const Unknown&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types"); - using default_ops::eval_modulus; - boost::multiprecision::detail::maybe_promote_precision(this); - self_type temp(e); - eval_modulus(m_backend, canonical_value(temp)); - } - - template <class Exp> - void do_bitwise_and(const Exp& e, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - using default_ops::eval_bitwise_and; - eval_bitwise_and(m_backend, canonical_value(e.value())); - } - template <class Exp> - void do_bitwise_and(const Exp& e, const detail::bitwise_and&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_bitwise_and(e.left(), typename left_type::tag_type()); - do_bitwise_and(e.right(), typename right_type::tag_type()); - } - template <class Exp, class unknown> - void do_bitwise_and(const Exp& e, const unknown&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types"); - using default_ops::eval_bitwise_and; - self_type temp(e); - eval_bitwise_and(m_backend, temp.m_backend); - } - - template <class Exp> - void do_bitwise_or(const Exp& e, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - using default_ops::eval_bitwise_or; - eval_bitwise_or(m_backend, canonical_value(e.value())); - } - template <class Exp> - void do_bitwise_or(const Exp& e, const detail::bitwise_or&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_bitwise_or(e.left(), typename left_type::tag_type()); - do_bitwise_or(e.right(), typename right_type::tag_type()); - } - template <class Exp, class unknown> - void do_bitwise_or(const Exp& e, const unknown&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types"); - using default_ops::eval_bitwise_or; - self_type temp(e); - eval_bitwise_or(m_backend, temp.m_backend); - } - - template <class Exp> - void do_bitwise_xor(const Exp& e, const detail::terminal&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - using default_ops::eval_bitwise_xor; - eval_bitwise_xor(m_backend, canonical_value(e.value())); - } - template <class Exp> - void do_bitwise_xor(const Exp& e, const detail::bitwise_xor&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - typedef typename Exp::left_type left_type; - typedef typename Exp::right_type right_type; - do_bitwise_xor(e.left(), typename left_type::tag_type()); - do_bitwise_xor(e.right(), typename right_type::tag_type()); - } - template <class Exp, class unknown> - void do_bitwise_xor(const Exp& e, const unknown&) - { - static_assert(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types"); - using default_ops::eval_bitwise_xor; - self_type temp(e); - eval_bitwise_xor(m_backend, temp.m_backend); - } - - - template <class Exp> - inline bool contains_self(const Exp& e)const noexcept - { - return contains_self(e, typename Exp::arity()); - } - template <class Exp> - inline bool contains_self(const Exp& e, mpl::int_<0> const&)const noexcept - { - return is_realy_self(e.value()); - } - template <class Exp> - inline bool contains_self(const Exp& e, mpl::int_<1> const&)const noexcept - { - typedef typename Exp::left_type child_type; - return contains_self(e.left(), typename child_type::arity()); - } - template <class Exp> - inline bool contains_self(const Exp& e, mpl::int_<2> const&)const noexcept - { - typedef typename Exp::left_type child0_type; - typedef typename Exp::right_type child1_type; - return contains_self(e.left(), typename child0_type::arity()) - || contains_self(e.right(), typename child1_type::arity()); - } - template <class Exp> - inline bool contains_self(const Exp& e, mpl::int_<3> const&)const noexcept - { - typedef typename Exp::left_type child0_type; - typedef typename Exp::middle_type child1_type; - typedef typename Exp::right_type child2_type; - return contains_self(e.left(), typename child0_type::arity()) - || contains_self(e.middle(), typename child1_type::arity()) - || contains_self(e.right(), typename child2_type::arity()); - } - - - template <class Exp> - inline constexpr bool is_self(const Exp& e)const noexcept - { - return is_self(e, typename Exp::arity()); - } - template <class Exp> - inline constexpr bool is_self(const Exp& e, mpl::int_<0> const&)const noexcept - { - return is_realy_self(e.value()); - } - template <class Exp, int v> - inline constexpr bool is_self(const Exp&, mpl::int_<v> const&)const noexcept - { - return false; - } - - template <class Val> - inline constexpr bool is_realy_self(const Val&)const noexcept{ return false; } - inline constexpr bool is_realy_self(const self_type& v)const noexcept{ return &v == this; } - - static inline constexpr const Backend& function_arg_value(const self_type& v) noexcept { return v.backend(); } - template <class Other, expression_template_option ET2> - static inline constexpr const Other& function_arg_value(const number<Other, ET2>& v) noexcept { return v.backend(); } - template <class V> - static inline constexpr const V& function_arg_value(const V& v) noexcept { return v; } - template <class A1, class A2, class A3, class A4> - static inline const A1& function_arg_value(const detail::expression<detail::terminal, A1, A2, A3, A4>& exp) noexcept { return exp.value(); } - template <class A2, class A3, class A4> - static inline constexpr const Backend& function_arg_value(const detail::expression<detail::terminal, number<Backend>, A2, A3, A4>& exp) noexcept { return exp.value().backend(); } - Backend m_backend; - -public: - - - - - static inline constexpr const Backend& canonical_value(const self_type& v) noexcept { return v.m_backend; } - template <class B2, expression_template_option ET> - static inline constexpr const B2& canonical_value(const number<B2, ET>& v) noexcept { return v.backend(); } - template <class V> - static inline constexpr typename boost::disable_if<is_same<typename detail::canonical<V, Backend>::type, V>, typename detail::canonical<V, Backend>::type>::type - canonical_value(const V& v) noexcept { return static_cast<typename detail::canonical<V, Backend>::type>(v); } - template <class V> - static inline constexpr typename boost::enable_if<is_same<typename detail::canonical<V, Backend>::type, V>, const V&>::type - canonical_value(const V& v) noexcept { return v; } - static inline typename detail::canonical<std::string, Backend>::type canonical_value(const std::string& v) noexcept { return v.c_str(); } - -}; - -template <class Backend, expression_template_option ExpressionTemplates> -inline std::ostream& operator << (std::ostream& os, const number<Backend, ExpressionTemplates>& r) -{ - std::streamsize d = os.precision(); - std::string s = r.str(d, os.flags()); - std::streamsize ss = os.width(); - if(ss > static_cast<std::streamsize>(s.size())) - { - char fill = os.fill(); - if((os.flags() & std::ios_base::left) == std::ios_base::left) - s.append(static_cast<std::string::size_type>(ss - s.size()), fill); - else - s.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(ss - s.size()), fill); - } - return os << s; -} - -namespace detail{ - -template <class tag, class A1, class A2, class A3, class A4> -inline std::ostream& operator << (std::ostream& os, const expression<tag, A1, A2, A3, A4>& r) -{ - typedef typename expression<tag, A1, A2, A3, A4>::result_type value_type; - value_type temp(r); - return os << temp; -} -# 2054 "/usr/include/boost/multiprecision/number.hpp" 3 4 -inline std::string read_string_while(std::istream& is, std::string const& permitted_chars) -{ - std::ios_base::iostate state = std::ios_base::goodbit; - const std::istream::sentry sentry_check(is); - std::string result; - - if(sentry_check) - { - int c = is.rdbuf()->sgetc(); - - for(;; c = is.rdbuf()->snextc()) - if(std::istream::traits_type::eq_int_type(std::istream::traits_type::eof(), c)) - { - state |= std::ios_base::eofbit; - break; - } - else if(permitted_chars.find_first_of(std::istream::traits_type::to_char_type(c)) == std::string::npos) - { - - - break; - } - else - { - result.append(1, std::istream::traits_type::to_char_type(c)); - } - } - - if(!result.size()) - state |= std::ios_base::failbit; - is.setstate(state); - return result; -} - -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline std::istream& operator >> (std::istream& is, number<Backend, ExpressionTemplates>& r) -{ - bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex; - bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct; - std::string s; - switch(boost::multiprecision::number_category<number<Backend, ExpressionTemplates> >::value) - { - case boost::multiprecision::number_kind_integer: - if(oct_format) - s = detail::read_string_while(is, "+-01234567"); - else if(hex_format) - s = detail::read_string_while(is, "+-xXabcdefABCDEF0123456789"); - else - s = detail::read_string_while(is, "+-0123456789"); - break; - case boost::multiprecision::number_kind_floating_point: - s = detail::read_string_while(is, "+-eE.0123456789infINFnanNANinfinityINFINITY"); - break; - default: - is >> s; - } - if(s.size()) - { - if(hex_format && (number_category<Backend>::value == number_kind_integer) && ((s[0] != '0') || (s[1] != 'x'))) - s.insert(s.find_first_not_of("+-"), "0x"); - if(oct_format && (number_category<Backend>::value == number_kind_integer) && (s[0] != '0')) - s.insert(s.find_first_not_of("+-"), "0"); - r.assign(s); - } - else if(!is.fail()) - is.setstate(std::istream::failbit); - return is; -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline void swap(number<Backend, ExpressionTemplates>& a, number<Backend, ExpressionTemplates>& b) - noexcept((noexcept(std::declval<number<Backend, ExpressionTemplates>&>() = std::declval<number<Backend, ExpressionTemplates>&>()))) -{ - a.swap(b); -} - - - -template <class Backend, expression_template_option ExpressionTemplates> -inline std::size_t hash_value(const number<Backend, ExpressionTemplates>& val) -{ - return hash_value(val.backend()); -} - -} - -template <class T> -class rational; - -template <class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline std::istream& operator >> (std::istream& is, rational<multiprecision::number<Backend, ExpressionTemplates> >& r) -{ - std::string s1; - multiprecision::number<Backend, ExpressionTemplates> v1, v2; - char c; - bool have_hex = false; - bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex; - bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct; - - while(((-1) != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F')))) - { - if(c == 'x' || c == 'X') - have_hex = true; - s1.append(1, c); - is.get(); - } - if(hex_format && ((s1[0] != '0') || (s1[1] != 'x'))) - s1.insert(static_cast<std::string::size_type>(0), "0x"); - if(oct_format && (s1[0] != '0')) - s1.insert(static_cast<std::string::size_type>(0), "0"); - v1.assign(s1); - s1.erase(); - if(c == '/') - { - is.get(); - while(((-1) != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F')))) - { - if(c == 'x' || c == 'X') - have_hex = true; - s1.append(1, c); - is.get(); - } - if(hex_format && ((s1[0] != '0') || (s1[1] != 'x'))) - s1.insert(static_cast<std::string::size_type>(0), "0x"); - if(oct_format && (s1[0] != '0')) - s1.insert(static_cast<std::string::size_type>(0), "0"); - v2.assign(s1); - } - else - v2 = 1; - r.assign(v1, v2); - return is; -} - -template <class T, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<T, ExpressionTemplates> numerator(const rational<multiprecision::number<T, ExpressionTemplates> >& a) -{ - return a.numerator(); -} - -template <class T, multiprecision::expression_template_option ExpressionTemplates> -inline multiprecision::number<T, ExpressionTemplates> denominator(const rational<multiprecision::number<T, ExpressionTemplates> >& a) -{ - return a.denominator(); -} - -template <class T, multiprecision::expression_template_option ExpressionTemplates> -inline std::size_t hash_value(const rational<multiprecision::number<T, ExpressionTemplates> >& val) -{ - std::size_t result = hash_value(val.numerator()); - boost::hash_combine(result, hash_value(val.denominator())); - return result; -} - -namespace multiprecision -{ - -template <class I> -struct component_type<boost::rational<I> > -{ - typedef I type; -}; - -} - - - - - -} - - - - - -namespace std { - - template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates> - struct hash<boost::multiprecision::number<Backend, ExpressionTemplates> > - { - std::size_t operator()(const boost::multiprecision::number<Backend, ExpressionTemplates>& val)const { return hash_value(val); } - }; - template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates> - struct hash<boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> > > - { - std::size_t operator()(const boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> >& val)const - { - std::size_t result = hash_value(val.numerator()); - boost::hash_combine(result, hash_value(val.denominator())); - return result; - } - }; - -} - - - -# 1 "/usr/include/boost/multiprecision/detail/ublas_interop.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/detail/ublas_interop.hpp" 3 4 -namespace boost { namespace numeric { namespace ublas { - -template<class V> -class sparse_vector_element; - -template <class V, class Backend, multiprecision::expression_template_option ExpressionTemplates> -inline bool operator == (const sparse_vector_element<V>& a, const ::boost::multiprecision::number<Backend, ExpressionTemplates>& b) -{ - typedef typename sparse_vector_element<V>::const_reference ref_type; - return static_cast<ref_type>(a) == b; -} - -template<class X, class Y> -struct promote_traits; - -template <class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1, class Backend2, boost::multiprecision::expression_template_option ExpressionTemplates2> -struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplates1>, boost::multiprecision::number<Backend2, ExpressionTemplates2> > -{ - typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> number1_t; - typedef boost::multiprecision::number<Backend2, ExpressionTemplates2> number2_t; - typedef typename mpl::if_c< - is_convertible<number1_t, number2_t>::value && !is_convertible<number2_t, number1_t>::value, - number2_t, number1_t - >::type promote_type; -}; - -template <class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1, class Arithmetic> -struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplates1>, Arithmetic> -{ - typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> promote_type; -}; - -template <class Arithmetic, class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1> -struct promote_traits<Arithmetic, boost::multiprecision::number<Backend1, ExpressionTemplates1> > -{ - typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> promote_type; -}; - -template <class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1, class tag, class Arg1, class Arg2, class Arg3, class Arg4> -struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplates1>, boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > -{ - typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> number1_t; - typedef boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> expression_type; - typedef typename expression_type::result_type number2_t; - typedef typename promote_traits<number1_t, number2_t>::promote_type promote_type; -}; - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1> -struct promote_traits<boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, boost::multiprecision::number<Backend1, ExpressionTemplates1> > -{ - typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> number1_t; - typedef boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> expression_type; - typedef typename expression_type::result_type number2_t; - typedef typename promote_traits<number1_t, number2_t>::promote_type promote_type; -}; - -template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tagb, class Arg1b, class Arg2b, class Arg3b, class Arg4b> -struct promote_traits<boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, boost::multiprecision::detail::expression<tagb, Arg1b, Arg2b, Arg3b, Arg4b> > -{ - typedef boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> expression1_t; - typedef typename expression1_t::result_type number1_t; - typedef boost::multiprecision::detail::expression<tagb, Arg1b, Arg2b, Arg3b, Arg4b> expression2_t; - typedef typename expression2_t::result_type number2_t; -}; - -}}} -# 2254 "/usr/include/boost/multiprecision/number.hpp" 2 3 4 -# 13 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/integer_ops.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/detail/integer_ops.hpp" 3 4 -namespace boost{ namespace multiprecision{ - -namespace default_ops -{ - -template <class Backend> -inline void eval_qr(const Backend& x, const Backend& y, Backend& q, Backend& r) -{ - eval_divide(q, x, y); - eval_modulus(r, x, y); -} - -template <class Backend, class Integer> -inline Integer eval_integer_modulus(const Backend& x, Integer val) -{ - using boost::multiprecision::detail::abs; - using default_ops::eval_modulus; - using default_ops::eval_convert_to; - typedef typename boost::multiprecision::detail::canonical<Integer, Backend>::type int_type; - Backend t; - eval_modulus(t, x, static_cast<int_type>(val)); - Integer result; - eval_convert_to(&result, t); - return abs(result); -} - - - - - - -template <class B> -inline void eval_gcd(B& result, const B& a, const B& b) -{ - using default_ops::eval_lsb; - using default_ops::eval_is_zero; - using default_ops::eval_get_sign; - - int shift; - - B u(a), v(b); - - int s = eval_get_sign(u); - - - if(s < 0) - { - u.negate(); - } - else if(s == 0) - { - result = v; - return; - } - s = eval_get_sign(v); - if(s < 0) - { - v.negate(); - } - else if(s == 0) - { - result = u; - return; - } - - - - - unsigned us = eval_lsb(u); - unsigned vs = eval_lsb(v); - shift = (std::min)(us, vs); - eval_right_shift(u, us); - eval_right_shift(v, vs); - - do - { - - - s = u.compare(v); - if(s > 0) - u.swap(v); - if(s == 0) - break; - eval_subtract(v, u); - vs = eval_lsb(v); - eval_right_shift(v, vs); - } - while(true); - - result = u; - eval_left_shift(result, shift); -} - - - - - -template <class B> -inline void eval_lcm(B& result, const B& a, const B& b) -{ - typedef typename mpl::front<typename B::unsigned_types>::type ui_type; - B t; - eval_gcd(t, a, b); - - if(eval_is_zero(t)) - { - result = static_cast<ui_type>(0); - } - else - { - eval_divide(result, a, t); - eval_multiply(result, b); - } - if(eval_get_sign(result) < 0) - result.negate(); -} - -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type - divide_qr(const number<Backend, ExpressionTemplates>& x, const number<Backend, ExpressionTemplates>& y, - number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r) -{ - using default_ops::eval_qr; - eval_qr(x.backend(), y.backend(), q.backend(), r.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type - divide_qr(const number<Backend, ExpressionTemplates>& x, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& y, - number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r) -{ - divide_qr(x, number<Backend, ExpressionTemplates>(y), q, r); -} - -template <class tag, class A1, class A2, class A3, class A4, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type - divide_qr(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, const number<Backend, ExpressionTemplates>& y, - number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r) -{ - divide_qr(number<Backend, ExpressionTemplates>(x), y, q, r); -} - -template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b, class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type - divide_qr(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& y, - number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r) -{ - divide_qr(number<Backend, ExpressionTemplates>(x), number<Backend, ExpressionTemplates>(y), q, r); -} - -template <class Backend, expression_template_option ExpressionTemplates, class Integer> -inline typename enable_if<mpl::and_<is_integral<Integer>, mpl::bool_<number_category<Backend>::value == number_kind_integer> >, Integer>::type - integer_modulus(const number<Backend, ExpressionTemplates>& x, Integer val) -{ - using default_ops::eval_integer_modulus; - return eval_integer_modulus(x.backend(), val); -} - -template <class tag, class A1, class A2, class A3, class A4, class Integer> -inline typename enable_if<mpl::and_<is_integral<Integer>, mpl::bool_<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer> >, Integer>::type - integer_modulus(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, Integer val) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type result_type; - return integer_modulus(result_type(x), val); -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, unsigned>::type - lsb(const number<Backend, ExpressionTemplates>& x) -{ - using default_ops::eval_lsb; - return eval_lsb(x.backend()); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, unsigned>::type - lsb(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type n(x); - using default_ops::eval_lsb; - return eval_lsb(n.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, unsigned>::type - msb(const number<Backend, ExpressionTemplates>& x) -{ - using default_ops::eval_msb; - return eval_msb(x.backend()); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, unsigned>::type - msb(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type n(x); - using default_ops::eval_msb; - return eval_msb(n.backend()); -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, bool>::type - bit_test(const number<Backend, ExpressionTemplates>& x, unsigned index) -{ - using default_ops::eval_bit_test; - return eval_bit_test(x.backend(), index); -} - -template <class tag, class A1, class A2, class A3, class A4> -inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, bool>::type - bit_test(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, unsigned index) -{ - typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type; - number_type n(x); - using default_ops::eval_bit_test; - return eval_bit_test(n.backend(), index); -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type - bit_set(number<Backend, ExpressionTemplates>& x, unsigned index) -{ - using default_ops::eval_bit_set; - eval_bit_set(x.backend(), index); - return x; -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type - bit_unset(number<Backend, ExpressionTemplates>& x, unsigned index) -{ - using default_ops::eval_bit_unset; - eval_bit_unset(x.backend(), index); - return x; -} - -template <class Backend, expression_template_option ExpressionTemplates> -inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type - bit_flip(number<Backend, ExpressionTemplates>& x, unsigned index) -{ - using default_ops::eval_bit_flip; - eval_bit_flip(x.backend(), index); - return x; -} - -namespace default_ops{ - - - - - -template <class Backend> -struct double_precision_type -{ - typedef Backend type; -}; - - - - - -template <class Backend> -inline void check_sign_of_backend(const Backend& v, const mpl::true_) -{ - if(eval_get_sign(v) < 0) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("powm requires a positive exponent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/integer_ops.hpp",281); - } -} -template <class Backend> -inline void check_sign_of_backend(const Backend&, const mpl::false_){} - - - -template <class Backend> -void eval_powm(Backend& result, const Backend& a, const Backend& p, const Backend& c) -{ - using default_ops::eval_bit_test; - using default_ops::eval_get_sign; - using default_ops::eval_multiply; - using default_ops::eval_modulus; - using default_ops::eval_right_shift; - - typedef typename double_precision_type<Backend>::type double_type; - typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type; - - check_sign_of_backend(p, mpl::bool_<std::numeric_limits<number<Backend> >::is_signed>()); - - double_type x, y(a), b(p), t; - x = ui_type(1u); - - while(eval_get_sign(b) > 0) - { - if(eval_bit_test(b, 0)) - { - eval_multiply(t, x, y); - eval_modulus(x, t, c); - } - eval_multiply(t, y, y); - eval_modulus(y, t, c); - eval_right_shift(b, ui_type(1)); - } - Backend x2(x); - eval_modulus(result, x2, c); -} - -template <class Backend, class Integer> -void eval_powm(Backend& result, const Backend& a, const Backend& p, Integer c) -{ - typedef typename double_precision_type<Backend>::type double_type; - typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type; - typedef typename boost::multiprecision::detail::canonical<Integer, double_type>::type i1_type; - typedef typename boost::multiprecision::detail::canonical<Integer, Backend>::type i2_type; - - using default_ops::eval_bit_test; - using default_ops::eval_get_sign; - using default_ops::eval_multiply; - using default_ops::eval_modulus; - using default_ops::eval_right_shift; - - check_sign_of_backend(p, mpl::bool_<std::numeric_limits<number<Backend> >::is_signed>()); - - if(eval_get_sign(p) < 0) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("powm requires a positive exponent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/integer_ops.hpp",339); - } - - double_type x, y(a), b(p), t; - x = ui_type(1u); - - while(eval_get_sign(b) > 0) - { - if(eval_bit_test(b, 0)) - { - eval_multiply(t, x, y); - eval_modulus(x, t, static_cast<i1_type>(c)); - } - eval_multiply(t, y, y); - eval_modulus(y, t, static_cast<i1_type>(c)); - eval_right_shift(b, ui_type(1)); - } - Backend x2(x); - eval_modulus(result, x2, static_cast<i2_type>(c)); -} - -template <class Backend, class Integer> -typename enable_if<is_unsigned<Integer> >::type eval_powm(Backend& result, const Backend& a, Integer b, const Backend& c) -{ - typedef typename double_precision_type<Backend>::type double_type; - typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type; - - using default_ops::eval_bit_test; - using default_ops::eval_get_sign; - using default_ops::eval_multiply; - using default_ops::eval_modulus; - using default_ops::eval_right_shift; - - double_type x, y(a), t; - x = ui_type(1u); - - while(b > 0) - { - if(b & 1) - { - eval_multiply(t, x, y); - eval_modulus(x, t, c); - } - eval_multiply(t, y, y); - eval_modulus(y, t, c); - b >>= 1; - } - Backend x2(x); - eval_modulus(result, x2, c); -} - -template <class Backend, class Integer> -typename enable_if<is_signed<Integer> >::type eval_powm(Backend& result, const Backend& a, Integer b, const Backend& c) -{ - if(b < 0) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("powm requires a positive exponent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/integer_ops.hpp",395); - } - eval_powm(result, a, static_cast<typename make_unsigned<Integer>::type>(b), c); -} - -template <class Backend, class Integer1, class Integer2> -typename enable_if<is_unsigned<Integer1> >::type eval_powm(Backend& result, const Backend& a, Integer1 b, Integer2 c) -{ - typedef typename double_precision_type<Backend>::type double_type; - typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type; - typedef typename boost::multiprecision::detail::canonical<Integer1, double_type>::type i1_type; - typedef typename boost::multiprecision::detail::canonical<Integer2, Backend>::type i2_type; - - using default_ops::eval_bit_test; - using default_ops::eval_get_sign; - using default_ops::eval_multiply; - using default_ops::eval_modulus; - using default_ops::eval_right_shift; - - double_type x, y(a), t; - x = ui_type(1u); - - while(b > 0) - { - if(b & 1) - { - eval_multiply(t, x, y); - eval_modulus(x, t, static_cast<i1_type>(c)); - } - eval_multiply(t, y, y); - eval_modulus(y, t, static_cast<i1_type>(c)); - b >>= 1; - } - Backend x2(x); - eval_modulus(result, x2, static_cast<i2_type>(c)); -} - -template <class Backend, class Integer1, class Integer2> -typename enable_if<is_signed<Integer1> >::type eval_powm(Backend& result, const Backend& a, Integer1 b, Integer2 c) -{ - if(b < 0) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("powm requires a positive exponent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/detail/integer_ops.hpp",437); - } - eval_powm(result, a, static_cast<typename make_unsigned<Integer1>::type>(b), c); -} - -struct powm_func -{ - template <class T, class U, class V> - void operator()(T& result, const T& b, const U& p, const V& m)const - { - eval_powm(result, b, p, m); - } -}; - -} - -template <class T, class U, class V> -inline typename enable_if< - mpl::and_< - mpl::bool_<number_category<T>::value == number_kind_integer>, - mpl::or_< - is_number<T>, - is_number_expression<T> - >, - mpl::or_< - is_number<U>, - is_number_expression<U>, - is_integral<U> - >, - mpl::or_< - is_number<V>, - is_number_expression<V>, - is_integral<V> - > - >, - typename mpl::if_< - is_no_et_number<T>, - T, - typename mpl::if_< - is_no_et_number<U>, - U, - typename mpl::if_< - is_no_et_number<V>, - V, - detail::expression<detail::function, default_ops::powm_func, T, U, V> >::type - >::type - >::type - >::type - powm(const T& b, const U& p, const V& mod) -{ - return detail::expression<detail::function, default_ops::powm_func, T, U, V>( - default_ops::powm_func(), b, p, mod); -} - -}} -# 14 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/detail/rebind.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/detail/rebind.hpp" 3 4 - namespace boost { namespace multiprecision { namespace backends { namespace detail - { - template <class value_type, class my_allocator> - struct rebind - { - - typedef typename std::allocator_traits<my_allocator>::template rebind_alloc<value_type> type; - - - - }; - } } } } -# 15 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/core/empty_value.hpp" 1 3 4 -# 28 "/usr/include/boost/core/empty_value.hpp" 3 4 -namespace boost { - -template<class T> -struct use_empty_value_base { - enum { - - value = __is_empty(T) && !__is_final(T) - - - - }; -}; - -struct empty_init_t { }; - -namespace empty_ { - -template<class T, unsigned N = 0, - bool E = boost::use_empty_value_base<T>::value> -class empty_value { -public: - typedef T type; - - - empty_value() = default; - - - - - empty_value(boost::empty_init_t) - : value_() { } - - - - template<class... Args> - explicit empty_value(boost::empty_init_t, Args&&... args) - : value_(std::forward<Args>(args)...) { } -# 80 "/usr/include/boost/core/empty_value.hpp" 3 4 - const T& get() const noexcept { - return value_; - } - - T& get() noexcept { - return value_; - } - -private: - T value_; -}; - - -template<class T, unsigned N> -class empty_value<T, N, true> - : T { -public: - typedef T type; - - - empty_value() = default; - - - - - empty_value(boost::empty_init_t) - : T() { } - - - - template<class... Args> - explicit empty_value(boost::empty_init_t, Args&&... args) - : T(std::forward<Args>(args)...) { } -# 128 "/usr/include/boost/core/empty_value.hpp" 3 4 - const T& get() const noexcept { - return *this; - } - - T& get() noexcept { - return *this; - } -}; - - -} - -using empty_::empty_value; - -} -# 16 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 - - - -# 1 "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 15 "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.hpp" 2 3 4 - -namespace boost{ namespace multiprecision{ - -namespace detail{ -# 28 "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.hpp" 3 4 -template <unsigned N> -struct largest_signed_type -{ - typedef typename mpl::if_c< - 1 + std::numeric_limits<boost::long_long_type>::digits == N, - boost::long_long_type, - typename mpl::if_c< - 1 + std::numeric_limits<long>::digits == N, - long, - typename mpl::if_c< - 1 + std::numeric_limits<int>::digits == N, - int, - typename boost::int_t<N>::exact - >::type - >::type - >::type type; -}; - -template <unsigned N> -struct largest_unsigned_type -{ - typedef typename mpl::if_c< - std::numeric_limits<boost::ulong_long_type>::digits == N, - boost::ulong_long_type, - typename mpl::if_c< - std::numeric_limits<unsigned long>::digits == N, - unsigned long, - typename mpl::if_c< - std::numeric_limits<unsigned int>::digits == N, - unsigned int, - typename boost::uint_t<N>::exact - >::type - >::type - >::type type; -}; - -} - - - -typedef detail::largest_unsigned_type<64>::type limb_type; -typedef detail::largest_signed_type<64>::type signed_limb_type; -typedef boost::uint128_type double_limb_type; -typedef boost::int128_type signed_double_limb_type; -static const limb_type max_block_10 = 1000000000000000000uLL; -static const limb_type digits_per_block_10 = 18; - -inline limb_type block_multiplier(unsigned count) -{ - static const limb_type values[digits_per_block_10] - = { 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000 }; - (static_cast <bool> (count < digits_per_block_10) ? void (0) : __assert_fail ("count < digits_per_block_10", "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.hpp", 79, __extension__ __PRETTY_FUNCTION__)); - return values[count]; -} - - - - - -} - -template<> -class integer_traits<multiprecision::double_limb_type> - : public std::numeric_limits<multiprecision::double_limb_type>, - public detail::integer_traits_base<multiprecision::double_limb_type, 0, ~static_cast<multiprecision::double_limb_type>(0)> -{ }; -template<> -class integer_traits<multiprecision::signed_double_limb_type> - : public std::numeric_limits<multiprecision::signed_double_limb_type>, - public detail::integer_traits_base<multiprecision::signed_double_limb_type, static_cast<multiprecision::signed_double_limb_type>((static_cast<multiprecision::double_limb_type>(1) << 127)), static_cast<multiprecision::signed_double_limb_type>(((~static_cast<multiprecision::double_limb_type>(0)) >> 1))> -{ }; - -namespace multiprecision{ -# 121 "/usr/include/boost/multiprecision/cpp_int/cpp_int_config.hpp" 3 4 -static const unsigned bits_per_limb = sizeof(limb_type) * 8; - -template <class T> -inline void minmax(const T& a, const T& b, T& aa, T& bb) -{ - if(a < b) - { - aa = a; - bb = b; - } - else - { - aa = b; - bb = a; - } -} - -enum cpp_integer_type -{ - signed_magnitude = 1, - unsigned_magnitude = 0, - signed_packed = 3, - unsigned_packed = 2 -}; - -enum cpp_int_check_type -{ - checked = 1, - unchecked = 0 -}; - -}} -# 20 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 1 3 4 -# 12 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 13 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 2 3 4 -# 1 "/usr/include/boost/functional/hash_fwd.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 2 3 4 - - - - - -# 1 "/usr/include/boost/rational.hpp" 1 3 4 -# 77 "/usr/include/boost/rational.hpp" 3 4 -# 1 "/usr/include/boost/operators.hpp" 1 3 4 -# 116 "/usr/include/boost/operators.hpp" 3 4 -namespace boost -{ -namespace operators_impl -{ -namespace operators_detail -{ - -template <typename T> class empty_base {}; - -} - - - - - - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct less_than_comparable2 : B -{ - friend bool operator<=(const T& x, const U& y) { return !static_cast<bool>(x > y); } - friend bool operator>=(const T& x, const U& y) { return !static_cast<bool>(x < y); } - friend bool operator>(const U& x, const T& y) { return y < x; } - friend bool operator<(const U& x, const T& y) { return y > x; } - friend bool operator<=(const U& x, const T& y) { return !static_cast<bool>(y < x); } - friend bool operator>=(const U& x, const T& y) { return !static_cast<bool>(y > x); } -}; - -template <class T, class B = operators_detail::empty_base<T> > -struct less_than_comparable1 : B -{ - friend bool operator>(const T& x, const T& y) { return y < x; } - friend bool operator<=(const T& x, const T& y) { return !static_cast<bool>(y < x); } - friend bool operator>=(const T& x, const T& y) { return !static_cast<bool>(x < y); } -}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct equality_comparable2 : B -{ - friend bool operator==(const U& y, const T& x) { return x == y; } - friend bool operator!=(const U& y, const T& x) { return !static_cast<bool>(x == y); } - friend bool operator!=(const T& y, const U& x) { return !static_cast<bool>(y == x); } -}; - -template <class T, class B = operators_detail::empty_base<T> > -struct equality_comparable1 : B -{ - friend bool operator!=(const T& x, const T& y) { return !static_cast<bool>(x == y); } -}; -# 259 "/usr/include/boost/operators.hpp" 3 4 -template <class T, class U, class B = operators_detail::empty_base<T> > struct multipliable2 : B { friend T operator *( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } friend T operator *( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv *= lhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct multipliable1 : B { friend T operator *( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct addable2 : B { friend T operator +( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } friend T operator +( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv += lhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct addable1 : B { friend T operator +( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct subtractable2 : B { friend T operator -( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template <class T, class U, class B = operators_detail::empty_base<T> > struct subtractable2_left : B { friend T operator -( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct subtractable1 : B { friend T operator -( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct dividable2 : B { friend T operator /( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template <class T, class U, class B = operators_detail::empty_base<T> > struct dividable2_left : B { friend T operator /( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct dividable1 : B { friend T operator /( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct modable2 : B { friend T operator %( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template <class T, class U, class B = operators_detail::empty_base<T> > struct modable2_left : B { friend T operator %( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct modable1 : B { friend T operator %( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct xorable2 : B { friend T operator ^( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } friend T operator ^( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv ^= lhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct xorable1 : B { friend T operator ^( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct andable2 : B { friend T operator &( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } friend T operator &( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv &= lhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct andable1 : B { friend T operator &( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct orable2 : B { friend T operator |( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } friend T operator |( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv |= lhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct orable1 : B { friend T operator |( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } }; - - - - - - - -template <class T, class B = operators_detail::empty_base<T> > -struct incrementable : B -{ - friend T operator++(T& x, int) - { - incrementable_type nrv(x); - ++x; - return nrv; - } -private: - typedef T incrementable_type; -}; - -template <class T, class B = operators_detail::empty_base<T> > -struct decrementable : B -{ - friend T operator--(T& x, int) - { - decrementable_type nrv(x); - --x; - return nrv; - } -private: - typedef T decrementable_type; -}; - - - -template <class T, class P, class B = operators_detail::empty_base<T> > -struct dereferenceable : B -{ - P operator->() const - { - return ::boost::addressof(*static_cast<const T&>(*this)); - } -}; - -template <class T, class I, class R, class B = operators_detail::empty_base<T> > -struct indexable : B -{ - R operator[](I n) const - { - return *(static_cast<const T&>(*this) + n); - } -}; -# 357 "/usr/include/boost/operators.hpp" 3 4 -template <class T, class U, class B = operators_detail::empty_base<T> > struct left_shiftable2 : B { friend T operator <<( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct left_shiftable1 : B { friend T operator <<( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; -template <class T, class U, class B = operators_detail::empty_base<T> > struct right_shiftable2 : B { friend T operator >>( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template <class T, class B = operators_detail::empty_base<T> > struct right_shiftable1 : B { friend T operator >>( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; - - - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct equivalent2 : B -{ - friend bool operator==(const T& x, const U& y) - { - return !static_cast<bool>(x < y) && !static_cast<bool>(x > y); - } -}; - -template <class T, class B = operators_detail::empty_base<T> > -struct equivalent1 : B -{ - friend bool operator==(const T&x, const T&y) - { - return !static_cast<bool>(x < y) && !static_cast<bool>(y < x); - } -}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct partially_ordered2 : B -{ - friend bool operator<=(const T& x, const U& y) - { return static_cast<bool>(x < y) || static_cast<bool>(x == y); } - friend bool operator>=(const T& x, const U& y) - { return static_cast<bool>(x > y) || static_cast<bool>(x == y); } - friend bool operator>(const U& x, const T& y) - { return y < x; } - friend bool operator<(const U& x, const T& y) - { return y > x; } - friend bool operator<=(const U& x, const T& y) - { return static_cast<bool>(y > x) || static_cast<bool>(y == x); } - friend bool operator>=(const U& x, const T& y) - { return static_cast<bool>(y < x) || static_cast<bool>(y == x); } -}; - -template <class T, class B = operators_detail::empty_base<T> > -struct partially_ordered1 : B -{ - friend bool operator>(const T& x, const T& y) - { return y < x; } - friend bool operator<=(const T& x, const T& y) - { return static_cast<bool>(x < y) || static_cast<bool>(x == y); } - friend bool operator>=(const T& x, const T& y) - { return static_cast<bool>(y < x) || static_cast<bool>(x == y); } -}; - - - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct totally_ordered2 - : less_than_comparable2<T, U - , equality_comparable2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct totally_ordered1 - : less_than_comparable1<T - , equality_comparable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct additive2 - : addable2<T, U - , subtractable2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct additive1 - : addable1<T - , subtractable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct multiplicative2 - : multipliable2<T, U - , dividable2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct multiplicative1 - : multipliable1<T - , dividable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct integer_multiplicative2 - : multiplicative2<T, U - , modable2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct integer_multiplicative1 - : multiplicative1<T - , modable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct arithmetic2 - : additive2<T, U - , multiplicative2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct arithmetic1 - : additive1<T - , multiplicative1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct integer_arithmetic2 - : additive2<T, U - , integer_multiplicative2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct integer_arithmetic1 - : additive1<T - , integer_multiplicative1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct bitwise2 - : xorable2<T, U - , andable2<T, U - , orable2<T, U, B - > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct bitwise1 - : xorable1<T - , andable1<T - , orable1<T, B - > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct unit_steppable - : incrementable<T - , decrementable<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct shiftable2 - : left_shiftable2<T, U - , right_shiftable2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct shiftable1 - : left_shiftable1<T - , right_shiftable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct ring_operators2 - : additive2<T, U - , subtractable2_left<T, U - , multipliable2<T, U, B - > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct ring_operators1 - : additive1<T - , multipliable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct ordered_ring_operators2 - : ring_operators2<T, U - , totally_ordered2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct ordered_ring_operators1 - : ring_operators1<T - , totally_ordered1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct field_operators2 - : ring_operators2<T, U - , dividable2<T, U - , dividable2_left<T, U, B - > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct field_operators1 - : ring_operators1<T - , dividable1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct ordered_field_operators2 - : field_operators2<T, U - , totally_ordered2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct ordered_field_operators1 - : field_operators1<T - , totally_ordered1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct euclidian_ring_operators2 - : ring_operators2<T, U - , dividable2<T, U - , dividable2_left<T, U - , modable2<T, U - , modable2_left<T, U, B - > > > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct euclidian_ring_operators1 - : ring_operators1<T - , dividable1<T - , modable1<T, B - > > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct ordered_euclidian_ring_operators2 - : totally_ordered2<T, U - , euclidian_ring_operators2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct ordered_euclidian_ring_operators1 - : totally_ordered1<T - , euclidian_ring_operators1<T, B - > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct euclidean_ring_operators2 - : ring_operators2<T, U - , dividable2<T, U - , dividable2_left<T, U - , modable2<T, U - , modable2_left<T, U, B - > > > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct euclidean_ring_operators1 - : ring_operators1<T - , dividable1<T - , modable1<T, B - > > > {}; - -template <class T, class U, class B = operators_detail::empty_base<T> > -struct ordered_euclidean_ring_operators2 - : totally_ordered2<T, U - , euclidean_ring_operators2<T, U, B - > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct ordered_euclidean_ring_operators1 - : totally_ordered1<T - , euclidean_ring_operators1<T, B - > > {}; - -template <class T, class P, class B = operators_detail::empty_base<T> > -struct input_iteratable - : equality_comparable1<T - , incrementable<T - , dereferenceable<T, P, B - > > > {}; - -template <class T, class B = operators_detail::empty_base<T> > -struct output_iteratable - : incrementable<T, B - > {}; - -template <class T, class P, class B = operators_detail::empty_base<T> > -struct forward_iteratable - : input_iteratable<T, P, B - > {}; - -template <class T, class P, class B = operators_detail::empty_base<T> > -struct bidirectional_iteratable - : forward_iteratable<T, P - , decrementable<T, B - > > {}; - - - - - -template <class T, class P, class D, class R, class B = operators_detail::empty_base<T> > -struct random_access_iteratable - : bidirectional_iteratable<T, P - , less_than_comparable1<T - , additive2<T, D - , indexable<T, D, R, B - > > > > {}; -# 662 "/usr/include/boost/operators.hpp" 3 4 -namespace operators_detail -{ - - - -struct true_t {}; -struct false_t {}; - -} -# 679 "/usr/include/boost/operators.hpp" 3 4 -template<class T> struct is_chained_base { - typedef operators_detail::false_t value; -}; -# 757 "/usr/include/boost/operators.hpp" 3 4 -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct less_than_comparable; template<class T, class U, class B> struct less_than_comparable<T, U, B, operators_detail::false_t> : less_than_comparable2<T, U, B> {}; template<class T, class U> struct less_than_comparable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : less_than_comparable1<T, U> {}; template <class T, class B> struct less_than_comparable<T, T, B, operators_detail::false_t> : less_than_comparable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< less_than_comparable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< less_than_comparable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< less_than_comparable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct equality_comparable; template<class T, class U, class B> struct equality_comparable<T, U, B, operators_detail::false_t> : equality_comparable2<T, U, B> {}; template<class T, class U> struct equality_comparable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : equality_comparable1<T, U> {}; template <class T, class B> struct equality_comparable<T, T, B, operators_detail::false_t> : equality_comparable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< equality_comparable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< equality_comparable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< equality_comparable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct multipliable; template<class T, class U, class B> struct multipliable<T, U, B, operators_detail::false_t> : multipliable2<T, U, B> {}; template<class T, class U> struct multipliable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : multipliable1<T, U> {}; template <class T, class B> struct multipliable<T, T, B, operators_detail::false_t> : multipliable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< multipliable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< multipliable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< multipliable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct addable; template<class T, class U, class B> struct addable<T, U, B, operators_detail::false_t> : addable2<T, U, B> {}; template<class T, class U> struct addable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : addable1<T, U> {}; template <class T, class B> struct addable<T, T, B, operators_detail::false_t> : addable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< addable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< addable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< addable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct subtractable; template<class T, class U, class B> struct subtractable<T, U, B, operators_detail::false_t> : subtractable2<T, U, B> {}; template<class T, class U> struct subtractable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : subtractable1<T, U> {}; template <class T, class B> struct subtractable<T, T, B, operators_detail::false_t> : subtractable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< subtractable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< subtractable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< subtractable1<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< subtractable2_left<T, U, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct dividable; template<class T, class U, class B> struct dividable<T, U, B, operators_detail::false_t> : dividable2<T, U, B> {}; template<class T, class U> struct dividable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : dividable1<T, U> {}; template <class T, class B> struct dividable<T, T, B, operators_detail::false_t> : dividable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< dividable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< dividable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< dividable1<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< dividable2_left<T, U, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct modable; template<class T, class U, class B> struct modable<T, U, B, operators_detail::false_t> : modable2<T, U, B> {}; template<class T, class U> struct modable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : modable1<T, U> {}; template <class T, class B> struct modable<T, T, B, operators_detail::false_t> : modable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< modable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< modable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< modable1<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< modable2_left<T, U, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct xorable; template<class T, class U, class B> struct xorable<T, U, B, operators_detail::false_t> : xorable2<T, U, B> {}; template<class T, class U> struct xorable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : xorable1<T, U> {}; template <class T, class B> struct xorable<T, T, B, operators_detail::false_t> : xorable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< xorable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< xorable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< xorable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct andable; template<class T, class U, class B> struct andable<T, U, B, operators_detail::false_t> : andable2<T, U, B> {}; template<class T, class U> struct andable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : andable1<T, U> {}; template <class T, class B> struct andable<T, T, B, operators_detail::false_t> : andable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< andable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< andable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< andable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct orable; template<class T, class U, class B> struct orable<T, U, B, operators_detail::false_t> : orable2<T, U, B> {}; template<class T, class U> struct orable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : orable1<T, U> {}; template <class T, class B> struct orable<T, T, B, operators_detail::false_t> : orable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< orable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< orable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< orable1<T, B> > { typedef operators_detail::true_t value; }; - -template<class T, class B> struct is_chained_base< incrementable<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class B> struct is_chained_base< decrementable<T, B> > { typedef operators_detail::true_t value; }; - -template<class T, class U, class B> struct is_chained_base< dereferenceable<T, U, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class V, class B> struct is_chained_base< indexable<T, U, V, B> > { typedef operators_detail::true_t value; }; - -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct left_shiftable; template<class T, class U, class B> struct left_shiftable<T, U, B, operators_detail::false_t> : left_shiftable2<T, U, B> {}; template<class T, class U> struct left_shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : left_shiftable1<T, U> {}; template <class T, class B> struct left_shiftable<T, T, B, operators_detail::false_t> : left_shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< left_shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< left_shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< left_shiftable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct right_shiftable; template<class T, class U, class B> struct right_shiftable<T, U, B, operators_detail::false_t> : right_shiftable2<T, U, B> {}; template<class T, class U> struct right_shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : right_shiftable1<T, U> {}; template <class T, class B> struct right_shiftable<T, T, B, operators_detail::false_t> : right_shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< right_shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< right_shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< right_shiftable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct equivalent; template<class T, class U, class B> struct equivalent<T, U, B, operators_detail::false_t> : equivalent2<T, U, B> {}; template<class T, class U> struct equivalent<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : equivalent1<T, U> {}; template <class T, class B> struct equivalent<T, T, B, operators_detail::false_t> : equivalent1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< equivalent<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< equivalent2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< equivalent1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct partially_ordered; template<class T, class U, class B> struct partially_ordered<T, U, B, operators_detail::false_t> : partially_ordered2<T, U, B> {}; template<class T, class U> struct partially_ordered<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : partially_ordered1<T, U> {}; template <class T, class B> struct partially_ordered<T, T, B, operators_detail::false_t> : partially_ordered1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< partially_ordered<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< partially_ordered2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< partially_ordered1<T, B> > { typedef operators_detail::true_t value; }; - -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct totally_ordered; template<class T, class U, class B> struct totally_ordered<T, U, B, operators_detail::false_t> : totally_ordered2<T, U, B> {}; template<class T, class U> struct totally_ordered<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : totally_ordered1<T, U> {}; template <class T, class B> struct totally_ordered<T, T, B, operators_detail::false_t> : totally_ordered1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< totally_ordered<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< totally_ordered2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< totally_ordered1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct additive; template<class T, class U, class B> struct additive<T, U, B, operators_detail::false_t> : additive2<T, U, B> {}; template<class T, class U> struct additive<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : additive1<T, U> {}; template <class T, class B> struct additive<T, T, B, operators_detail::false_t> : additive1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< additive<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< additive2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< additive1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct multiplicative; template<class T, class U, class B> struct multiplicative<T, U, B, operators_detail::false_t> : multiplicative2<T, U, B> {}; template<class T, class U> struct multiplicative<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : multiplicative1<T, U> {}; template <class T, class B> struct multiplicative<T, T, B, operators_detail::false_t> : multiplicative1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< multiplicative<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< multiplicative2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< multiplicative1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct integer_multiplicative; template<class T, class U, class B> struct integer_multiplicative<T, U, B, operators_detail::false_t> : integer_multiplicative2<T, U, B> {}; template<class T, class U> struct integer_multiplicative<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : integer_multiplicative1<T, U> {}; template <class T, class B> struct integer_multiplicative<T, T, B, operators_detail::false_t> : integer_multiplicative1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< integer_multiplicative<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< integer_multiplicative2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< integer_multiplicative1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct arithmetic; template<class T, class U, class B> struct arithmetic<T, U, B, operators_detail::false_t> : arithmetic2<T, U, B> {}; template<class T, class U> struct arithmetic<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : arithmetic1<T, U> {}; template <class T, class B> struct arithmetic<T, T, B, operators_detail::false_t> : arithmetic1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< arithmetic<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< arithmetic2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< arithmetic1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct integer_arithmetic; template<class T, class U, class B> struct integer_arithmetic<T, U, B, operators_detail::false_t> : integer_arithmetic2<T, U, B> {}; template<class T, class U> struct integer_arithmetic<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : integer_arithmetic1<T, U> {}; template <class T, class B> struct integer_arithmetic<T, T, B, operators_detail::false_t> : integer_arithmetic1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< integer_arithmetic<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< integer_arithmetic2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< integer_arithmetic1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct bitwise; template<class T, class U, class B> struct bitwise<T, U, B, operators_detail::false_t> : bitwise2<T, U, B> {}; template<class T, class U> struct bitwise<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : bitwise1<T, U> {}; template <class T, class B> struct bitwise<T, T, B, operators_detail::false_t> : bitwise1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< bitwise<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< bitwise2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< bitwise1<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class B> struct is_chained_base< unit_steppable<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct shiftable; template<class T, class U, class B> struct shiftable<T, U, B, operators_detail::false_t> : shiftable2<T, U, B> {}; template<class T, class U> struct shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : shiftable1<T, U> {}; template <class T, class B> struct shiftable<T, T, B, operators_detail::false_t> : shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< shiftable1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ring_operators; template<class T, class U, class B> struct ring_operators<T, U, B, operators_detail::false_t> : ring_operators2<T, U, B> {}; template<class T, class U> struct ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ring_operators1<T, U> {}; template <class T, class B> struct ring_operators<T, T, B, operators_detail::false_t> : ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_ring_operators; template<class T, class U, class B> struct ordered_ring_operators<T, U, B, operators_detail::false_t> : ordered_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_ring_operators1<T, U> {}; template <class T, class B> struct ordered_ring_operators<T, T, B, operators_detail::false_t> : ordered_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct field_operators; template<class T, class U, class B> struct field_operators<T, U, B, operators_detail::false_t> : field_operators2<T, U, B> {}; template<class T, class U> struct field_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : field_operators1<T, U> {}; template <class T, class B> struct field_operators<T, T, B, operators_detail::false_t> : field_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< field_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< field_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< field_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_field_operators; template<class T, class U, class B> struct ordered_field_operators<T, U, B, operators_detail::false_t> : ordered_field_operators2<T, U, B> {}; template<class T, class U> struct ordered_field_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_field_operators1<T, U> {}; template <class T, class B> struct ordered_field_operators<T, T, B, operators_detail::false_t> : ordered_field_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_field_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_field_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_field_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct euclidian_ring_operators; template<class T, class U, class B> struct euclidian_ring_operators<T, U, B, operators_detail::false_t> : euclidian_ring_operators2<T, U, B> {}; template<class T, class U> struct euclidian_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : euclidian_ring_operators1<T, U> {}; template <class T, class B> struct euclidian_ring_operators<T, T, B, operators_detail::false_t> : euclidian_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< euclidian_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< euclidian_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< euclidian_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_euclidian_ring_operators; template<class T, class U, class B> struct ordered_euclidian_ring_operators<T, U, B, operators_detail::false_t> : ordered_euclidian_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_euclidian_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_euclidian_ring_operators1<T, U> {}; template <class T, class B> struct ordered_euclidian_ring_operators<T, T, B, operators_detail::false_t> : ordered_euclidian_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_euclidian_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_euclidian_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_euclidian_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct euclidean_ring_operators; template<class T, class U, class B> struct euclidean_ring_operators<T, U, B, operators_detail::false_t> : euclidean_ring_operators2<T, U, B> {}; template<class T, class U> struct euclidean_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : euclidean_ring_operators1<T, U> {}; template <class T, class B> struct euclidean_ring_operators<T, T, B, operators_detail::false_t> : euclidean_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< euclidean_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< euclidean_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< euclidean_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_euclidean_ring_operators; template<class T, class U, class B> struct ordered_euclidean_ring_operators<T, U, B, operators_detail::false_t> : ordered_euclidean_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_euclidean_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_euclidean_ring_operators1<T, U> {}; template <class T, class B> struct ordered_euclidean_ring_operators<T, T, B, operators_detail::false_t> : ordered_euclidean_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_euclidean_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_euclidean_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_euclidean_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< input_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; -template<class T, class B> struct is_chained_base< output_iteratable<T, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< forward_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class B> struct is_chained_base< bidirectional_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; -template<class T, class U, class V, class W, class B> struct is_chained_base< random_access_iteratable<T, U, V, W, B> > { typedef operators_detail::true_t value; }; - - - - - - - -template <class T, class U> -struct operators2 - : totally_ordered2<T,U - , integer_arithmetic2<T,U - , bitwise2<T,U - > > > {}; - -template <class T, class U = T> -struct operators : operators2<T, U> {}; - -template <class T> struct operators<T, T> - : totally_ordered<T - , integer_arithmetic<T - , bitwise<T - , unit_steppable<T - > > > > {}; - - - - - -template <class Category, - class T, - class Distance = std::ptrdiff_t, - class Pointer = T*, - class Reference = T&> -struct iterator_helper -{ - typedef Category iterator_category; - typedef T value_type; - typedef Distance difference_type; - typedef Pointer pointer; - typedef Reference reference; -}; - -template <class T, - class V, - class D = std::ptrdiff_t, - class P = V const *, - class R = V const &> -struct input_iterator_helper - : input_iteratable<T, P - , iterator_helper<std::input_iterator_tag, V, D, P, R - > > {}; - -template<class T> -struct output_iterator_helper - : output_iteratable<T - , iterator_helper<std::output_iterator_tag, void, void, void, void - > > -{ - T& operator*() { return static_cast<T&>(*this); } - T& operator++() { return static_cast<T&>(*this); } -}; - -template <class T, - class V, - class D = std::ptrdiff_t, - class P = V*, - class R = V&> -struct forward_iterator_helper - : forward_iteratable<T, P - , iterator_helper<std::forward_iterator_tag, V, D, P, R - > > {}; - -template <class T, - class V, - class D = std::ptrdiff_t, - class P = V*, - class R = V&> -struct bidirectional_iterator_helper - : bidirectional_iteratable<T, P - , iterator_helper<std::bidirectional_iterator_tag, V, D, P, R - > > {}; - -template <class T, - class V, - class D = std::ptrdiff_t, - class P = V*, - class R = V&> -struct random_access_iterator_helper - : random_access_iteratable<T, P, D, R - , iterator_helper<std::random_access_iterator_tag, V, D, P, R - > > -{ - friend D requires_difference_operator(const T& x, const T& y) { - return x - y; - } -}; - -} -using namespace operators_impl; - -} -# 78 "/usr/include/boost/rational.hpp" 2 3 4 -# 1 "/usr/include/c++/9.2.0/cstdlib" 1 3 4 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 4 - -# 40 "/usr/include/c++/9.2.0/cstdlib" 3 -# 79 "/usr/include/boost/rational.hpp" 2 3 4 -# 1 "/usr/include/boost/call_traits.hpp" 1 3 4 -# 18 "/usr/include/boost/call_traits.hpp" 3 4 -# 1 "/usr/include/boost/detail/call_traits.hpp" 1 3 4 -# 31 "/usr/include/boost/detail/call_traits.hpp" 3 4 -namespace boost{ - -namespace detail{ - -template <typename T, bool small_> -struct ct_imp2 -{ - typedef const T& param_type; -}; - -template <typename T> -struct ct_imp2<T, true> -{ - typedef const T param_type; -}; - -template <typename T, bool isp, bool b1, bool b2> -struct ct_imp -{ - typedef const T& param_type; -}; - -template <typename T, bool isp, bool b2> -struct ct_imp<T, isp, true, b2> -{ - typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type; -}; - -template <typename T, bool isp, bool b1> -struct ct_imp<T, isp, b1, true> -{ - typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type; -}; - -template <typename T, bool b1, bool b2> -struct ct_imp<T, true, b1, b2> -{ - typedef const T param_type; -}; - -} - -template <typename T> -struct call_traits -{ -public: - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - - - - - - - typedef typename boost::detail::ct_imp< - T, - ::boost::is_pointer<T>::value, - ::boost::is_arithmetic<T>::value, - ::boost::is_enum<T>::value - >::param_type param_type; -}; - -template <typename T> -struct call_traits<T&> -{ - typedef T& value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T& param_type; -}; -# 143 "/usr/include/boost/detail/call_traits.hpp" 3 4 -template <typename T, std::size_t N> -struct call_traits<T [N]> -{ -private: - typedef T array_type[N]; -public: - - typedef const T* value_type; - typedef array_type& reference; - typedef const array_type& const_reference; - typedef const T* const param_type; -}; - -template <typename T, std::size_t N> -struct call_traits<const T [N]> -{ -private: - typedef const T array_type[N]; -public: - - typedef const T* value_type; - typedef array_type& reference; - typedef const array_type& const_reference; - typedef const T* const param_type; -}; - - -} -# 19 "/usr/include/boost/call_traits.hpp" 2 3 4 -# 80 "/usr/include/boost/rational.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 82 "/usr/include/boost/rational.hpp" 2 3 4 -# 1 "/usr/include/boost/integer/common_factor_rt.hpp" 1 3 4 -# 10 "/usr/include/boost/integer/common_factor_rt.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) - throw () __attribute__ ((__noreturn__)); - - -extern void __assert_perror_fail (int __errnum, const char *__file, - unsigned int __line, const char *__function) - throw () __attribute__ ((__noreturn__)); - - - - -extern void __assert (const char *__assertion, const char *__file, int __line) - throw () __attribute__ ((__noreturn__)); - - -} -# 59 "/usr/include/boost/assert.hpp" 2 3 4 -# 11 "/usr/include/boost/integer/common_factor_rt.hpp" 2 3 4 - - - - -# 1 "/usr/include/c++/9.2.0/climits" 1 3 4 -# 39 "/usr/include/c++/9.2.0/climits" 3 4 - -# 40 "/usr/include/c++/9.2.0/climits" 3 - - -# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed/limits.h" 1 3 4 -# 43 "/usr/include/c++/9.2.0/climits" 2 3 -# 16 "/usr/include/boost/integer/common_factor_rt.hpp" 2 3 4 -# 42 "/usr/include/boost/integer/common_factor_rt.hpp" 3 4 -namespace boost { - - template <class I> - class rational; - - namespace integer { - - namespace gcd_detail{ - - - - - - template <class T> - inline constexpr T constexpr_min(T const& a, T const& b) noexcept(std::is_arithmetic<T>::value) - { - return a < b ? a : b; - } - template <class T> - inline constexpr auto constexpr_swap(T&a, T& b) noexcept(std::is_arithmetic<T>::value) -> decltype(a.swap(b)) - { - return a.swap(b); - } - template <class T, class U> - inline constexpr void constexpr_swap(T&a, U& b...) noexcept(std::is_arithmetic<T>::value) - { - T t(static_cast<T&&>(a)); - a = static_cast<T&&>(b); - b = static_cast<T&&>(t); - } -# 86 "/usr/include/boost/integer/common_factor_rt.hpp" 3 4 - template <class T, bool a = - - std::is_unsigned<T>::value || - - (std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_signed)> - struct gcd_traits_abs_defaults - { - inline static constexpr const T& abs(const T& val) noexcept(std::is_arithmetic<T>::value) { return val; } - }; - template <class T> - struct gcd_traits_abs_defaults<T, false> - { - inline static T constexpr abs(const T& val) noexcept(std::is_arithmetic<T>::value) - { - - return val < T(0) ? -val : val; - } - }; - - enum method_type - { - method_euclid = 0, - method_binary = 1, - method_mixed = 2 - }; - - struct any_convert - { - template <class T> - any_convert(const T&); - }; - - struct unlikely_size - { - char buf[9973]; - }; - - unlikely_size operator <<= (any_convert, any_convert); - unlikely_size operator >>= (any_convert, any_convert); - - template <class T> - struct gcd_traits_defaults : public gcd_traits_abs_defaults<T> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(T& val) noexcept(std::is_arithmetic<T>::value) - { - unsigned r = 0; - while(0 == (val & 1u)) - { - - - - val >>= 1; - - ++r; - } - return r; - } - inline static constexpr bool less(const T& a, const T& b) noexcept(std::is_arithmetic<T>::value) - { - return a < b; - } - - static T& get_value(); - - - static const bool has_operator_left_shift_equal = sizeof(get_value() <<= 2) != sizeof(unlikely_size); - static const bool has_operator_right_shift_equal = sizeof(get_value() >>= 2) != sizeof(unlikely_size); - - - - - static const method_type method = std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer && has_operator_left_shift_equal && has_operator_right_shift_equal ? method_mixed : method_euclid; - }; - - - - template <class T> - struct gcd_traits : public gcd_traits_defaults<T> {}; -# 240 "/usr/include/boost/integer/common_factor_rt.hpp" 3 4 - template <> - struct gcd_traits<unsigned> : public gcd_traits_defaults<unsigned> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned find_lsb(unsigned mask)noexcept - { - return __builtin_ctz(mask); - } - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(unsigned& val)noexcept - { - unsigned result = find_lsb(val); - val >>= result; - return result; - } - }; - template <> - struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned find_lsb(unsigned long mask)noexcept - { - return __builtin_ctzl(mask); - } - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(unsigned long& val)noexcept - { - unsigned result = find_lsb(val); - val >>= result; - return result; - } - }; - template <> - struct gcd_traits<boost::ulong_long_type> : public gcd_traits_defaults<boost::ulong_long_type> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned find_lsb(boost::ulong_long_type mask)noexcept - { - return __builtin_ctzll(mask); - } - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(boost::ulong_long_type& val)noexcept - { - unsigned result = find_lsb(val); - val >>= result; - return result; - } - }; - - - - - - template <> struct gcd_traits<boost::long_long_type> : public gcd_traits_defaults<boost::long_long_type> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(boost::long_long_type& val)noexcept { unsigned result = gcd_traits<boost::ulong_long_type>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<long> : public gcd_traits_defaults<long> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(long& val)noexcept { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<int> : public gcd_traits_defaults<int> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(int& val)noexcept { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(unsigned short& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<short> : public gcd_traits_defaults<short> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(short& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(unsigned char& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(signed char& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - template <> struct gcd_traits<char> : public gcd_traits_defaults<char> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(char& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - - template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t> - { - inline __attribute__ ((__always_inline__)) static constexpr unsigned make_odd(wchar_t& val)noexcept { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; } - }; - - - - - - - - template <class T> - constexpr T mixed_binary_gcd(T u, T v) noexcept(std::is_arithmetic<T>::value) - { - if(gcd_traits<T>::less(u, v)) - constexpr_swap(u, v); - - unsigned shifts = 0; - - if(u == T(0)) - return v; - if(v == T(0)) - return u; - - shifts = constexpr_min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v)); - - while(gcd_traits<T>::less(1, v)) - { - u %= v; - v -= u; - if(u == T(0)) - return v << shifts; - if(v == T(0)) - return u << shifts; - gcd_traits<T>::make_odd(u); - gcd_traits<T>::make_odd(v); - if(gcd_traits<T>::less(u, v)) - constexpr_swap(u, v); - } - return (v == 1 ? v : u) << shifts; - } - - - - - - template <typename SteinDomain> - constexpr SteinDomain Stein_gcd(SteinDomain m, SteinDomain n) noexcept(std::is_arithmetic<SteinDomain>::value) - { - (static_cast <bool> (m >= 0) ? void (0) : __assert_fail ("m >= 0", "/usr/include/boost/integer/common_factor_rt.hpp", 369, __extension__ __PRETTY_FUNCTION__)); - (static_cast <bool> (n >= 0) ? void (0) : __assert_fail ("n >= 0", "/usr/include/boost/integer/common_factor_rt.hpp", 370, __extension__ __PRETTY_FUNCTION__)); - if (m == SteinDomain(0)) - return n; - if (n == SteinDomain(0)) - return m; - - unsigned d_m = gcd_traits<SteinDomain>::make_odd(m); - unsigned d_n = gcd_traits<SteinDomain>::make_odd(n); - - while (m != n) - { - if (n > m) - constexpr_swap(n, m); - m -= n; - gcd_traits<SteinDomain>::make_odd(m); - } - - m <<= constexpr_min(d_m, d_n); - return m; - } - - - - - - - - template <typename EuclideanDomain> - inline constexpr EuclideanDomain Euclid_gcd(EuclideanDomain a, EuclideanDomain b) noexcept(std::is_arithmetic<EuclideanDomain>::value) - { - while (b != EuclideanDomain(0)) - { - a %= b; - constexpr_swap(a, b); - } - return a; - } - - - template <typename T> - inline constexpr typename enable_if_c<gcd_traits<T>::method == method_mixed, T>::type - optimal_gcd_select(T const &a, T const &b) noexcept(std::is_arithmetic<T>::value) - { - return gcd_detail::mixed_binary_gcd(a, b); - } - - template <typename T> - inline constexpr typename enable_if_c<gcd_traits<T>::method == method_binary, T>::type - optimal_gcd_select(T const &a, T const &b) noexcept(std::is_arithmetic<T>::value) - { - return gcd_detail::Stein_gcd(a, b); - } - - template <typename T> - inline constexpr typename enable_if_c<gcd_traits<T>::method == method_euclid, T>::type - optimal_gcd_select(T const &a, T const &b) noexcept(std::is_arithmetic<T>::value) - { - return gcd_detail::Euclid_gcd(a, b); - } - - template <class T> - inline constexpr T lcm_imp(const T& a, const T& b) noexcept(std::is_arithmetic<T>::value) - { - T temp = boost::integer::gcd_detail::optimal_gcd_select(a, b); - - - - return temp != T(0) ? T(a / temp * b) : T(0); - - } - -} - - -template <typename Integer> -inline constexpr Integer gcd(Integer const &a, Integer const &b) noexcept(std::is_arithmetic<Integer>::value) -{ - if(a == (std::numeric_limits<Integer>::min)()) - return a == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(b) : boost::integer::gcd(static_cast<Integer>(a % b), b); - else if (b == (std::numeric_limits<Integer>::min)()) - return b == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(a) : boost::integer::gcd(a, static_cast<Integer>(b % a)); - return gcd_detail::optimal_gcd_select(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b))); -} - -template <typename Integer> -inline constexpr Integer lcm(Integer const &a, Integer const &b) noexcept(std::is_arithmetic<Integer>::value) -{ - return gcd_detail::lcm_imp(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b))); -} - - - - - -template <typename Integer, typename... Args> -inline constexpr Integer gcd(Integer const &a, Integer const &b, const Integer& c, Args const&... args) noexcept(std::is_arithmetic<Integer>::value) -{ - Integer t = gcd(b, c, args...); - return t == 1 ? 1 : gcd(a, t); -} - -template <typename Integer, typename... Args> -inline constexpr Integer lcm(Integer const &a, Integer const &b, Integer const& c, Args const&... args) noexcept(std::is_arithmetic<Integer>::value) -{ - return lcm(a, lcm(b, c, args...)); -} - - - - -template <typename Integer> -inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type gcd(boost::rational<Integer> const &a, boost::rational<Integer> const &b) -{ - return boost::rational<Integer>(static_cast<Integer>(gcd(a.numerator(), b.numerator())), static_cast<Integer>(lcm(a.denominator(), b.denominator()))); -} - -template <typename Integer> -inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type lcm(boost::rational<Integer> const &a, boost::rational<Integer> const &b) -{ - return boost::rational<Integer>(static_cast<Integer>(lcm(a.numerator(), b.numerator())), static_cast<Integer>(gcd(a.denominator(), b.denominator()))); -} -# 504 "/usr/include/boost/integer/common_factor_rt.hpp" 3 4 -template <typename I> -std::pair<typename std::iterator_traits<I>::value_type, I> -gcd_range(I first, I last) noexcept(std::is_arithmetic<I>::value) -{ - (static_cast <bool> (first != last) ? void (0) : __assert_fail ("first != last", "/usr/include/boost/integer/common_factor_rt.hpp", 508, __extension__ __PRETTY_FUNCTION__)); - typedef typename std::iterator_traits<I>::value_type T; - - T d = *first; - ++first; - while (d != T(1) && first != last) - { - d = gcd(d, *first); - ++first; - } - return std::make_pair(d, first); -} -template <typename I> -std::pair<typename std::iterator_traits<I>::value_type, I> -lcm_range(I first, I last) noexcept(std::is_arithmetic<I>::value) -{ - (static_cast <bool> (first != last) ? void (0) : __assert_fail ("first != last", "/usr/include/boost/integer/common_factor_rt.hpp", 524, __extension__ __PRETTY_FUNCTION__)); - typedef typename std::iterator_traits<I>::value_type T; - - T d = *first; - ++first; - while (d != T(0) && first != last) - { - d = lcm(d, *first); - ++first; - } - return std::make_pair(d, first); -} - -template < typename IntegerType > -class gcd_evaluator - - - -{ -public: - - typedef IntegerType first_argument_type; - typedef IntegerType second_argument_type; - typedef IntegerType result_type; - - IntegerType operator()(IntegerType const &a, IntegerType const &b) const - { - return boost::integer::gcd(a, b); - } -}; - -template < typename IntegerType > -class lcm_evaluator - - - -{ -public: - - typedef IntegerType first_argument_type; - typedef IntegerType second_argument_type; - typedef IntegerType result_type; - - IntegerType operator()(IntegerType const &a, IntegerType const &b)const - { - return boost::integer::lcm(a, b); - } -}; - -} -} -# 83 "/usr/include/boost/rational.hpp" 2 3 4 -# 97 "/usr/include/boost/rational.hpp" 3 4 -namespace boost { - - -template <typename IntType> -IntType gcd(IntType n, IntType m) -{ - - return integer::gcd( n, m ); -} - -template <typename IntType> -IntType lcm(IntType n, IntType m) -{ - - return integer::lcm( n, m ); -} - - -namespace rational_detail{ - - template <class FromInt, class ToInt, typename Enable = void> - struct is_compatible_integer; - - template <class FromInt, class ToInt> - struct is_compatible_integer<FromInt, ToInt, typename enable_if_c<!is_array<FromInt>::value>::type> - { - static const bool value = ((std::numeric_limits<FromInt>::is_specialized && std::numeric_limits<FromInt>::is_integer && (std::numeric_limits<FromInt>::digits <= std::numeric_limits<ToInt>::digits) && (std::numeric_limits<FromInt>::radix == std::numeric_limits<ToInt>::radix) && ((std::numeric_limits<FromInt>::is_signed == false) || (std::numeric_limits<ToInt>::is_signed == true)) && is_convertible<FromInt, ToInt>::value) || is_same<FromInt, ToInt>::value) || (is_class<ToInt>::value && is_class<FromInt>::value && is_convertible<FromInt, ToInt>::value) - - - - - - ; - }; - - template <class FromInt, class ToInt> - struct is_compatible_integer<FromInt, ToInt, typename enable_if_c<is_array<FromInt>::value>::type> - { - static const bool value = false; - }; - - template <class FromInt, class ToInt, typename Enable = void> - struct is_backward_compatible_integer; - - template <class FromInt, class ToInt> - struct is_backward_compatible_integer<FromInt, ToInt, typename enable_if_c<!is_array<FromInt>::value>::type> - { - static const bool value = (std::numeric_limits<FromInt>::is_specialized && std::numeric_limits<FromInt>::is_integer && !is_compatible_integer<FromInt, ToInt>::value && (std::numeric_limits<FromInt>::radix == std::numeric_limits<ToInt>::radix) && is_convertible<FromInt, ToInt>::value) - - - ; - }; - - template <class FromInt, class ToInt> - struct is_backward_compatible_integer<FromInt, ToInt, typename enable_if_c<is_array<FromInt>::value>::type> - { - static const bool value = false; - }; -} - -class bad_rational : public std::domain_error -{ -public: - explicit bad_rational() : std::domain_error("bad rational: zero denominator") {} - explicit bad_rational( char const *what ) : std::domain_error( what ) {} -}; - -template <typename IntType> -class rational -{ - - static_assert(::std::numeric_limits<IntType>::is_specialized, "::std::numeric_limits<IntType>::is_specialized"); - - - typedef typename boost::call_traits<IntType>::param_type param_type; - - struct helper { IntType parts[2]; }; - typedef IntType (helper::* bool_type)[2]; - -public: - - typedef IntType int_type; - - constexpr - rational() : num(0), den(1) {} - - template <class T> - constexpr rational(const T& n, typename enable_if_c< - rational_detail::is_compatible_integer<T, IntType>::value - >::type const* = 0) : num(n), den(1) {} - - template <class T, class U> - constexpr rational(const T& n, const U& d, typename enable_if_c< - rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value - >::type const* = 0) : num(n), den(d) { - normalize(); - } - - template < typename NewType > - constexpr explicit - rational(rational<NewType> const &r, typename enable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0) - : num(r.numerator()), den(is_normalized(int_type(r.numerator()), - int_type(r.denominator())) ? r.denominator() : - (::boost::exception_detail::throw_exception_(bad_rational("bad rational: denormalized conversion"),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",200), 0)){} - - template < typename NewType > - constexpr explicit - rational(rational<NewType> const &r, typename disable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0) - : num(r.numerator()), den(is_normalized(int_type(r.numerator()), - int_type(r.denominator())) && is_safe_narrowing_conversion(r.denominator()) && is_safe_narrowing_conversion(r.numerator()) ? r.denominator() : - (::boost::exception_detail::throw_exception_(bad_rational("bad rational: denormalized conversion"),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",207), 0)){} - - - - template <class T> - constexpr typename enable_if_c< - rational_detail::is_compatible_integer<T, IntType>::value, rational & - >::type operator=(const T& n) { return assign(static_cast<IntType>(n), static_cast<IntType>(1)); } - - - template <class T, class U> - constexpr typename enable_if_c< - rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value, rational & - >::type assign(const T& n, const U& d) - { - return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d)); - } -# 232 "/usr/include/boost/rational.hpp" 3 4 - template <class T> - constexpr rational(const T& n, typename enable_if_c< - rational_detail::is_backward_compatible_integer<T, IntType>::value - >::type const* = 0) - { - assign(n, static_cast<T>(1)); - } - template <class T, class U> - constexpr rational(const T& n, const U& d, typename enable_if_c< - (!rational_detail::is_compatible_integer<T, IntType>::value - || !rational_detail::is_compatible_integer<U, IntType>::value) - && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer - && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix) - && is_convertible<T, IntType>::value && - std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer - && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix) - && is_convertible<U, IntType>::value - >::type const* = 0) - { - assign(n, d); - } - template <class T> - constexpr typename enable_if_c< - std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer - && !rational_detail::is_compatible_integer<T, IntType>::value - && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix) - && is_convertible<T, IntType>::value, - rational & - >::type operator=(const T& n) { return assign(n, static_cast<T>(1)); } - - template <class T, class U> - constexpr typename enable_if_c< - (!rational_detail::is_compatible_integer<T, IntType>::value - || !rational_detail::is_compatible_integer<U, IntType>::value) - && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer - && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix) - && is_convertible<T, IntType>::value && - std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer - && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix) - && is_convertible<U, IntType>::value, - rational & - >::type assign(const T& n, const U& d) - { - if(!is_safe_narrowing_conversion(n) || !is_safe_narrowing_conversion(d)) - ::boost::exception_detail::throw_exception_(bad_rational(),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",276); - return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d)); - } - - - constexpr - const IntType& numerator() const { return num; } - constexpr - const IntType& denominator() const { return den; } - - - constexpr rational& operator+= (const rational& r); - constexpr rational& operator-= (const rational& r); - constexpr rational& operator*= (const rational& r); - constexpr rational& operator/= (const rational& r); - - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator+= (const T& i) - { - num += i * den; - return *this; - } - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator-= (const T& i) - { - num -= i * den; - return *this; - } - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator*= (const T& i) - { - - IntType gcd = integer::gcd(static_cast<IntType>(i), den); - num *= i / gcd; - den /= gcd; - return *this; - } - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator/= (const T& i) - { - - IntType const zero(0); - - if(i == zero) ::boost::exception_detail::throw_exception_(bad_rational(),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",319); - if(num == zero) return *this; - - - IntType const gcd = integer::gcd(num, static_cast<IntType>(i)); - num /= gcd; - den *= i / gcd; - - if(den < zero) { - num = -num; - den = -den; - } - - return *this; - } - - - constexpr const rational& operator++() { num += den; return *this; } - constexpr const rational& operator--() { num -= den; return *this; } - - constexpr rational operator++(int) - { - rational t(*this); - ++(*this); - return t; - } - constexpr rational operator--(int) - { - rational t(*this); - --(*this); - return t; - } - - - constexpr - bool operator!() const { return !num; } -# 365 "/usr/include/boost/rational.hpp" 3 4 - constexpr - operator bool_type() const { return operator !() ? 0 : &helper::parts; } - - - - - - - constexpr bool operator< (const rational& r) const; - constexpr bool operator> (const rational& r) const { return r < *this; } - constexpr - bool operator== (const rational& r) const; - - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator< (const T& i) const - { - - int_type const zero(0); - - - (static_cast <bool> (this->den > zero) ? void (0) : __assert_fail ("this->den > zero", "/usr/include/boost/rational.hpp", 385, __extension__ __PRETTY_FUNCTION__)); - int_type q = this->num / this->den, r = this->num % this->den; - while(r < zero) { r += this->den; --q; } - - - - - - return q < i; - } - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator>(const T& i) const - { - return operator==(i) ? false : !operator<(i); - } - template <class T> - constexpr typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator== (const T& i) const - { - return ((den == IntType(1)) && (num == i)); - } - -private: - - - IntType num; - IntType den; - - - static constexpr - int_type inner_gcd( param_type a, param_type b, int_type const &zero = - int_type(0) ) - { return b == zero ? a : inner_gcd(b, a % b, zero); } - - static constexpr - int_type inner_abs( param_type x, int_type const &zero = int_type(0) ) - { return x < zero ? -x : +x; } - - - - - - constexpr bool test_invariant() const; - constexpr void normalize(); - - static constexpr - bool is_normalized( param_type n, param_type d, int_type const &zero = - int_type(0), int_type const &one = int_type(1) ) - { - return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n, - d, zero), zero ) == one; - } - - - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) - { - return val < (T(1) << std::numeric_limits<IntType>::digits); - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T& val) - { - - - - - return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= -(T(1) << std::numeric_limits<IntType>::digits)); - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) - { - return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= 0); - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) - { - return val >= 0; - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&) - { - return true; - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T&) - { - return true; - } - - - - template <class T> - constexpr static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&) - { - return true; - } -}; - - -template <typename IntType> -constexpr -inline rational<IntType> operator+ (const rational<IntType>& r) -{ - return r; -} - -template <typename IntType> -constexpr -inline rational<IntType> operator- (const rational<IntType>& r) -{ - return rational<IntType>(static_cast<IntType>(-r.numerator()), r.denominator()); -} - - -template <typename IntType> -constexpr rational<IntType>& rational<IntType>::operator+= (const rational<IntType>& r) -{ -# 538 "/usr/include/boost/rational.hpp" 3 4 - IntType r_num = r.num; - IntType r_den = r.den; - - IntType g = integer::gcd(den, r_den); - den /= g; - num = num * (r_den / g) + r_num * den; - g = integer::gcd(num, g); - num /= g; - den *= r_den/g; - - return *this; -} - -template <typename IntType> -constexpr rational<IntType>& rational<IntType>::operator-= (const rational<IntType>& r) -{ - - IntType r_num = r.num; - IntType r_den = r.den; - - - - IntType g = integer::gcd(den, r_den); - den /= g; - num = num * (r_den / g) - r_num * den; - g = integer::gcd(num, g); - num /= g; - den *= r_den/g; - - return *this; -} - -template <typename IntType> -constexpr rational<IntType>& rational<IntType>::operator*= (const rational<IntType>& r) -{ - - IntType r_num = r.num; - IntType r_den = r.den; - - - IntType gcd1 = integer::gcd(num, r_den); - IntType gcd2 = integer::gcd(r_num, den); - num = (num/gcd1) * (r_num/gcd2); - den = (den/gcd2) * (r_den/gcd1); - return *this; -} - -template <typename IntType> -constexpr rational<IntType>& rational<IntType>::operator/= (const rational<IntType>& r) -{ - - IntType r_num = r.num; - IntType r_den = r.den; - - - IntType zero(0); - - - if (r_num == zero) - ::boost::exception_detail::throw_exception_(bad_rational(),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",597); - if (num == zero) - return *this; - - - IntType gcd1 = integer::gcd(num, r_num); - IntType gcd2 = integer::gcd(r_den, den); - num = (num/gcd1) * (r_den/gcd2); - den = (den/gcd2) * (r_num/gcd1); - - if (den < zero) { - num = -num; - den = -den; - } - return *this; -} -# 630 "/usr/include/boost/rational.hpp" 3 4 -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type - operator + (const rational<IntType>& a, const Arg& b) -{ - rational<IntType> t(a); - return t += b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type - operator + (const Arg& b, const rational<IntType>& a) -{ - rational<IntType> t(a); - return t += b; -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type - operator - (const rational<IntType>& a, const Arg& b) -{ - rational<IntType> t(a); - return t -= b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type - operator - (const Arg& b, const rational<IntType>& a) -{ - rational<IntType> t(a); - return -(t -= b); -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type - operator * (const rational<IntType>& a, const Arg& b) -{ - rational<IntType> t(a); - return t *= b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type - operator * (const Arg& b, const rational<IntType>& a) -{ - rational<IntType> t(a); - return t *= b; -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type - operator / (const rational<IntType>& a, const Arg& b) -{ - rational<IntType> t(a); - return t /= b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type - operator / (const Arg& b, const rational<IntType>& a) -{ - rational<IntType> t(b); - return t /= a; -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type - operator <= (const rational<IntType>& a, const Arg& b) -{ - return !(a > b); -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator <= (const Arg& b, const rational<IntType>& a) -{ - return a >= b; -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type - operator >= (const rational<IntType>& a, const Arg& b) -{ - return !(a < b); -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator >= (const Arg& b, const rational<IntType>& a) -{ - return a <= b; -} - -template <class IntType, class Arg> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type - operator != (const rational<IntType>& a, const Arg& b) -{ - return !(a == b); -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator != (const Arg& b, const rational<IntType>& a) -{ - return !(b == a); -} - -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator < (const Arg& b, const rational<IntType>& a) -{ - return a > b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator > (const Arg& b, const rational<IntType>& a) -{ - return a < b; -} -template <class Arg, class IntType> -constexpr -inline typename boost::enable_if_c < - rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type - operator == (const Arg& b, const rational<IntType>& a) -{ - return a == b; -} - - -template <typename IntType> -constexpr -bool rational<IntType>::operator< (const rational<IntType>& r) const -{ - - int_type const zero( 0 ); - - - - - - (static_cast <bool> (this->den > zero) ? void (0) : __assert_fail ("this->den > zero", "/usr/include/boost/rational.hpp", 794, __extension__ __PRETTY_FUNCTION__)); - (static_cast <bool> (r.den > zero) ? void (0) : __assert_fail ("r.den > zero", "/usr/include/boost/rational.hpp", 795, __extension__ __PRETTY_FUNCTION__)); - - - - struct { int_type n, d, q, r; } - ts = { this->num, this->den, static_cast<int_type>(this->num / this->den), - static_cast<int_type>(this->num % this->den) }, - rs = { r.num, r.den, static_cast<int_type>(r.num / r.den), - static_cast<int_type>(r.num % r.den) }; - unsigned reverse = 0u; - - - - - - - while ( ts.r < zero ) { ts.r += ts.d; --ts.q; } - while ( rs.r < zero ) { rs.r += rs.d; --rs.q; } - - - for ( ;; ) - { - - - - if ( ts.q != rs.q ) - { - - - - return reverse ? ts.q > rs.q : ts.q < rs.q; - } - - - reverse ^= 1u; - - if ( (ts.r == zero) || (rs.r == zero) ) - { - - break; - } - - ts.n = ts.d; ts.d = ts.r; - ts.q = ts.n / ts.d; ts.r = ts.n % ts.d; - rs.n = rs.d; rs.d = rs.r; - rs.q = rs.n / rs.d; rs.r = rs.n % rs.d; - } - - - if ( ts.r == rs.r ) - { - - - - return false; - } - else - { -# 861 "/usr/include/boost/rational.hpp" 3 4 - return ( ts.r != zero ) != static_cast<bool>( reverse ); - - - - } -} - -template <typename IntType> -constexpr -inline bool rational<IntType>::operator== (const rational<IntType>& r) const -{ - return ((num == r.num) && (den == r.den)); -} - - -template <typename IntType> -constexpr -inline bool rational<IntType>::test_invariant() const -{ - return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) == - int_type(1) ); -} - - -template <typename IntType> -constexpr void rational<IntType>::normalize() -{ - - IntType zero(0); - - if (den == zero) - ::boost::exception_detail::throw_exception_(bad_rational(),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",892); - - - if (num == zero) { - den = IntType(1); - return; - } - - IntType g = integer::gcd(num, den); - - num /= g; - den /= g; - - if (den < -(std::numeric_limits<IntType>::max)()) { - ::boost::exception_detail::throw_exception_(bad_rational("bad rational: non-zero singular denominator"),__PRETTY_FUNCTION__,"/usr/include/boost/rational.hpp",906); - } - - - if (den < zero) { - num = -num; - den = -den; - } - - (static_cast <bool> (this->test_invariant()) ? void (0) : __assert_fail ("this->test_invariant()", "/usr/include/boost/rational.hpp", 915, __extension__ __PRETTY_FUNCTION__)); -} - - -namespace detail { - - - - struct resetter { - resetter(std::istream& is) : is_(is), f_(is.flags()) {} - ~resetter() { is_.flags(f_); } - std::istream& is_; - std::istream::fmtflags f_; - }; - -} - - -template <typename IntType> -std::istream& operator>> (std::istream& is, rational<IntType>& r) -{ - using std::ios; - - IntType n = IntType(0), d = IntType(1); - char c = 0; - detail::resetter sentry(is); - - if ( is >> n ) - { - if ( is.get(c) ) - { - if ( c == '/' ) - { - if ( is >> std::noskipws >> d ) - try { - r.assign( n, d ); - } catch ( bad_rational & ) { - try { is.setstate(ios::failbit); } - catch ( ... ) {} - if ( is.exceptions() & ios::failbit ) - throw; - - } - } - else - is.setstate( ios::failbit ); - } - } - - return is; -} - - -template <typename IntType> -std::ostream& operator<< (std::ostream& os, const rational<IntType>& r) -{ - - std::ostringstream ss; - - ss.copyfmt( os ); - ss.tie( __null ); - ss.exceptions( std::ios::goodbit ); - ss.width( 0 ); - ss << std::noshowpos << std::noshowbase << '/' << r.denominator(); - - - std::string const tail = ss.str(); - std::streamsize const w = - os.width() - static_cast<std::streamsize>( tail.size() ); - - ss.clear(); - ss.str( "" ); - ss.flags( os.flags() ); - ss << std::setw( w < 0 || (os.flags() & std::ios::adjustfield) != - std::ios::internal ? 0 : w ) << r.numerator(); - return os << ss.str() + tail; -} - - - -template <typename T, typename IntType> -constexpr -inline T rational_cast(const rational<IntType>& src) -{ - return static_cast<T>(src.numerator())/static_cast<T>(src.denominator()); -} - - - - -template <typename IntType> -constexpr -inline rational<IntType> abs(const rational<IntType>& r) -{ - return r.numerator() >= IntType(0)? r: -r; -} - -namespace integer { - -template <typename IntType> -struct gcd_evaluator< rational<IntType> > -{ - typedef rational<IntType> result_type, - first_argument_type, second_argument_type; - result_type operator() ( first_argument_type const &a - , second_argument_type const &b - ) const - { - return result_type(integer::gcd(a.numerator(), b.numerator()), - integer::lcm(a.denominator(), b.denominator())); - } -}; - -template <typename IntType> -struct lcm_evaluator< rational<IntType> > -{ - typedef rational<IntType> result_type, - first_argument_type, second_argument_type; - result_type operator() ( first_argument_type const &a - , second_argument_type const &b - ) const - { - return result_type(integer::lcm(a.numerator(), b.numerator()), - integer::gcd(a.denominator(), b.denominator())); - } -}; - -} - -} -# 20 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 2 3 4 - - - - -namespace boost{ -namespace multiprecision{ -namespace backends{ - -template <class IntBackend> -struct rational_adaptor -{ - typedef number<IntBackend> integer_type; - typedef boost::rational<integer_type> rational_type; - - typedef typename IntBackend::signed_types signed_types; - typedef typename IntBackend::unsigned_types unsigned_types; - typedef typename IntBackend::float_types float_types; - - rational_adaptor() noexcept((noexcept(rational_type()))) {} - rational_adaptor(const rational_adaptor& o) noexcept((noexcept(std::declval<rational_type&>() = std::declval<const rational_type&>()))) - { - m_value = o.m_value; - } - rational_adaptor(const IntBackend& o) noexcept((noexcept(rational_type(std::declval<const IntBackend&>())))) : m_value(o) {} - - template <class U> - rational_adaptor(const U& u, typename enable_if_c<is_convertible<U, IntBackend>::value>::type* = 0) - : m_value(static_cast<integer_type>(u)){} - template <class U> - explicit rational_adaptor(const U& u, - typename enable_if_c< - boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_convertible<U, IntBackend>::value - >::type* = 0) - : m_value(IntBackend(u)){} - template <class U> - typename enable_if_c<(boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_arithmetic<U>::value), rational_adaptor&>::type operator = (const U& u) - { - m_value = IntBackend(u); - return *this; - } - - - rational_adaptor(rational_adaptor&& o) noexcept((noexcept(rational_type(std::declval<rational_type>())))) : m_value(static_cast<rational_type&&>(o.m_value)) {} - rational_adaptor(IntBackend&& o) noexcept((noexcept(rational_type(std::declval<IntBackend>())))) : m_value(static_cast<IntBackend&&>(o)) {} - rational_adaptor& operator = (rational_adaptor&& o) noexcept((noexcept(std::declval<rational_type&>() = std::declval<rational_type>()))) - { - m_value = static_cast<rational_type&&>(o.m_value); - return *this; - } - - rational_adaptor& operator = (const rational_adaptor& o) - { - m_value = o.m_value; - return *this; - } - rational_adaptor& operator = (const IntBackend& o) - { - m_value = o; - return *this; - } - template <class Int> - typename enable_if<is_integral<Int>, rational_adaptor&>::type operator = (Int i) - { - m_value = i; - return *this; - } - template <class Float> - typename enable_if<is_floating_point<Float>, rational_adaptor&>::type operator = (Float i) - { - int e; - Float f = std::frexp(i, &e); - f = std::ldexp(f, std::numeric_limits<Float>::digits); - e -= std::numeric_limits<Float>::digits; - integer_type num(f); - integer_type denom(1u); - if(e > 0) - { - num <<= e; - } - else if(e < 0) - { - denom <<= -e; - } - m_value.assign(num, denom); - return *this; - } - rational_adaptor& operator = (const char* s) - { - std::string s1; - multiprecision::number<IntBackend> v1, v2; - char c; - bool have_hex = false; - const char* p = s; - - while((0 != (c = *s)) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F')))) - { - if(c == 'x' || c == 'X') - have_hex = true; - s1.append(1, c); - ++s; - } - v1.assign(s1); - s1.erase(); - if(c == '/') - { - ++s; - while((0 != (c = *s)) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F')))) - { - if(c == 'x' || c == 'X') - have_hex = true; - s1.append(1, c); - ++s; - } - v2.assign(s1); - } - else - v2 = 1; - if(*s) - { - ::boost::exception_detail::throw_exception_(std::runtime_error(std::string("Could not parse the string \"") + p + std::string("\" as a valid rational number.")),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/rational_adaptor.hpp",139); - } - data().assign(v1, v2); - return *this; - } - void swap(rational_adaptor& o) - { - std::swap(m_value, o.m_value); - } - std::string str(std::streamsize digits, std::ios_base::fmtflags f)const - { - - - - std::string result = data().numerator().str(digits, f); - if(data().denominator() != 1) - { - result.append(1, '/'); - result.append(data().denominator().str(digits, f)); - } - return result; - } - void negate() - { - m_value = -m_value; - } - int compare(const rational_adaptor& o)const - { - return m_value > o.m_value ? 1 : (m_value < o.m_value ? -1 : 0); - } - template <class Arithmatic> - typename enable_if_c<is_arithmetic<Arithmatic>::value && !is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const - { - return m_value > i ? 1 : (m_value < i ? -1 : 0); - } - template <class Arithmatic> - typename enable_if_c<is_floating_point<Arithmatic>::value, int>::type compare(Arithmatic i)const - { - rational_adaptor r; - r = i; - return this->compare(r); - } - rational_type& data() { return m_value; } - const rational_type& data()const { return m_value; } - - template <class Archive> - void serialize(Archive& ar, const mpl::true_&) - { - - integer_type n(m_value.numerator()), d(m_value.denominator()); - ar & boost::serialization::make_nvp("numerator", n); - ar & boost::serialization::make_nvp("denominator", d); - } - template <class Archive> - void serialize(Archive& ar, const mpl::false_&) - { - - integer_type n, d; - ar & boost::serialization::make_nvp("numerator", n); - ar & boost::serialization::make_nvp("denominator", d); - m_value.assign(n, d); - } - template <class Archive> - void serialize(Archive& ar, const unsigned int ) - { - typedef typename Archive::is_saving tag; - serialize(ar, tag()); - } -private: - rational_type m_value; -}; - -template <class IntBackend> -inline void eval_add(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o) -{ - result.data() += o.data(); -} -template <class IntBackend> -inline void eval_subtract(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o) -{ - result.data() -= o.data(); -} -template <class IntBackend> -inline void eval_multiply(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o) -{ - result.data() *= o.data(); -} -template <class IntBackend> -inline void eval_divide(rational_adaptor<IntBackend>& result, const rational_adaptor<IntBackend>& o) -{ - using default_ops::eval_is_zero; - if(eval_is_zero(o)) - { - ::boost::exception_detail::throw_exception_(std::overflow_error("Divide by zero."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/rational_adaptor.hpp",232); - } - result.data() /= o.data(); -} - -template <class R, class IntBackend> -inline typename enable_if_c<number_category<R>::value == number_kind_floating_point>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend) -{ - - - - ::boost::multiprecision::detail::generic_convert_rational_to_float(*result, backend); -} - -template <class R, class IntBackend> -inline typename enable_if_c<(number_category<R>::value != number_kind_integer) && (number_category<R>::value != number_kind_floating_point)>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend) -{ - typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t; - comp_t num(backend.data().numerator()); - comp_t denom(backend.data().denominator()); - *result = num.template convert_to<R>(); - *result /= denom.template convert_to<R>(); -} - -template <class R, class IntBackend> -inline typename enable_if_c<number_category<R>::value == number_kind_integer>::type eval_convert_to(R* result, const rational_adaptor<IntBackend>& backend) -{ - typedef typename component_type<number<rational_adaptor<IntBackend> > >::type comp_t; - comp_t t = backend.data().numerator(); - t /= backend.data().denominator(); - *result = t.template convert_to<R>(); -} - -template <class IntBackend> -inline bool eval_is_zero(const rational_adaptor<IntBackend>& val) -{ - using default_ops::eval_is_zero; - return eval_is_zero(val.data().numerator().backend()); -} -template <class IntBackend> -inline int eval_get_sign(const rational_adaptor<IntBackend>& val) -{ - using default_ops::eval_get_sign; - return eval_get_sign(val.data().numerator().backend()); -} - -template<class IntBackend, class V> -inline void assign_components(rational_adaptor<IntBackend>& result, const V& v1, const V& v2) -{ - result.data().assign(v1, v2); -} - -template <class IntBackend> -inline std::size_t hash_value(const rational_adaptor<IntBackend>& val) -{ - std::size_t result = hash_value(val.data().numerator()); - boost::hash_combine(result, val.data().denominator()); - return result; -} - - -} - -template<class IntBackend> -struct expression_template_default<backends::rational_adaptor<IntBackend> > : public expression_template_default<IntBackend> {}; - -template<class IntBackend> -struct number_category<backends::rational_adaptor<IntBackend> > : public mpl::int_<number_kind_rational>{}; - -using boost::multiprecision::backends::rational_adaptor; - -template <class Backend, expression_template_option ExpressionTemplates> -struct component_type<number<backends::rational_adaptor<Backend>, ExpressionTemplates> > -{ - typedef number<Backend, ExpressionTemplates> type; -}; - -template <class IntBackend, expression_template_option ET> -inline number<IntBackend, ET> numerator(const number<rational_adaptor<IntBackend>, ET>& val) -{ - return val.backend().data().numerator(); -} -template <class IntBackend, expression_template_option ET> -inline number<IntBackend, ET> denominator(const number<rational_adaptor<IntBackend>, ET>& val) -{ - return val.backend().data().denominator(); -} -# 331 "/usr/include/boost/multiprecision/rational_adaptor.hpp" 3 4 -}} - - -namespace std{ - -template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates> -class numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> > : public std::numeric_limits<boost::multiprecision::number<IntBackend, ExpressionTemplates> > -{ - typedef std::numeric_limits<boost::multiprecision::number<IntBackend> > base_type; - typedef boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend> > number_type; -public: - static constexpr bool is_integer = false; - static constexpr bool is_exact = true; - static constexpr number_type (min)() { return (base_type::min)(); } - static constexpr number_type (max)() { return (base_type::max)(); } - static constexpr number_type lowest() { return -(max)(); } - static constexpr number_type epsilon() { return base_type::epsilon(); } - static constexpr number_type round_error() { return epsilon() / 2; } - static constexpr number_type infinity() { return base_type::infinity(); } - static constexpr number_type quiet_NaN() { return base_type::quiet_NaN(); } - static constexpr number_type signaling_NaN() { return base_type::signaling_NaN(); } - static constexpr number_type denorm_min() { return base_type::denorm_min(); } -}; - - - -template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_integer; -template <class IntBackend, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::rational_adaptor<IntBackend>, ExpressionTemplates> >::is_exact; - - - - -} -# 21 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/traits/is_byte_container.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/traits/is_byte_container.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace detail{ - - template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_member_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 <class C, bool b> - struct is_byte_container_imp - { - - typedef typename boost::remove_cv<typename std::iterator_traits<typename C::const_iterator>::value_type>::type container_value_type; - static const bool value = boost::is_integral<container_value_type>::value && (sizeof(container_value_type) == 1); - }; - - template <class C> - struct is_byte_container_imp<C, false> : public boost::false_type {}; - - template <class C> - struct is_byte_container : public is_byte_container_imp<C, has_member_const_iterator<C>::value> {}; - - -}}} -# 22 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/predef/other/endian.h" 1 3 4 -# 194 "/usr/include/boost/predef/other/endian.h" 3 4 - - - - - - - - - - -# 23 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/integer/static_min_max.hpp" 1 3 4 -# 15 "/usr/include/boost/integer/static_min_max.hpp" 3 4 -namespace boost -{ - - - - -template <static_min_max_signed_type Value1, static_min_max_signed_type Value2> -struct static_signed_min -{ - static const static_min_max_signed_type value = (Value1 > Value2) ? Value2 : Value1; -}; - -template <static_min_max_signed_type Value1, static_min_max_signed_type Value2> -struct static_signed_max -{ - static const static_min_max_signed_type value = (Value1 < Value2) ? Value2 : Value1; -}; - -template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2> -struct static_unsigned_min -{ - static const static_min_max_unsigned_type value = (Value1 > Value2) ? Value2 : Value1 - ; -}; - -template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2> -struct static_unsigned_max -{ - static const static_min_max_unsigned_type value = (Value1 < Value2) ? Value2 : Value1 - ; -}; - - -} -# 24 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/common_type.hpp" 1 3 4 -# 26 "/usr/include/boost/type_traits/common_type.hpp" 3 4 -# 1 "/usr/include/boost/type_traits/detail/mp_defer.hpp" 1 3 4 -# 15 "/usr/include/boost/type_traits/detail/mp_defer.hpp" 3 4 -namespace boost -{ - -namespace type_traits_detail -{ - - - - -template<template<class...> class F, class... T> -struct mp_valid_impl -{ - template<template<class...> class G, class = G<T...>> - static boost::true_type check_s(int); - - template<template<class...> class> - static boost::false_type check_s(...); - - using type = decltype(check_s<F>(0)); -}; - -template<template<class...> class F, class... T> -using mp_valid = typename mp_valid_impl<F, T...>::type; - - - -struct mp_empty -{ -}; - -template<template<class...> class F, class... T> struct mp_defer_impl -{ - using type = F<T...>; -}; - -template<template<class...> class F, class... T> using mp_defer = typename boost::conditional<mp_valid<F, T...>::value, mp_defer_impl<F, T...>, mp_empty>::type; - -} - -} -# 27 "/usr/include/boost/type_traits/common_type.hpp" 2 3 4 - - -namespace boost -{ - - - - - -template<class... T> struct common_type -{ -}; - - - -template<class... T> using common_type_t = typename common_type<T...>::type; - -namespace type_traits_detail -{ - -template<class T1, class T2, class... T> using common_type_fold = common_type_t<common_type_t<T1, T2>, T...>; - -} - -template<class T1, class T2, class... T> -struct common_type<T1, T2, T...>: type_traits_detail::mp_defer<type_traits_detail::common_type_fold, T1, T2, T...> -{ -}; -# 80 "/usr/include/boost/type_traits/common_type.hpp" 3 4 -template<class T> struct common_type<T>: boost::decay<T> -{ - static_assert(::boost::is_complete<T>::value || ::boost::is_void<T>::value || ::boost::is_array<T>::value, "Arguments to common_type must both be complete types"); -}; - - - -namespace type_traits_detail -{ -# 100 "/usr/include/boost/type_traits/common_type.hpp" 3 4 -template<class T1, class T2> using builtin_common_type = typename boost::decay<decltype( boost::declval<bool>()? boost::declval<T1>(): boost::declval<T2>() )>::type; - -template<class T1, class T2> struct common_type_impl: mp_defer<builtin_common_type, T1, T2> -{ -}; -# 134 "/usr/include/boost/type_traits/common_type.hpp" 3 4 -template<class T1, class T2, class T1d = typename boost::decay<T1>::type, class T2d = typename boost::decay<T2>::type> struct common_type_decay_helper: boost::common_type<T1d, T2d> -{ -}; - -template<class T1, class T2> struct common_type_decay_helper<T1, T2, T1, T2>: common_type_impl<T1, T2> -{ -}; - -} - -template<class T1, class T2> struct common_type<T1, T2>: type_traits_detail::common_type_decay_helper<T1, T2> -{ - static_assert(::boost::is_complete<T1>::value || ::boost::is_void<T1>::value || ::boost::is_array<T1>::value, "Arguments to common_type must both be complete types"); - static_assert(::boost::is_complete<T2>::value || ::boost::is_void<T2>::value || ::boost::is_array<T2>::value, "Arguments to common_type must both be complete types"); -}; - -} -# 25 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/type_traits/make_signed.hpp" 1 3 4 -# 25 "/usr/include/boost/type_traits/make_signed.hpp" 3 4 -namespace boost { - -template <class T> -struct make_signed -{ -private: - static_assert(( ::boost::is_integral<T>::value || ::boost::is_enum<T>::value), "The template argument to make_signed must be an integer or enum type."); - static_assert(!(::boost::is_same<typename remove_cv<T>::type, bool>::value), "The template argument to make_signed must not be the type bool."); - - typedef typename remove_cv<T>::type t_no_cv; - typedef typename conditional< - (::boost::is_signed<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, unsigned char>::value, - signed char, - typename conditional< - is_same<t_no_cv, unsigned short>::value, - signed short, - typename conditional< - is_same<t_no_cv, unsigned int>::value, - int, - typename conditional< - is_same<t_no_cv, unsigned long>::value, - long, - - - typename conditional< - sizeof(t_no_cv) == sizeof(boost::long_long_type), - boost::long_long_type, - boost::int128_type - >::type -# 74 "/usr/include/boost/type_traits/make_signed.hpp" 3 4 - >::type - >::type - >::type - >::type, - - typename conditional< - sizeof(t_no_cv) == sizeof(unsigned char), - signed char, - typename conditional< - sizeof(t_no_cv) == sizeof(unsigned short), - signed short, - typename conditional< - sizeof(t_no_cv) == sizeof(unsigned int), - int, - typename conditional< - sizeof(t_no_cv) == sizeof(unsigned long), - long, - - - typename conditional< - sizeof(t_no_cv) == sizeof(boost::long_long_type), - boost::long_long_type, - boost::int128_type - >::type -# 106 "/usr/include/boost/type_traits/make_signed.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_signed_t = typename make_signed<T>::type; - - - -} -# 26 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/checked.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/cpp_int/checked.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ namespace detail{ - - - - - - -inline void raise_overflow(std::string op) -{ - ::boost::exception_detail::throw_exception_(std::overflow_error("overflow in " + op),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/checked.hpp",18); -} -inline void raise_add_overflow() -{ - raise_overflow("addition"); -} -inline void raise_subtract_overflow() -{ - ::boost::exception_detail::throw_exception_(std::range_error("Subtraction resulted in a negative value, but the type is unsigned"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/checked.hpp",26); -} -inline void raise_mul_overflow() -{ - raise_overflow("multiplication"); -} -inline void raise_div_overflow() -{ - raise_overflow("division"); -} - -template <class A> -inline A checked_add_imp(A a, A b, const mpl::true_&) -{ - if(a > 0) - { - if((b > 0) && ((integer_traits<A>::const_max - b) < a)) - raise_add_overflow(); - } - else - { - if((b < 0) && ((integer_traits<A>::const_min - b) > a)) - raise_add_overflow(); - } - return a + b; -} -template <class A> -inline A checked_add_imp(A a, A b, const mpl::false_&) -{ - if((integer_traits<A>::const_max - b) < a) - raise_add_overflow(); - return a + b; -} -template <class A> -inline A checked_add(A a, A b, const mpl::int_<checked>&) -{ - return checked_add_imp(a, b, boost::is_signed<A>()); -} -template <class A> -inline A checked_add(A a, A b, const mpl::int_<unchecked>&) -{ - return a + b; -} - -template <class A> -inline A checked_subtract_imp(A a, A b, const mpl::true_&) -{ - if(a > 0) - { - if((b < 0) && ((integer_traits<A>::const_max + b) < a)) - raise_subtract_overflow(); - } - else - { - if((b > 0) && ((integer_traits<A>::const_min + b) > a)) - raise_subtract_overflow(); - } - return a - b; -} -template <class A> -inline A checked_subtract_imp(A a, A b, const mpl::false_&) -{ - if(a < b) - raise_subtract_overflow(); - return a - b; -} -template <class A> -inline A checked_subtract(A a, A b, const mpl::int_<checked>&) -{ - return checked_subtract_imp(a, b, boost::is_signed<A>()); -} -template <class A> -inline A checked_subtract(A a, A b, const mpl::int_<unchecked>&) -{ - return a - b; -} - -template <class A> -inline A checked_multiply(A a, A b, const mpl::int_<checked>&) -{ - using boost::multiprecision::detail::abs; - if(a && (integer_traits<A>::const_max / abs(a) < abs(b))) - raise_mul_overflow(); - return a * b; -} -template <class A> -inline A checked_multiply(A a, A b, const mpl::int_<unchecked>&) -{ - return a * b; -} - -template <class A> -inline A checked_divide(A a, A b, const mpl::int_<checked>&) -{ - if(b == 0) - raise_div_overflow(); - return a / b; -} -template <class A> -inline A checked_divide(A a, A b, const mpl::int_<unchecked>&) -{ - return a / b; -} - -template <class A> -inline A checked_left_shift(A a, boost::ulong_long_type shift, const mpl::int_<checked>&) -{ - if(a && shift) - { - if((shift > sizeof(A) * 8) || (a >> (sizeof(A) * 8 - shift))) - ::boost::exception_detail::throw_exception_(std::overflow_error("Shift out of range"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/checked.hpp",136); - } - return a << shift; -} -template <class A> -inline A checked_left_shift(A a, boost::ulong_long_type shift, const mpl::int_<unchecked>&) -{ - return (shift >= sizeof(A) * 8) ? 0 : a << shift; -} - -}}}} -# 27 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 - -# 1 "/usr/include/boost/multiprecision/cpp_int/value_pack.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/cpp_int/value_pack.hpp" 3 4 -namespace boost{ namespace multiprecision{ - -namespace literals{ namespace detail{ - -template <limb_type...VALUES> -struct value_pack -{ - constexpr value_pack(){} - - typedef value_pack<0, VALUES...> next_type; -}; -template <class T> -struct is_value_pack{ static constexpr bool value = false; }; -template <limb_type...VALUES> -struct is_value_pack<value_pack<VALUES...> >{ static constexpr bool value = true; }; - -struct negate_tag{}; - -constexpr negate_tag make_negate_tag() -{ - return negate_tag(); -} - - -}}}} -# 29 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 - - -namespace boost{ -namespace multiprecision{ -namespace backends{ - - using boost::enable_if; -# 45 "/usr/include/boost/multiprecision/cpp_int.hpp" 3 4 -template <unsigned MinBits = 0, unsigned MaxBits = 0, boost::multiprecision::cpp_integer_type SignType = signed_magnitude, cpp_int_check_type Checked = unchecked, class Allocator = typename mpl::if_c<MinBits && (MinBits == MaxBits), void, std::allocator<limb_type> >::type > -struct cpp_int_backend; - -} - -namespace detail { - - template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> - struct is_byte_container<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public boost::false_type {}; - -} - -namespace backends{ - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, bool trivial = false> -struct cpp_int_base; - - - -template <class T> struct max_precision; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > -{ - static const unsigned value = is_void<Allocator>::value ? - static_unsigned_max<MinBits, MaxBits>::value - : (((MaxBits >= MinBits) && MaxBits) ? MaxBits : (0x7fffffff * 2U + 1U)); -}; - -template <class T> struct min_precision; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > -{ - static const unsigned value = (is_void<Allocator>::value ? static_unsigned_max<MinBits, MaxBits>::value : MinBits); -}; - - - - -template <class T> -struct is_trivial_cpp_int -{ - static const bool value = false; -}; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > -{ - typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self; - static const bool value = is_void<Allocator>::value && (max_precision<self>::value <= (sizeof(double_limb_type) * 8) - (SignType == signed_packed ? 1 : 0)); -}; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct is_trivial_cpp_int<cpp_int_base<MinBits, MaxBits, SignType, Checked, Allocator, true> > -{ - static const bool value = true; -}; - -} - - - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct is_unsigned_number<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > - : public mpl::bool_<(SignType == unsigned_magnitude) || (SignType == unsigned_packed)>{}; - -namespace backends{ - - - - - -template <class T, class U> -struct is_implicit_cpp_int_conversion; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -struct is_implicit_cpp_int_conversion<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > -{ - typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t1; - typedef cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t2; - static const bool value = - (is_signed_number<t2>::value || !is_signed_number<t1>::value) - && (max_precision<t1>::value <= max_precision<t2>::value); -}; - - - - -template <class T> -struct is_non_throwing_cpp_int : public mpl::false_{}; -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType> -struct is_non_throwing_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, unchecked, void> > : public mpl::true_ {}; - - - - -template <class T> -struct is_fixed_precision; -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct is_fixed_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > - : public mpl::bool_<max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value != (0x7fffffff * 2U + 1U)> {}; - -namespace detail{ - -inline void verify_new_size(unsigned new_size, unsigned min_size, const mpl::int_<checked>&) -{ - if(new_size < min_size) - ::boost::exception_detail::throw_exception_(std::overflow_error("Unable to allocate sufficient storage for the value of the result: value overflows the maximum allowable magnitude."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",153); -} -inline void verify_new_size(unsigned , unsigned , const mpl::int_<unchecked>&){} - -template <class U> -inline void verify_limb_mask(bool b, U limb, U mask, const mpl::int_<checked>&) -{ - - if(b && (limb & ~mask)) - ::boost::exception_detail::throw_exception_(std::overflow_error("Overflow in cpp_int arithmetic: there is insufficient precision in the target type to hold all of the bits of the result."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",162); -} -template <class U> -inline void verify_limb_mask(bool , U , U , const mpl::int_<unchecked>&){} - -} - - - - - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -struct cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false> - : private boost::empty_value<typename detail::rebind<limb_type, Allocator>::type> -{ - typedef typename detail::rebind<limb_type, Allocator>::type allocator_type; - - - - - typedef typename std::allocator_traits<allocator_type>::pointer limb_pointer; - typedef typename std::allocator_traits<allocator_type>::const_pointer const_limb_pointer; - - typedef mpl::int_<Checked> checked_type; - - - - - static_assert(!is_void<Allocator>::value, "!is_void<Allocator>::value"); - -private: - typedef boost::empty_value<allocator_type> base_type; - - struct limb_data - { - unsigned capacity; - limb_pointer data; - }; - -public: - static const unsigned limb_bits = sizeof(limb_type) * 8; - static const limb_type max_limb_value = ~static_cast<limb_type>(0u); - static const limb_type sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1); - static const unsigned internal_limb_count = MinBits ? (MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0)) : (sizeof(limb_data) / sizeof(limb_type)) - - - ; - static const bool variable = true; - -private: - union data_type - { - limb_data ld; - limb_type la[internal_limb_count]; - limb_type first; - double_limb_type double_first; - - constexpr data_type() : first(0) {} - constexpr data_type(limb_type i) : first(i) {} - constexpr data_type(signed_limb_type i) : first(i < 0 ? static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {} - - constexpr data_type(double_limb_type i) : double_first(i) {} - constexpr data_type(signed_double_limb_type i) : double_first(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {} - - }; - - data_type m_data; - unsigned m_limbs; - bool m_sign, m_internal; - -public: - - - - inline constexpr cpp_int_base(limb_type i)noexcept - : m_data(i), m_limbs(1), m_sign(false), m_internal(true) { } - inline constexpr cpp_int_base(signed_limb_type i)noexcept - : m_data(i), m_limbs(1), m_sign(i < 0), m_internal(true) { } - - inline constexpr cpp_int_base(double_limb_type i)noexcept - : m_data(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false), m_internal(true) { } - inline constexpr cpp_int_base(signed_double_limb_type i)noexcept - : m_data(i), m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > static_cast<double_limb_type>(max_limb_value) ? 2 : 1) : (i > max_limb_value ? 2 : 1)), - m_sign(i < 0), m_internal(true) { } - - - - - inline allocator_type& allocator() noexcept { return base_type::get(); } - inline const allocator_type& allocator()const noexcept { return base_type::get(); } - inline unsigned size()const noexcept { return m_limbs; } - inline limb_pointer limbs() noexcept { return m_internal ? m_data.la : m_data.ld.data; } - inline const_limb_pointer limbs()const noexcept { return m_internal ? m_data.la : m_data.ld.data; } - inline unsigned capacity()const noexcept { return m_internal ? internal_limb_count : m_data.ld.capacity; } - inline bool sign()const noexcept { return m_sign; } - void sign(bool b) noexcept - { - m_sign = b; - - if(m_sign && (m_limbs == 1)) - { - if(limbs()[0] == 0) - m_sign = false; - } - } - void resize(unsigned new_size, unsigned min_size) - { - static const unsigned max_limbs = MaxBits / (8 * sizeof(limb_type)) + ((MaxBits % (8 * sizeof(limb_type))) ? 1 : 0); - - if(new_size > max_limbs) - new_size = max_limbs; - detail::verify_new_size(new_size, min_size, checked_type()); - - unsigned cap = capacity(); - if(new_size > cap) - { - - cap = (std::min)((std::max)(cap * 4, new_size), max_limbs); - limb_pointer pl = allocator().allocate(cap); - std::memcpy(pl, limbs(), size() * sizeof(limbs()[0])); - if(!m_internal) - allocator().deallocate(limbs(), capacity()); - else - m_internal = false; - m_limbs = new_size; - m_data.ld.capacity = cap; - m_data.ld.data = pl; - } - else - { - m_limbs = new_size; - } - } - inline void normalize() noexcept - { - limb_pointer p = limbs(); - while((m_limbs-1) && !p[m_limbs - 1])--m_limbs; - } - inline constexpr cpp_int_base() noexcept : m_data(), m_limbs(1), m_sign(false), m_internal(true) {} - inline cpp_int_base(const cpp_int_base& o) : base_type(o), m_limbs(0), m_internal(true) - { - resize(o.size(), o.size()); - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0])); - m_sign = o.m_sign; - } - - cpp_int_base(cpp_int_base&& o) - : base_type(static_cast<base_type&&>(o)), m_limbs(o.m_limbs), m_sign(o.m_sign), m_internal(o.m_internal) - { - if(m_internal) - { - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0])); - } - else - { - m_data.ld = o.m_data.ld; - o.m_limbs = 0; - o.m_internal = true; - } - } - cpp_int_base& operator = (cpp_int_base&& o) noexcept - { - if(!m_internal) - allocator().deallocate(m_data.ld.data, m_data.ld.capacity); - *static_cast<base_type*>(this) = static_cast<base_type&&>(o); - m_limbs = o.m_limbs; - m_sign = o.m_sign; - m_internal = o.m_internal; - if(m_internal) - { - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0])); - } - else - { - m_data.ld = o.m_data.ld; - o.m_limbs = 0; - o.m_internal = true; - } - return *this; - } - - inline ~cpp_int_base() noexcept - { - if(!m_internal) - allocator().deallocate(limbs(), capacity()); - } - void assign(const cpp_int_base& o) - { - if(this != &o) - { - static_cast<base_type&>(*this) = static_cast<const base_type&>(o); - m_limbs = 0; - resize(o.size(), o.size()); - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0])); - m_sign = o.m_sign; - } - } - inline void negate() noexcept - { - m_sign = !m_sign; - - if(m_sign && (m_limbs == 1)) - { - if(limbs()[0] == 0) - m_sign = false; - } - } - inline bool isneg()const noexcept - { - return m_sign; - } - inline void do_swap(cpp_int_base& o) noexcept - { - std::swap(m_data, o.m_data); - std::swap(m_sign, o.m_sign); - std::swap(m_internal, o.m_internal); - std::swap(m_limbs, o.m_limbs); - } -protected: - template <class A> - void check_in_range(const A&) noexcept {} -}; - - - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::limb_bits; -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::max_limb_value; -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::sign_bit_mask; -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::internal_limb_count; -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -const bool cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::variable; - - - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -struct cpp_int_base<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator, false> - : private boost::empty_value<typename detail::rebind<limb_type, Allocator>::type> -{ - - - - - static_assert(((sizeof(Allocator) == 0) && !is_void<Allocator>::value), "There is curently no support for unsigned arbitrary precision integers."); -}; - - - -template <unsigned MinBits, cpp_int_check_type Checked> -struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false> -{ - typedef limb_type* limb_pointer; - typedef const limb_type* const_limb_pointer; - typedef mpl::int_<Checked> checked_type; - - - - - static_assert(MinBits > sizeof(double_limb_type) * 8, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?"); - -public: - static const unsigned limb_bits = sizeof(limb_type) * 8; - static const limb_type max_limb_value = ~static_cast<limb_type>(0u); - static const limb_type sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1); - static const unsigned internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0); - static const bool variable = false; - static const limb_type upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)); - static_assert(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs"); - -private: - union data_type{ - limb_type m_data[internal_limb_count]; - limb_type m_first_limb; - double_limb_type m_double_first_limb; - - constexpr data_type() : m_first_limb(0) {} - constexpr data_type(limb_type i) : m_first_limb(i) {} - constexpr data_type(double_limb_type i) : m_double_first_limb(i) {} - - template <limb_type...VALUES> - constexpr data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {} - - } m_wrapper; - boost::uint16_t m_limbs; - bool m_sign; - -public: - - - - inline constexpr cpp_int_base(limb_type i)noexcept - : m_wrapper(i), m_limbs(1), m_sign(false) {} - inline constexpr cpp_int_base(signed_limb_type i)noexcept - : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1), m_sign(i < 0) {} - - inline constexpr cpp_int_base(double_limb_type i)noexcept - : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false) {} - inline constexpr cpp_int_base(signed_double_limb_type i)noexcept - : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)), - m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1)), - m_sign(i < 0) {} - - - template <limb_type...VALUES> - constexpr cpp_int_base(literals::detail::value_pack<VALUES...> i) - : m_wrapper(i), m_limbs(sizeof...(VALUES)), m_sign(false) {} - constexpr cpp_int_base(literals::detail::value_pack<> i) - : m_wrapper(i), m_limbs(1), m_sign(false) {} - constexpr cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&) - : m_wrapper(a.m_wrapper), m_limbs(a.m_limbs), m_sign((a.m_limbs == 1) && (*a.limbs() == 0) ? false : !a.m_sign) {} - - - - - inline unsigned size()const noexcept { return m_limbs; } - inline limb_pointer limbs() noexcept { return m_wrapper.m_data; } - inline constexpr const_limb_pointer limbs()const noexcept { return m_wrapper.m_data; } - inline constexpr bool sign()const noexcept { return m_sign; } - inline void sign(bool b) noexcept - { - m_sign = b; - - if(m_sign && (m_limbs == 1)) - { - if(limbs()[0] == 0) - m_sign = false; - } - } - inline void resize(unsigned new_size, unsigned min_size) noexcept(((Checked == unchecked))) - { - m_limbs = static_cast<boost::uint16_t>((std::min)(new_size, internal_limb_count)); - detail::verify_new_size(m_limbs, min_size, checked_type()); - } - inline void normalize() noexcept(((Checked == unchecked))) - { - limb_pointer p = limbs(); - detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type()); - p[internal_limb_count-1] &= upper_limb_mask; - while((m_limbs-1) && !p[m_limbs - 1])--m_limbs; - if((m_limbs == 1) && (!*p)) m_sign = false; - } - - inline constexpr cpp_int_base()noexcept : m_wrapper(limb_type(0u)), m_limbs(1), m_sign(false) {} - - inline constexpr cpp_int_base(const cpp_int_base& o)noexcept - : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs), m_sign(o.m_sign) {} - - - - void assign(const cpp_int_base& o) noexcept - { - if(this != &o) - { - m_limbs = o.m_limbs; - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(o.limbs()[0])); - m_sign = o.m_sign; - } - } - inline void negate() noexcept - { - m_sign = !m_sign; - - if(m_sign && (m_limbs == 1)) - { - if(limbs()[0] == 0) - m_sign = false; - } - } - inline bool isneg()const noexcept - { - return m_sign; - } - inline void do_swap(cpp_int_base& o) noexcept - { - for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i) - std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]); - std::swap(m_sign, o.m_sign); - std::swap(m_limbs, o.m_limbs); - } -protected: - template <class A> - void check_in_range(const A&) noexcept {} -}; - - -template <unsigned MinBits, cpp_int_check_type Checked> -const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::limb_bits; -template <unsigned MinBits, cpp_int_check_type Checked> -const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::max_limb_value; -template <unsigned MinBits, cpp_int_check_type Checked> -const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::sign_bit_mask; -template <unsigned MinBits, cpp_int_check_type Checked> -const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::internal_limb_count; -template <unsigned MinBits, cpp_int_check_type Checked> -const bool cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::variable; - - - - - -template <unsigned MinBits, cpp_int_check_type Checked> -struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false> -{ - typedef limb_type* limb_pointer; - typedef const limb_type* const_limb_pointer; - typedef mpl::int_<Checked> checked_type; - - - - - static_assert(MinBits > sizeof(double_limb_type) * 8, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?"); - -public: - static const unsigned limb_bits = sizeof(limb_type) * 8; - static const limb_type max_limb_value = ~static_cast<limb_type>(0u); - static const limb_type sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1); - static const unsigned internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0); - static const bool variable = false; - static const limb_type upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)); - static_assert(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs"); - -private: - union data_type{ - limb_type m_data[internal_limb_count]; - limb_type m_first_limb; - double_limb_type m_double_first_limb; - - constexpr data_type() : m_first_limb(0) {} - constexpr data_type(limb_type i) : m_first_limb(i) {} - constexpr data_type(double_limb_type i) : m_double_first_limb(i) {} - - template <limb_type...VALUES> - constexpr data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {} - - } m_wrapper; - limb_type m_limbs; - -public: - - - - inline constexpr cpp_int_base(limb_type i)noexcept - : m_wrapper(i), m_limbs(1) {} - inline cpp_int_base(signed_limb_type i)noexcept(((Checked == unchecked))) - : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1) { if(i < 0) negate(); } - - inline constexpr cpp_int_base(double_limb_type i)noexcept - : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1) {} - inline cpp_int_base(signed_double_limb_type i)noexcept(((Checked == unchecked))) - : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)), - m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1)) - { - if (i < 0) negate(); - } - - - template <limb_type...VALUES> - constexpr cpp_int_base(literals::detail::value_pack<VALUES...> i) - : m_wrapper(i), m_limbs(sizeof...(VALUES)) {} - constexpr cpp_int_base(literals::detail::value_pack<>) - : m_wrapper(static_cast<limb_type>(0u)), m_limbs(1) {} - - - - - inline unsigned size()const noexcept { return m_limbs; } - inline limb_pointer limbs() noexcept { return m_wrapper.m_data; } - inline constexpr const_limb_pointer limbs()const noexcept { return m_wrapper.m_data; } - inline constexpr bool sign()const noexcept { return false; } - inline void sign(bool b) noexcept(((Checked == unchecked))) { if(b) negate(); } - inline void resize(unsigned new_size, unsigned min_size) noexcept(((Checked == unchecked))) - { - m_limbs = (std::min)(new_size, internal_limb_count); - detail::verify_new_size(m_limbs, min_size, checked_type()); - } - inline void normalize() noexcept(((Checked == unchecked))) - { - limb_pointer p = limbs(); - detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type()); - p[internal_limb_count-1] &= upper_limb_mask; - while((m_limbs-1) && !p[m_limbs - 1])--m_limbs; - } - - inline constexpr cpp_int_base() noexcept - : m_wrapper(limb_type(0u)), m_limbs(1) {} - inline constexpr cpp_int_base(const cpp_int_base& o) noexcept - : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs) {} - - - - inline void assign(const cpp_int_base& o) noexcept - { - if(this != &o) - { - m_limbs = o.m_limbs; - std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0])); - } - } -private: - void check_negate(const mpl::int_<checked>&) - { - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to negate an unsigned number."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",666); - } - void check_negate(const mpl::int_<unchecked>&){} -public: - void negate() noexcept(((Checked == unchecked))) - { - - - unsigned i; - if((m_limbs == 1) && (m_wrapper.m_data[0] == 0)) - return; - check_negate(checked_type()); - for(i = m_limbs; i < internal_limb_count; ++i) - m_wrapper.m_data[i] = 0; - m_limbs = internal_limb_count; - for(i = 0; i < internal_limb_count; ++i) - m_wrapper.m_data[i] = ~m_wrapper.m_data[i]; - normalize(); - eval_increment(static_cast<cpp_int_backend<MinBits, MinBits, unsigned_magnitude, Checked, void>& >(*this)); - } - inline constexpr bool isneg()const noexcept - { - return false; - } - inline void do_swap(cpp_int_base& o) noexcept - { - for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i) - std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]); - std::swap(m_limbs, o.m_limbs); - } -protected: - template <class A> - void check_in_range(const A&) noexcept {} -}; - - -template <unsigned MinBits, cpp_int_check_type Checked> -const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::limb_bits; -template <unsigned MinBits, cpp_int_check_type Checked> -const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::max_limb_value; -template <unsigned MinBits, cpp_int_check_type Checked> -const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::sign_bit_mask; -template <unsigned MinBits, cpp_int_check_type Checked> -const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::internal_limb_count; -template <unsigned MinBits, cpp_int_check_type Checked> -const bool cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::variable; - - - - - - -template <unsigned N, bool s> -struct trivial_limb_type_imp -{ - typedef double_limb_type type; -}; - -template <unsigned N> -struct trivial_limb_type_imp<N, true> -{ - typedef typename boost::uint_t<N>::least type; -}; - -template <unsigned N> -struct trivial_limb_type : public trivial_limb_type_imp<N, N <= sizeof(boost::long_long_type) * 8> {}; - - - -template <unsigned MinBits, cpp_int_check_type Checked> -struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, true> -{ - typedef typename trivial_limb_type<MinBits>::type local_limb_type; - typedef local_limb_type* limb_pointer; - typedef const local_limb_type* const_limb_pointer; - typedef mpl::int_<Checked> checked_type; -protected: - static const unsigned limb_bits = sizeof(local_limb_type) * 8; - static const local_limb_type limb_mask = (MinBits < limb_bits) ? local_limb_type((local_limb_type(~local_limb_type(0))) >> (limb_bits - MinBits)) : local_limb_type(~local_limb_type(0)); -private: - local_limb_type m_data; - bool m_sign; - - - - - static_assert(MinBits <= sizeof(double_limb_type) * 8, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?"); -protected: - template <class T> - typename boost::disable_if_c<!boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type - check_in_range(T val, const mpl::int_<checked>&) - { - typedef typename common_type<typename make_unsigned<T>::type, local_limb_type>::type common_type; - - if(static_cast<common_type>(boost::multiprecision::detail::unsigned_abs(val)) > static_cast<common_type>(limb_mask)) - ::boost::exception_detail::throw_exception_(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",761); - } - template <class T> - typename boost::disable_if_c<boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type - check_in_range(T val, const mpl::int_<checked>&) - { - using std::abs; - typedef typename common_type<T, local_limb_type>::type common_type; - - if (static_cast<common_type>(abs(val)) > static_cast<common_type>(limb_mask)) - ::boost::exception_detail::throw_exception_(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",771); - } - template <class T, int C> - void check_in_range(T, const mpl::int_<C>&) noexcept {} - - template <class T> - void check_in_range(T val) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type())))) - { - check_in_range(val, checked_type()); - } - -public: - - - - template <class SI> - inline constexpr cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))) - : m_data(i < 0 ? static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0) {} - template <class SI> - inline cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))) - : m_data(i < 0 ? (static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask)) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0) - { check_in_range(i); } - template <class UI> - inline constexpr cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked)>::type const* = 0) noexcept - : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) {} - template <class UI> - inline cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked)>::type const* = 0) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))) - : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) { check_in_range(i); } - template <class F> - inline constexpr cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == unchecked)>::type const* = 0) noexcept - : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) {} - template <class F> - inline cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == checked)>::type const* = 0) - : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) { check_in_range(i); } - - constexpr cpp_int_base(literals::detail::value_pack<>) noexcept - : m_data(static_cast<local_limb_type>(0u)), m_sign(false) {} - template <limb_type a> - constexpr cpp_int_base(literals::detail::value_pack<a>)noexcept - : m_data(static_cast<local_limb_type>(a)), m_sign(false) {} - template <limb_type a, limb_type b> - constexpr cpp_int_base(literals::detail::value_pack<a, b>)noexcept - : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)), m_sign(false) {} - constexpr cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&)noexcept - : m_data(a.m_data), m_sign(a.m_data ? !a.m_sign : false) {} - - - - - inline constexpr unsigned size()const noexcept { return 1; } - inline limb_pointer limbs() noexcept { return &m_data; } - inline constexpr const_limb_pointer limbs()const noexcept { return &m_data; } - inline bool sign()const noexcept { return m_sign; } - inline void sign(bool b) noexcept - { - m_sign = b; - - if(m_sign && !m_data) - { - m_sign = false; - } - } - inline void resize(unsigned , unsigned min_size) - { - detail::verify_new_size(2, min_size, checked_type()); - } - inline void normalize() noexcept(((Checked == unchecked))) - { - if(!m_data) - m_sign = false; - detail::verify_limb_mask(true, m_data, limb_mask, checked_type()); - m_data &= limb_mask; - } - - inline constexpr cpp_int_base() noexcept : m_data(0), m_sign(false) {} - inline constexpr cpp_int_base(const cpp_int_base& o) noexcept - : m_data(o.m_data), m_sign(o.m_sign) {} - - inline void assign(const cpp_int_base& o) noexcept - { - m_data = o.m_data; - m_sign = o.m_sign; - } - inline void negate() noexcept - { - m_sign = !m_sign; - - if(m_data == 0) - { - m_sign = false; - } - } - inline bool isneg()const noexcept - { - return m_sign; - } - inline void do_swap(cpp_int_base& o) noexcept - { - std::swap(m_sign, o.m_sign); - std::swap(m_data, o.m_data); - } -}; - - - -template <unsigned MinBits, cpp_int_check_type Checked> -struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, true> -{ - typedef typename trivial_limb_type<MinBits>::type local_limb_type; - typedef local_limb_type* limb_pointer; - typedef const local_limb_type* const_limb_pointer; -private: - static const unsigned limb_bits = sizeof(local_limb_type) * 8; - static const local_limb_type limb_mask = limb_bits != MinBits ? static_cast<local_limb_type>(static_cast<local_limb_type>(~local_limb_type(0)) >> (limb_bits - MinBits)) : static_cast<local_limb_type>(~local_limb_type(0)) - - ; - - local_limb_type m_data; - - typedef mpl::int_<Checked> checked_type; - - - - - static_assert(MinBits <= sizeof(double_limb_type) * 8, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?"); -protected: - template <class T> - typename boost::disable_if_c<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits)>::type - check_in_range(T val, const mpl::int_<checked>&, const boost::false_type&) - { - typedef typename common_type<T, local_limb_type>::type common_type; - - if(static_cast<common_type>(val) > limb_mask) - ::boost::exception_detail::throw_exception_(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",904); - } - template <class T> - void check_in_range(T val, const mpl::int_<checked>&, const boost::true_type&) - { - typedef typename common_type<T, local_limb_type>::type common_type; - - if(static_cast<common_type>(val) > limb_mask) - ::boost::exception_detail::throw_exception_(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",912); - if(val < 0) - ::boost::exception_detail::throw_exception_(std::range_error("The argument to an unsigned cpp_int constructor was negative."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",914); - } - template <class T, int C, bool B> - inline void check_in_range(T, const mpl::int_<C>&, const boost::integral_constant<bool, B>&) noexcept {} - - template <class T> - inline void check_in_range(T val) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type(), is_signed<T>())))) - { - check_in_range(val, checked_type(), is_signed<T>()); - } - -public: -# 943 "/usr/include/boost/multiprecision/cpp_int.hpp" 3 4 - template <class SI> - inline constexpr cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) noexcept - : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i)) & limb_mask : static_cast<local_limb_type>(i) & limb_mask) {} - template <class SI> - inline cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))) - : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i) : static_cast<local_limb_type>(i)) { check_in_range(i); } - template <class UI> - inline constexpr cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) noexcept - : m_data(static_cast<local_limb_type>(i) & limb_mask) {} - template <class UI> - inline cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) noexcept((noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))) - : m_data(static_cast<local_limb_type>(i)) { check_in_range(i); } - - template <class F> - inline cpp_int_base(F i, typename boost::enable_if<is_floating_point<F> >::type const* = 0) noexcept(((Checked == unchecked))) - : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask) - { - check_in_range(i); - if(i < 0) - negate(); - } - - constexpr cpp_int_base(literals::detail::value_pack<>) noexcept - : m_data(static_cast<local_limb_type>(0u)) {} - template <limb_type a> - constexpr cpp_int_base(literals::detail::value_pack<a>) noexcept - : m_data(static_cast<local_limb_type>(a)) {} - template <limb_type a, limb_type b> - constexpr cpp_int_base(literals::detail::value_pack<a, b>) noexcept - : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)) {} - - - - - inline constexpr unsigned size()const noexcept { return 1; } - inline limb_pointer limbs() noexcept { return &m_data; } - inline constexpr const_limb_pointer limbs()const noexcept { return &m_data; } - inline constexpr bool sign()const noexcept { return false; } - inline void sign(bool b) noexcept(((Checked == unchecked))) - { - if(b) - negate(); - } - inline void resize(unsigned, unsigned min_size) - { - detail::verify_new_size(2, min_size, checked_type()); - } - inline void normalize() noexcept(((Checked == unchecked))) - { - detail::verify_limb_mask(true, m_data, limb_mask, checked_type()); - m_data &= limb_mask; - } - - inline constexpr cpp_int_base() noexcept : m_data(0) {} - inline constexpr cpp_int_base(const cpp_int_base& o) noexcept - : m_data(o.m_data) {} - - inline void assign(const cpp_int_base& o) noexcept - { - m_data = o.m_data; - } - inline void negate() noexcept(((Checked == unchecked))) - { - if(Checked == checked) - { - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to negate an unsigned type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1008); - } - m_data = ~m_data; - ++m_data; - } - inline constexpr bool isneg()const noexcept - { - return false; - } - inline void do_swap(cpp_int_base& o) noexcept - { - std::swap(m_data, o.m_data); - } -}; - - - - -template <class Arg, class Base> -struct is_allowed_cpp_int_base_conversion : public mpl::if_c< - is_same<Arg, limb_type>::value || is_same<Arg, signed_limb_type>::value - - || is_same<Arg, double_limb_type>::value || is_same<Arg, signed_double_limb_type>::value - - - || literals::detail::is_value_pack<Arg>::value - - || (is_trivial_cpp_int<Base>::value && is_arithmetic<Arg>::value), - mpl::true_, - mpl::false_ - >::type -{}; - - - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct cpp_int_backend - : public cpp_int_base< - min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, - max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, - SignType, - Checked, - Allocator, - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> -{ - typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self_type; - typedef cpp_int_base< - min_precision<self_type>::value, - max_precision<self_type>::value, - SignType, - Checked, - Allocator, - is_trivial_cpp_int<self_type>::value> base_type; - typedef mpl::bool_<is_trivial_cpp_int<self_type>::value> trivial_tag; -public: - typedef typename mpl::if_< - trivial_tag, - mpl::list< - signed char, short, int, long, - boost::long_long_type, signed_double_limb_type>, - mpl::list<signed_limb_type, signed_double_limb_type> - >::type signed_types; - typedef typename mpl::if_< - trivial_tag, - mpl::list<unsigned char, unsigned short, unsigned, - unsigned long, boost::ulong_long_type, double_limb_type>, - mpl::list<limb_type, double_limb_type> - >::type unsigned_types; - typedef typename mpl::if_< - trivial_tag, - mpl::list<float, double, long double>, - mpl::list<long double> - >::type float_types; - typedef mpl::int_<Checked> checked_type; - - inline constexpr cpp_int_backend() noexcept{} - inline constexpr cpp_int_backend(const cpp_int_backend& o) noexcept((boost::is_void<Allocator>::value)) : base_type(o) {} - - inline constexpr cpp_int_backend(cpp_int_backend&& o) noexcept - : base_type(static_cast<base_type&&>(o)) {} - - - - - template <class Arg> - inline constexpr cpp_int_backend(Arg i, typename boost::enable_if_c<is_allowed_cpp_int_base_conversion<Arg, base_type>::value >::type const* = 0)noexcept((noexcept(base_type(std::declval<Arg>())))) - : base_type(i) {} - -private: - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::true_ const &) - { - - this->check_in_range(*other.limbs()); - *this->limbs() = static_cast<typename self_type::local_limb_type>(*other.limbs()); - this->sign(other.sign()); - this->normalize(); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::false_ const &) - { - - double_limb_type v = *other.limbs(); - if(other.size() > 1) - { - v |= static_cast<double_limb_type>(other.limbs()[1]) << bits_per_limb; - if((Checked == checked) && (other.size() > 2)) - { - ::boost::exception_detail::throw_exception_(std::range_error("Assignment of a cpp_int that is out of range for the target type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1116); - } - } - *this = v; - this->sign(other.sign()); - this->normalize(); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::true_ const &) - { - - *this = static_cast< - typename boost::multiprecision::detail::canonical< - typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type, - cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> - >::type - >(*other.limbs()); - this->sign(other.sign()); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::false_ const &) - { - - this->resize(other.size(), other.size()); - std::memcpy(this->limbs(), other.limbs(), (std::min)(other.size(), this->size()) * sizeof(this->limbs()[0])); - this->sign(other.sign()); - this->normalize(); - } -public: - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - cpp_int_backend( - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, - typename boost::enable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0) - : base_type() - { - do_assign( - other, - mpl::bool_<is_trivial_cpp_int<self_type>::value>(), - mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>()); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - explicit cpp_int_backend( - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, - typename boost::disable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0) - : base_type() - { - do_assign( - other, - mpl::bool_<is_trivial_cpp_int<self_type>::value>(), - mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>()); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - cpp_int_backend& operator=( - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other) - { - do_assign( - other, - mpl::bool_<is_trivial_cpp_int<self_type>::value>(), - mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>()); - return *this; - } - - constexpr cpp_int_backend(const cpp_int_backend& a, const literals::detail::negate_tag& tag) - : base_type(static_cast<const base_type&>(a), tag){} - - - inline cpp_int_backend& operator = (const cpp_int_backend& o) noexcept((noexcept(std::declval<cpp_int_backend>().assign(std::declval<const cpp_int_backend&>())))) - { - this->assign(o); - return *this; - } - - inline cpp_int_backend& operator = (cpp_int_backend&& o) noexcept((noexcept(std::declval<base_type&>() = std::declval<base_type>()))) - { - *static_cast<base_type*>(this) = static_cast<base_type&&>(o); - return *this; - } - -private: - template <class A> - typename boost::enable_if<is_unsigned<A> >::type do_assign_arithmetic(A val, const mpl::true_&) - noexcept((noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())))) - { - this->check_in_range(val); - *this->limbs() = static_cast<typename self_type::local_limb_type>(val); - this->sign(false); - this->normalize(); - } - template <class A> - typename boost::disable_if_c<is_unsigned<A>::value || !is_integral<A>::value >::type do_assign_arithmetic(A val, const mpl::true_&) - noexcept((noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())) && noexcept(std::declval<cpp_int_backend>().sign(true)))) - { - this->check_in_range(val); - *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::unsigned_abs(val)) : static_cast<typename self_type::local_limb_type>(val); - this->sign(val < 0); - this->normalize(); - } - template <class A> - typename boost::enable_if_c< !is_integral<A>::value>::type do_assign_arithmetic(A val, const mpl::true_&) - { - this->check_in_range(val); - *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::abs(val)) : static_cast<typename self_type::local_limb_type>(val); - this->sign(val < 0); - this->normalize(); - } - inline void do_assign_arithmetic(limb_type i, const mpl::false_&) noexcept - { - this->resize(1, 1); - *this->limbs() = i; - this->sign(false); - } - inline void do_assign_arithmetic(signed_limb_type i, const mpl::false_&) noexcept((noexcept(std::declval<cpp_int_backend>().sign(true)))) - { - this->resize(1, 1); - *this->limbs() = static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i)); - this->sign(i < 0); - } - void do_assign_arithmetic(double_limb_type i, const mpl::false_&) noexcept - { - static_assert(sizeof(i) == 2 * sizeof(limb_type), "sizeof(i) == 2 * sizeof(limb_type)"); - static_assert(base_type::internal_limb_count >= 2, "base_type::internal_limb_count >= 2"); - typename base_type::limb_pointer p = this->limbs(); - - - - *p = static_cast<limb_type>(i); - - p[1] = static_cast<limb_type>(i >> base_type::limb_bits); - this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1); - this->sign(false); - } - void do_assign_arithmetic(signed_double_limb_type i, const mpl::false_&) noexcept((noexcept(std::declval<cpp_int_backend>().sign(true)))) - { - static_assert(sizeof(i) == 2 * sizeof(limb_type), "sizeof(i) == 2 * sizeof(limb_type)"); - static_assert(base_type::internal_limb_count >= 2, "base_type::internal_limb_count >= 2"); - bool s = false; - double_limb_type ui; - if(i < 0) - s = true; - ui = static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)); - typename base_type::limb_pointer p = this->limbs(); - - - - *p = static_cast<limb_type>(ui); - - p[1] = static_cast<limb_type>(ui >> base_type::limb_bits); - this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1); - this->sign(s); - } - - void do_assign_arithmetic(long double a, const mpl::false_&) - { - using default_ops::eval_add; - using default_ops::eval_subtract; - using std::frexp; - using std::ldexp; - using std::floor; - - if(a < 0) - { - do_assign_arithmetic(-a, mpl::false_()); - this->sign(true); - return; - } - - if (a == 0) { - *this = static_cast<limb_type>(0u); - } - - if (a == 1) { - *this = static_cast<limb_type>(1u); - } - - if ((boost::math::isinf)(a) || (boost::math::isnan)(a)) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("Cannot convert a non-finite number to an integer."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1292); - } - - int e; - long double f, term; - *this = static_cast<limb_type>(0u); - - f = frexp(a, &e); - - static const limb_type shift = std::numeric_limits<limb_type>::digits; - - while(f) - { - - f = ldexp(f, shift); - term = floor(f); - e -= shift; - eval_left_shift(*this, shift); - if(term > 0) - eval_add(*this, static_cast<limb_type>(term)); - else - eval_subtract(*this, static_cast<limb_type>(-term)); - f -= term; - } - if(e > 0) - eval_left_shift(*this, e); - else if(e < 0) - eval_right_shift(*this, -e); - } -public: - template <class Arithmetic> - inline typename boost::enable_if_c<!boost::multiprecision::detail::is_byte_container<Arithmetic>::value, cpp_int_backend&>::type operator = (Arithmetic val) noexcept((noexcept(std::declval<cpp_int_backend>().do_assign_arithmetic(std::declval<Arithmetic>(), trivial_tag())))) - { - do_assign_arithmetic(val, trivial_tag()); - return *this; - } -private: - void do_assign_string(const char* s, const mpl::true_&) - { - std::size_t n = s ? std::strlen(s) : 0; - *this = 0; - unsigned radix = 10; - bool isneg = false; - if(n && (*s == '-')) - { - --n; - ++s; - isneg = true; - } - if(n && (*s == '0')) - { - if((n > 1) && ((s[1] == 'x') || (s[1] == 'X'))) - { - radix = 16; - s +=2; - n -= 2; - } - else - { - radix = 8; - n -= 1; - } - } - if(n) - { - unsigned val; - while(*s) - { - if(*s >= '0' && *s <= '9') - val = *s - '0'; - else if(*s >= 'a' && *s <= 'f') - val = 10 + *s - 'a'; - else if(*s >= 'A' && *s <= 'F') - val = 10 + *s - 'A'; - else - val = radix + 1; - if(val >= radix) - { - ::boost::exception_detail::throw_exception_(std::runtime_error("Unexpected content found while parsing character string."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1370); - } - *this->limbs() = detail::checked_multiply(*this->limbs(), static_cast<typename base_type::local_limb_type>(radix), checked_type()); - *this->limbs() = detail::checked_add(*this->limbs(), static_cast<typename base_type::local_limb_type>(val), checked_type()); - ++s; - } - } - if(isneg) - this->negate(); - } - void do_assign_string(const char* s, const mpl::false_&) - { - using default_ops::eval_multiply; - using default_ops::eval_add; - std::size_t n = s ? std::strlen(s) : 0; - *this = static_cast<limb_type>(0u); - unsigned radix = 10; - bool isneg = false; - if(n && (*s == '-')) - { - --n; - ++s; - isneg = true; - } - if(n && (*s == '0')) - { - if((n > 1) && ((s[1] == 'x') || (s[1] == 'X'))) - { - radix = 16; - s +=2; - n -= 2; - } - else - { - radix = 8; - n -= 1; - } - } - - - - - - cpp_int_backend result; - if(n) - { - if(radix == 16) - { - while(*s == '0') ++s; - std::size_t bitcount = 4 * std::strlen(s); - limb_type val; - std::size_t limb, shift; - if(bitcount > 4) - bitcount -= 4; - else - bitcount = 0; - std::size_t newsize = bitcount / (sizeof(limb_type) * 8) + 1; - result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); - std::memset(result.limbs(), 0, result.size() * sizeof(limb_type)); - while(*s) - { - if(*s >= '0' && *s <= '9') - val = *s - '0'; - else if(*s >= 'a' && *s <= 'f') - val = 10 + *s - 'a'; - else if(*s >= 'A' && *s <= 'F') - val = 10 + *s - 'A'; - else - { - ::boost::exception_detail::throw_exception_(std::runtime_error("Unexpected content found while parsing character string."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1439); - } - limb = bitcount / (sizeof(limb_type) * 8); - shift = bitcount % (sizeof(limb_type) * 8); - val <<= shift; - if(result.size() > limb) - { - result.limbs()[limb] |= val; - } - ++s; - bitcount -= 4; - } - result.normalize(); - } - else if(radix == 8) - { - while(*s == '0') ++s; - std::size_t bitcount = 3 * std::strlen(s); - limb_type val; - std::size_t limb, shift; - if(bitcount > 3) - bitcount -= 3; - else - bitcount = 0; - std::size_t newsize = bitcount / (sizeof(limb_type) * 8) + 1; - result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); - std::memset(result.limbs(), 0, result.size() * sizeof(limb_type)); - while(*s) - { - if(*s >= '0' && *s <= '7') - val = *s - '0'; - else - { - ::boost::exception_detail::throw_exception_(std::runtime_error("Unexpected content found while parsing character string."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1472); - } - limb = bitcount / (sizeof(limb_type) * 8); - shift = bitcount % (sizeof(limb_type) * 8); - if(result.size() > limb) - { - result.limbs()[limb] |= (val << shift); - if(shift > sizeof(limb_type) * 8 - 3) - { - - val >>= (sizeof(limb_type) * 8 - shift); - if(val) - { - - if(limb + 1 == newsize) - result.resize(static_cast<unsigned>(newsize + 1), static_cast<unsigned>(newsize + 1)); - if(result.size() > limb + 1) - { - result.limbs()[limb + 1] |= val; - } - } - } - } - ++s; - bitcount -= 3; - } - result.normalize(); - } - else - { - - - limb_type block_mult = max_block_10; - while(*s) - { - limb_type block = 0; - for(unsigned i = 0; i < digits_per_block_10; ++i) - { - limb_type val; - if(*s >= '0' && *s <= '9') - val = *s - '0'; - else - ::boost::exception_detail::throw_exception_(std::runtime_error("Unexpected character encountered in input."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1514); - block *= 10; - block += val; - if(!*++s) - { - block_mult = block_multiplier(i); - break; - } - } - eval_multiply(result, block_mult); - eval_add(result, block); - } - } - } - if(isneg) - result.negate(); - result.swap(*this); - } -public: - cpp_int_backend& operator = (const char* s) - { - do_assign_string(s, trivial_tag()); - return *this; - } - inline void swap(cpp_int_backend& o) noexcept - { - this->do_swap(o); - } -private: - std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::false_&)const - { - typedef typename mpl::if_c<sizeof(typename base_type::local_limb_type) == 1, unsigned, typename base_type::local_limb_type>::type io_type; - if(this->sign() && (((f & std::ios_base::hex) == std::ios_base::hex) || ((f & std::ios_base::oct) == std::ios_base::oct))) - ::boost::exception_detail::throw_exception_(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1547); - std::stringstream ss; - ss.flags(f & ~std::ios_base::showpos); - ss << static_cast<io_type>(*this->limbs()); - std::string result; - if(this->sign()) - result += '-'; - else if(f & std::ios_base::showpos) - result += '+'; - result += ss.str(); - return result; - } - std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::true_&)const - { - - int base = 10; - if((f & std::ios_base::oct) == std::ios_base::oct) - base = 8; - else if((f & std::ios_base::hex) == std::ios_base::hex) - base = 16; - std::string result; - - unsigned Bits = sizeof(typename base_type::local_limb_type) * 8; - - if(base == 8 || base == 16) - { - if(this->sign()) - ::boost::exception_detail::throw_exception_(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1574); - limb_type shift = base == 8 ? 3 : 4; - limb_type mask = static_cast<limb_type>((1u << shift) - 1); - typename base_type::local_limb_type v = *this->limbs(); - result.assign(Bits / shift + (Bits % shift ? 1 : 0), '0'); - std::string::difference_type pos = result.size() - 1; - char letter_a = f & std::ios_base::uppercase ? 'A' : 'a'; - for(unsigned i = 0; i < Bits / shift; ++i) - { - char c = '0' + static_cast<char>(v & mask); - if(c > '9') - c += letter_a - '9' - 1; - result[pos--] = c; - v >>= shift; - } - if(Bits % shift) - { - mask = static_cast<limb_type>((1u << (Bits % shift)) - 1); - char c = '0' + static_cast<char>(v & mask); - if(c > '9') - c += letter_a - '9'; - result[pos] = c; - } - - - - std::string::size_type n = result.find_first_not_of('0'); - if(!result.empty() && (n == std::string::npos)) - n = result.size() - 1; - result.erase(0, n); - if(f & std::ios_base::showbase) - { - const char* pp = base == 8 ? "0" : (f & std::ios_base::uppercase) ? "0X" : "0x"; - result.insert(static_cast<std::string::size_type>(0), pp); - } - } - else - { - result.assign(Bits / 3 + 1, '0'); - std::string::difference_type pos = result.size() - 1; - typename base_type::local_limb_type v(*this->limbs()); - bool neg = false; - if(this->sign()) - { - neg = true; - } - while(v) - { - result[pos] = (v % 10) + '0'; - --pos; - v /= 10; - } - std::string::size_type n = result.find_first_not_of('0'); - result.erase(0, n); - if(result.empty()) - result = "0"; - if(neg) - result.insert(static_cast<std::string::size_type>(0), 1, '-'); - else if(f & std::ios_base::showpos) - result.insert(static_cast<std::string::size_type>(0), 1, '+'); - } - return result; - } - std::string do_get_string(std::ios_base::fmtflags f, const mpl::true_&)const - { - - return do_get_trivial_string(f, mpl::bool_<is_same<typename base_type::local_limb_type, double_limb_type>::value>()); - - - - } - std::string do_get_string(std::ios_base::fmtflags f, const mpl::false_&)const - { - using default_ops::eval_get_sign; - int base = 10; - if((f & std::ios_base::oct) == std::ios_base::oct) - base = 8; - else if((f & std::ios_base::hex) == std::ios_base::hex) - base = 16; - std::string result; - - unsigned Bits = this->size() * base_type::limb_bits; - - if(base == 8 || base == 16) - { - if(this->sign()) - ::boost::exception_detail::throw_exception_(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int.hpp",1660); - limb_type shift = base == 8 ? 3 : 4; - limb_type mask = static_cast<limb_type>((1u << shift) - 1); - cpp_int_backend t(*this); - result.assign(Bits / shift + ((Bits % shift) ? 1 : 0), '0'); - std::string::difference_type pos = result.size() - 1; - char letter_a = f & std::ios_base::uppercase ? 'A' : 'a'; - for(unsigned i = 0; i < Bits / shift; ++i) - { - char c = '0' + static_cast<char>(t.limbs()[0] & mask); - if(c > '9') - c += letter_a - '9' - 1; - result[pos--] = c; - eval_right_shift(t, shift); - } - if(Bits % shift) - { - mask = static_cast<limb_type>((1u << (Bits % shift)) - 1); - char c = '0' + static_cast<char>(t.limbs()[0] & mask); - if(c > '9') - c += letter_a - '9'; - result[pos] = c; - } - - - - std::string::size_type n = result.find_first_not_of('0'); - if(!result.empty() && (n == std::string::npos)) - n = result.size() - 1; - result.erase(0, n); - if(f & std::ios_base::showbase) - { - const char* pp = base == 8 ? "0" : (f & std::ios_base::uppercase) ? "0X" : "0x"; - result.insert(static_cast<std::string::size_type>(0), pp); - } - } - else - { - result.assign(Bits / 3 + 1, '0'); - std::string::difference_type pos = result.size() - 1; - cpp_int_backend t(*this); - cpp_int_backend r; - bool neg = false; - if(t.sign()) - { - t.negate(); - neg = true; - } - if(this->size() == 1) - { - result = boost::lexical_cast<std::string>(t.limbs()[0]); - } - else - { - cpp_int_backend block10; - block10 = max_block_10; - while(eval_get_sign(t) != 0) - { - cpp_int_backend t2; - divide_unsigned_helper(&t2, t, block10, r); - t = t2; - limb_type v = r.limbs()[0]; - for(unsigned i = 0; i < digits_per_block_10; ++i) - { - char c = '0' + v % 10; - v /= 10; - result[pos] = c; - if(pos-- == 0) - break; - } - } - } - std::string::size_type n = result.find_first_not_of('0'); - result.erase(0, n); - if(result.empty()) - result = "0"; - if(neg) - result.insert(static_cast<std::string::size_type>(0), 1, '-'); - else if(f & std::ios_base::showpos) - result.insert(static_cast<std::string::size_type>(0), 1, '+'); - } - return result; - } -public: - std::string str(std::streamsize , std::ios_base::fmtflags f)const - { - return do_get_string(f, trivial_tag()); - } -private: - template <class Container> - void construct_from_container(const Container& c, const mpl::false_&) - { - - - - unsigned newsize = static_cast<unsigned>(c.size() / sizeof(limb_type)); - if(c.size() % sizeof(limb_type)) - { - ++newsize; - } - if(newsize) - { - this->resize(newsize, newsize); - std::memset(this->limbs(), 0, this->size()); - typename Container::const_iterator i(c.begin()), j(c.end()); - unsigned byte_location = static_cast<unsigned>(c.size() - 1); - while(i != j) - { - unsigned limb = byte_location / sizeof(limb_type); - unsigned shift = (byte_location % sizeof(limb_type)) * 8; - if(this->size() > limb) - this->limbs()[limb] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift; - ++i; - --byte_location; - } - } - } - template <class Container> - void construct_from_container(const Container& c, const mpl::true_&) - { - - - - typedef typename base_type::local_limb_type local_limb_type; - *this->limbs() = 0; - if(c.size()) - { - typename Container::const_iterator i(c.begin()), j(c.end()); - unsigned byte_location = static_cast<unsigned>(c.size() - 1); - while(i != j) - { - unsigned limb = byte_location / sizeof(local_limb_type); - unsigned shift = (byte_location % sizeof(local_limb_type)) * 8; - if(limb == 0) - this->limbs()[0] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift; - ++i; - --byte_location; - } - } - } -public: - template <class Container> - cpp_int_backend(const Container& c, typename boost::enable_if_c<boost::multiprecision::detail::is_byte_container<Container>::value>::type const* = 0) - { - - - - construct_from_container(c, trivial_tag()); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::false_&)const noexcept - { - if(this->sign() != o.sign()) - return this->sign() ? -1 : 1; - - - int result = compare_unsigned(o); - - if(this->sign()) - result = -result; - return result; - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::false_&)const - { - cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t(*this); - return t.compare(o); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::true_&)const - { - cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t(o); - return compare(t); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::true_&)const noexcept - { - if(this->sign()) - { - if(o.sign()) - { - return *this->limbs() < *o.limbs() ? 1 : (*this->limbs() > *o.limbs() ? -1 : 0); - } - else - return -1; - } - else - { - if(o.sign()) - return 1; - return *this->limbs() < *o.limbs() ? -1 : (*this->limbs() > *o.limbs() ? 1 : 0); - } - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const noexcept - { - typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> t1; - typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value> t2; - return compare_imp(o, t1(), t2()); - } - template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> - int compare_unsigned(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const noexcept - { - if(this->size() != o.size()) - { - return this->size() > o.size() ? 1 : -1; - } - typename base_type::const_limb_pointer pa = this->limbs(); - typename base_type::const_limb_pointer pb = o.limbs(); - for(int i = this->size() - 1; i >= 0; --i) - { - if(pa[i] != pb[i]) - return pa[i] > pb[i] ? 1 : -1; - } - return 0; - } - template <class Arithmetic> - inline typename boost::enable_if<is_arithmetic<Arithmetic>, int>::type compare(Arithmetic i)const - { - - cpp_int_backend t; - t = i; - return compare(t); - } -}; - -} - -namespace default_ops{ - -template <class Backend> -struct double_precision_type; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct double_precision_type<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > -{ - typedef typename mpl::if_c< - backends::is_fixed_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, - backends::cpp_int_backend< - (is_void<Allocator>::value ? - 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value - : MinBits), - 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, - SignType, - Checked, - Allocator>, - backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> - >::type type; -}; - - -} - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked> -struct expression_template_default<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, void> > -{ - static const expression_template_option value = et_off; -}; - -using boost::multiprecision::backends::cpp_int_backend; - -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -struct number_category<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public mpl::int_<number_kind_integer>{}; - -typedef number<cpp_int_backend<> > cpp_int; -typedef rational_adaptor<cpp_int_backend<> > cpp_rational_backend; -typedef number<cpp_rational_backend> cpp_rational; - - -typedef number<cpp_int_backend<128, 128, unsigned_magnitude, unchecked, void> > uint128_t; -typedef number<cpp_int_backend<256, 256, unsigned_magnitude, unchecked, void> > uint256_t; -typedef number<cpp_int_backend<512, 512, unsigned_magnitude, unchecked, void> > uint512_t; -typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, unchecked, void> > uint1024_t; - - -typedef number<cpp_int_backend<128, 128, signed_magnitude, unchecked, void> > int128_t; -typedef number<cpp_int_backend<256, 256, signed_magnitude, unchecked, void> > int256_t; -typedef number<cpp_int_backend<512, 512, signed_magnitude, unchecked, void> > int512_t; -typedef number<cpp_int_backend<1024, 1024, signed_magnitude, unchecked, void> > int1024_t; - - -typedef number<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_int; -typedef rational_adaptor<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_rational_backend; -typedef number<checked_cpp_rational_backend> checked_cpp_rational; - -typedef number<cpp_int_backend<128, 128, unsigned_magnitude, checked, void> > checked_uint128_t; -typedef number<cpp_int_backend<256, 256, unsigned_magnitude, checked, void> > checked_uint256_t; -typedef number<cpp_int_backend<512, 512, unsigned_magnitude, checked, void> > checked_uint512_t; -typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, checked, void> > checked_uint1024_t; - - -typedef number<cpp_int_backend<128, 128, signed_magnitude, checked, void> > checked_int128_t; -typedef number<cpp_int_backend<256, 256, signed_magnitude, checked, void> > checked_int256_t; -typedef number<cpp_int_backend<512, 512, signed_magnitude, checked, void> > checked_int512_t; -typedef number<cpp_int_backend<1024, 1024, signed_magnitude, checked, void> > checked_int1024_t; -# 1970 "/usr/include/boost/multiprecision/cpp_int.hpp" 3 4 -}} - - - - -# 1 "/usr/include/boost/multiprecision/cpp_int/comparison.hpp" 1 3 4 -# 13 "/usr/include/boost/multiprecision/cpp_int/comparison.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ -# 23 "/usr/include/boost/multiprecision/cpp_int/comparison.hpp" 3 4 -template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, - bool - >::type - eval_eq(const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& a, const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& b) noexcept -{ - - - - - - - return (a.sign() == b.sign()) - && (a.size() == b.size()) - && std::equal(a.limbs(), a.limbs() + a.size(), b.limbs()); - -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value, - bool - >::type - eval_eq(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& b) noexcept -{ - - - - - - return (a.sign() == b.sign()) - && (a.size() == b.size()) - && std::equal(a.limbs(), a.limbs() + a.size(), b.limbs()); - -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - return (a.sign() == false) - && (a.size() == 1) - && (*a.limbs() == b); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - return (a.sign() == (b < 0)) - && (a.size() == 1) - && (*a.limbs() == boost::multiprecision::detail::unsigned_abs(b)); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - return (a.size() == 1) - && (*a.limbs() == b); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - return (b < 0) ? eval_eq(a, cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>(b)) : eval_eq(a, static_cast<limb_type>(b)); -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - if(a.sign()) - return true; - if(a.size() > 1) - return false; - return *a.limbs() < b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - if((b == 0) || (a.sign() != (b < 0))) - return a.sign(); - if(a.sign()) - { - if(a.size() > 1) - return true; - return *a.limbs() > boost::multiprecision::detail::unsigned_abs(b); - } - else - { - if(a.size() > 1) - return false; - return *a.limbs() < boost::multiprecision::detail::unsigned_abs(b); - } -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - if(a.size() > 1) - return false; - return *a.limbs() < b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - return (b < 0) ? a.compare(b) < 0 : eval_lt(a, static_cast<limb_type>(b)); -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - if(a.sign()) - return false; - if(a.size() > 1) - return true; - return *a.limbs() > b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - if(b == 0) - return !a.sign() && ((a.size() > 1) || *a.limbs()); - if(a.sign() != (b < 0)) - return !a.sign(); - if(a.sign()) - { - if(a.size() > 1) - return false; - return *a.limbs() < boost::multiprecision::detail::unsigned_abs(b); - } - else - { - if(a.size() > 1) - return true; - return *a.limbs() > boost::multiprecision::detail::unsigned_abs(b); - } -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept -{ - if(a.size() > 1) - return true; - return *a.limbs() > b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept -{ - return (b < 0) ? a.compare(b) > 0 : eval_gt(a, static_cast<limb_type>(b)); -} - - - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::value eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& b) noexcept -{ - return (a.sign() == b.sign()) && (*a.limbs() == *b.limbs()); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::value eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept -{ - return *a.limbs() == *b.limbs(); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept -{ - return !a.sign() && (*a.limbs() == b); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept -{ - return (a.sign() == (b < 0)) && (*a.limbs() == boost::multiprecision::detail::unsigned_abs(b)); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept -{ - return *a.limbs() == b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept -{ - typedef typename make_unsigned<S>::type ui_type; - if(b < 0) - { - cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b); - return *a.limbs() == *t.limbs(); - } - else - { - return *a.limbs() == static_cast<ui_type>(b); - } -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept -{ - if(a.sign() != b.sign()) - return a.sign(); - return a.sign() ? *a.limbs() > *b.limbs() : *a.limbs() < *b.limbs(); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept -{ - return *a.limbs() < *b.limbs(); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept -{ - if(a.sign()) - return true; - return *a.limbs() < b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept -{ - if(a.sign() != (b < 0)) - return a.sign(); - return a.sign() ? (*a.limbs() > boost::multiprecision::detail::unsigned_abs(b)) : (*a.limbs() < boost::multiprecision::detail::unsigned_abs(b)); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept -{ - return *a.limbs() < b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept -{ - typedef typename make_unsigned<S>::type ui_type; - if(b < 0) - { - cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b); - return *a.limbs() < *t.limbs(); - } - else - { - return *a.limbs() < static_cast<ui_type>(b); - } -} - -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& b) noexcept -{ - if(a.sign() != b.sign()) - return !a.sign(); - return a.sign() ? *a.limbs() < *b.limbs() : *a.limbs() > *b.limbs(); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept -{ - return *a.limbs() > *b.limbs(); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept -{ - if(a.sign()) - return false; - return *a.limbs() > b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept -{ - if(a.sign() != (b < 0)) - return !a.sign(); - return a.sign() ? (*a.limbs() < boost::multiprecision::detail::unsigned_abs(b)) : (*a.limbs() > boost::multiprecision::detail::unsigned_abs(b)); -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class U> -inline typename enable_if_c< - is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept -{ - return *a.limbs() > b; -} -template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class S> -inline typename enable_if_c< - is_signed<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value, - bool - >::type eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept -{ - typedef typename make_unsigned<S>::type ui_type; - if(b < 0) - { - cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b); - return *a.limbs() > *t.limbs(); - } - else - { - return *a.limbs() > static_cast<ui_type>(b); - } -} - - - - - -}}} -# 1976 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/add.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/add.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ -# 21 "/usr/include/boost/multiprecision/cpp_int/add.hpp" 3 4 -template <class CppInt1, class CppInt2, class CppInt3> -inline void add_unsigned(CppInt1& result, const CppInt2& a, const CppInt3& b) noexcept((is_non_throwing_cpp_int<CppInt1>::value)) -{ - using std::swap; - - - double_limb_type carry = 0; - unsigned m, x; - unsigned as = a.size(); - unsigned bs = b.size(); - minmax(as, bs, m, x); - if(x == 1) - { - bool s = a.sign(); - result = static_cast<double_limb_type>(*a.limbs()) + static_cast<double_limb_type>(*b.limbs()); - result.sign(s); - return; - } - result.resize(x, x); - typename CppInt2::const_limb_pointer pa = a.limbs(); - typename CppInt3::const_limb_pointer pb = b.limbs(); - typename CppInt1::limb_pointer pr = result.limbs(); - typename CppInt1::limb_pointer pr_end = pr + m; - - if(as < bs) - swap(pa, pb); - - - while(pr != pr_end) - { - carry += static_cast<double_limb_type>(*pa) + static_cast<double_limb_type>(*pb); - - - - *pr = static_cast<limb_type>(carry); - - carry >>= CppInt1::limb_bits; - ++pr, ++pa, ++pb; - } - pr_end += x - m; - - while(pr != pr_end) - { - if(!carry) - { - if(pa != pr) - - - - std::copy(pa, pa + (pr_end - pr), pr); - - break; - } - carry += static_cast<double_limb_type>(*pa); - - - - *pr = static_cast<limb_type>(carry); - - carry >>= CppInt1::limb_bits; - ++pr, ++pa; - } - if(carry) - { - - result.resize(x + 1, x + 1); - if(result.size() > x) - result.limbs()[x] = static_cast<limb_type>(carry); - } - result.normalize(); - result.sign(a.sign()); -} - - - -template <class CppInt1, class CppInt2> -inline void add_unsigned(CppInt1& result, const CppInt2& a, const limb_type& o) noexcept((is_non_throwing_cpp_int<CppInt1>::value)) -{ - - - if(&result != &a) - result.resize(a.size(), a.size()); - double_limb_type carry = o; - typename CppInt1::limb_pointer pr = result.limbs(); - typename CppInt2::const_limb_pointer pa = a.limbs(); - unsigned i = 0; - - for(; carry && (i < result.size()); ++i) - { - carry += static_cast<double_limb_type>(pa[i]); - - - - pr[i] = static_cast<limb_type>(carry); - - carry >>= CppInt1::limb_bits; - } - - if(&a != &result) - { - for(; i < result.size(); ++i) - pr[i] = pa[i]; - } - if(carry) - { - - unsigned x = result.size(); - result.resize(x + 1, x + 1); - if(result.size() > x) - result.limbs()[x] = static_cast<limb_type>(carry); - } - result.normalize(); - result.sign(a.sign()); -} - - - -template <class CppInt1, class CppInt2, class CppInt3> -inline void subtract_unsigned(CppInt1& result, const CppInt2& a, const CppInt3& b) noexcept((is_non_throwing_cpp_int<CppInt1>::value)) -{ - using std::swap; - - - double_limb_type borrow = 0; - unsigned m, x; - minmax(a.size(), b.size(), m, x); - - - - if(x == 1) - { - bool s = a.sign(); - limb_type al = *a.limbs(); - limb_type bl = *b.limbs(); - if(bl > al) - { - std::swap(al, bl); - s = !s; - } - result = al - bl; - result.sign(s); - return; - } - - - int c = a.compare_unsigned(b); - - result.resize(x, x); - - typename CppInt2::const_limb_pointer pa = a.limbs(); - typename CppInt3::const_limb_pointer pb = b.limbs(); - typename CppInt1::limb_pointer pr = result.limbs(); - bool swapped = false; - if(c < 0) - { - swap(pa, pb); - swapped = true; - } - else if(c == 0) - { - result = static_cast<limb_type>(0); - return; - } - - unsigned i = 0; - - while(i < m) - { - borrow = static_cast<double_limb_type>(pa[i]) - static_cast<double_limb_type>(pb[i]) - borrow; - pr[i] = static_cast<limb_type>(borrow); - borrow = (borrow >> CppInt1::limb_bits) & 1u; - ++i; - } - - while(borrow && (i < x)) - { - borrow = static_cast<double_limb_type>(pa[i]) - borrow; - pr[i] = static_cast<limb_type>(borrow); - borrow = (borrow >> CppInt1::limb_bits) & 1u; - ++i; - } - - if((x != i) && (pa != pr)) - - - - std::copy(pa + i, pa + x, pr + i); - - (static_cast <bool> (0 == borrow) ? void (0) : __assert_fail ("0 == borrow", "/usr/include/boost/multiprecision/cpp_int/add.hpp", 209, __extension__ __PRETTY_FUNCTION__)); - - - - - result.normalize(); - result.sign(a.sign()); - if(swapped) - result.negate(); -} - - - -template <class CppInt1, class CppInt2> -inline void subtract_unsigned(CppInt1& result, const CppInt2& a, const limb_type& b) noexcept((is_non_throwing_cpp_int<CppInt1>::value)) -{ - - - static const double_limb_type borrow = static_cast<double_limb_type>(CppInt1::max_limb_value) + 1; - result.resize(a.size(), a.size()); - typename CppInt1::limb_pointer pr = result.limbs(); - typename CppInt2::const_limb_pointer pa = a.limbs(); - if(*pa >= b) - { - *pr = *pa - b; - if(&result != &a) - { - - - - std::copy(pa + 1, pa + a.size(), pr + 1); - - result.sign(a.sign()); - } - else if((result.size() == 1) && (*pr == 0)) - { - result.sign(false); - } - } - else if(result.size() == 1) - { - *pr = b - *pa; - result.sign(!a.sign()); - } - else - { - *pr = static_cast<limb_type>((borrow + *pa) - b); - unsigned i = 1; - while(!pa[i]) - { - pr[i] = CppInt1::max_limb_value; - ++i; - } - pr[i] = pa[i] - 1; - if(&result != &a) - { - ++i; - - - - std::copy(pa + i, pa + a.size(), pr + i); - - } - result.normalize(); - result.sign(a.sign()); - } -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_add(result, result, o); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(a.sign() != b.sign()) - { - subtract_unsigned(result, a, b); - return; - } - add_unsigned(result, a, b); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_add(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(result.sign()) - { - subtract_unsigned(result, result, o); - } - else - add_unsigned(result, result, o); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(a.sign()) - { - subtract_unsigned(result, a, o); - } - else - add_unsigned(result, a, o); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const signed_limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(o < 0) - eval_subtract(result, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(o))); - else if(o > 0) - eval_add(result, static_cast<limb_type>(o)); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const signed_limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(o < 0) - eval_subtract(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(o))); - else if(o > 0) - eval_add(result, a, static_cast<limb_type>(o)); - else if(&result != &a) - result = a; -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(result.sign()) - { - add_unsigned(result, result, o); - } - else - subtract_unsigned(result, result, o); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(a.sign()) - { - add_unsigned(result, a, o); - } - else - { - subtract_unsigned(result, a, o); - } -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const signed_limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(o) - { - if(o < 0) - eval_add(result, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(o))); - else - eval_subtract(result, static_cast<limb_type>(o)); - } -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const signed_limb_type& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(o) - { - if(o < 0) - eval_add(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(o))); - else - eval_subtract(result, a, static_cast<limb_type>(o)); - } - else if(&result != &a) - result = a; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_increment(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - static const limb_type one = 1; - if(!result.sign() && (result.limbs()[0] < cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)) - ++result.limbs()[0]; - else if (result.sign() && result.limbs()[0]) - { - --result.limbs()[0]; - if (!result.limbs()[0]) - result.sign(false); - } - else - eval_add(result, one); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_decrement(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - static const limb_type one = 1; - if(!result.sign() && result.limbs()[0]) - --result.limbs()[0]; - else if (result.sign() && (result.limbs()[0] < cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)) - ++result.limbs()[0]; - else - eval_subtract(result, one); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_subtract(result, result, o); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(a.sign() != b.sign()) - { - add_unsigned(result, a, b); - return; - } - subtract_unsigned(result, a, b); -} - - - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value) - >::type - eval_add( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(result.sign() != o.sign()) - { - if(*o.limbs() > *result.limbs()) - { - *result.limbs() = detail::checked_subtract(*o.limbs(), *result.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.negate(); - } - else - *result.limbs() = detail::checked_subtract(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - } - else - *result.limbs() = detail::checked_add(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_add(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_add(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value) - >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(result.sign() != o.sign()) - { - *result.limbs() = detail::checked_add(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - } - else if(*result.limbs() < *o.limbs()) - { - *result.limbs() = detail::checked_subtract(*o.limbs(), *result.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.negate(); - } - else - *result.limbs() = detail::checked_subtract(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_subtract( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_subtract(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - - - - - -}}} -# 1977 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/multiply.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/multiply.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ - - - - - - - template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(!val) - { - result = static_cast<limb_type>(0); - return; - } - if((void*)&a != (void*)&result) - result.resize(a.size(), a.size()); - double_limb_type carry = 0; - typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer p = result.limbs(); - typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pe = result.limbs() + result.size(); - typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs(); - while(p != pe) - { - carry += static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(val); - - - - *p = static_cast<limb_type>(carry); - - carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - ++p, ++pa; - } - if(carry) - { - unsigned i = result.size(); - result.resize(i + 1, i + 1); - if(result.size() > i) - result.limbs()[i] = static_cast<limb_type>(carry); - } - result.sign(a.sign()); - if(!cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable) - result.normalize(); -} - - - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& , unsigned ){} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, class Allocator1> -inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, checked, Allocator1>& result, unsigned required) -{ - if(result.size() < required) - result.resize(required, required); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - - - - - - unsigned as = a.size(); - unsigned bs = b.size(); - typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs(); - typename cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>::const_limb_pointer pb = b.limbs(); - if(as == 1) - { - bool s = b.sign() != a.sign(); - if(bs == 1) - { - result = static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(*pb); - } - else - { - limb_type l = *pa; - eval_multiply(result, b, l); - } - result.sign(s); - return; - } - if(bs == 1) - { - bool s = b.sign() != a.sign(); - limb_type l = *pb; - eval_multiply(result, a, l); - result.sign(s); - return; - } - - if((void*)&result == (void*)&a) - { - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(a); - eval_multiply(result, t, b); - return; - } - if((void*)&result == (void*)&b) - { - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(b); - eval_multiply(result, a, t); - return; - } - - result.resize(as + bs, as + bs - 1); - typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pr = result.limbs(); - - static const double_limb_type limb_max = ~static_cast<limb_type>(0u); - static const double_limb_type double_limb_max = ~static_cast<double_limb_type>(0u); - static_assert(double_limb_max - 2 * limb_max >= limb_max * limb_max, "double_limb_max - 2 * limb_max >= limb_max * limb_max"); - - double_limb_type carry = 0; - std::memset(pr, 0, result.size() * sizeof(limb_type)); - for(unsigned i = 0; i < as; ++i) - { - unsigned inner_limit = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable ? bs : (std::min)(result.size() - i, bs); - unsigned j; - for(j = 0; j < inner_limit; ++j) - { - (static_cast <bool> (i+j < result.size()) ? void (0) : __assert_fail ("i+j < result.size()", "/usr/include/boost/multiprecision/cpp_int/multiply.hpp", 142, __extension__ __PRETTY_FUNCTION__)); - - (static_cast <bool> (!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry > static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value) * static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value))) ? void (0) : __assert_fail ("!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry > static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value) * static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value))", "/usr/include/boost/multiprecision/cpp_int/multiply.hpp", 144, __extension__ __PRETTY_FUNCTION__)) - - - ; - - carry += static_cast<double_limb_type>(pa[i]) * static_cast<double_limb_type>(pb[j]); - (static_cast <bool> (!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j])) ? void (0) : __assert_fail ("!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j])", "/usr/include/boost/multiprecision/cpp_int/multiply.hpp", 150, __extension__ __PRETTY_FUNCTION__)); - carry += pr[i + j]; - - - - pr[i + j] = static_cast<limb_type>(carry); - - carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - (static_cast <bool> (carry <= (cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)) ? void (0) : __assert_fail ("carry <= (cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)", "/usr/include/boost/multiprecision/cpp_int/multiply.hpp", 158, __extension__ __PRETTY_FUNCTION__)); - } - if(carry) - { - resize_for_carry(result, i + j + 1); - if(i + j < result.size()) - - - - pr[i + j] = static_cast<limb_type>(carry); - - } - carry = 0; - } - result.normalize(); - - - - result.sign(a.sign() != b.sign()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_multiply(result, result, a); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_multiply(result, result, val); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const double_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(val <= (std::numeric_limits<limb_type>::max)()) - { - eval_multiply(result, a, static_cast<limb_type>(val)); - } - else - { - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val); - - - - - eval_multiply(result, a, t); - } -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const double_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_multiply(result, result, val); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const signed_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(val > 0) - eval_multiply(result, a, static_cast<limb_type>(val)); - else - { - eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val))); - result.negate(); - } -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_multiply(result, result, val); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const signed_double_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - if(val > 0) - { - if(val <= (std::numeric_limits<limb_type>::max)()) - { - eval_multiply(result, a, static_cast<limb_type>(val)); - return; - } - } - else if(val >= -static_cast<signed_double_limb_type>((std::numeric_limits<limb_type>::max)())) - { - eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val))); - result.negate(); - return; - } - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val); - - - - - eval_multiply(result, a, t); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_double_limb_type& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - eval_multiply(result, result, val); -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value) - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.sign(result.sign() != o.sign()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value) - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.sign(a.sign() != b.sign()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - signed_double_limb_type a, signed_double_limb_type b) -{ - static const signed_double_limb_type mask = ~static_cast<limb_type>(0); - static const unsigned limb_bits = sizeof(limb_type) * 8; - bool s = false; - double_limb_type w, x, y, z; - if(a < 0) - { - a = -a; - s = true; - } - if(b < 0) - { - b = -b; - s = !s; - } - w = a & mask; - x = a >> limb_bits; - y = b & mask; - z = b >> limb_bits; - - result.resize(4, 4); - limb_type* pr = result.limbs(); - - double_limb_type carry = w * y; -# 392 "/usr/include/boost/multiprecision/cpp_int/multiply.hpp" 3 4 - pr[0] = static_cast<limb_type>(carry); - carry >>= limb_bits; - carry += w * z + x * y; - pr[1] = static_cast<limb_type>(carry); - carry >>= limb_bits; - carry += x * z; - pr[2] = static_cast<limb_type>(carry); - pr[3] = static_cast<limb_type>(carry >> limb_bits); - - result.sign(s); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - double_limb_type a, double_limb_type b) -{ - static const signed_double_limb_type mask = ~static_cast<limb_type>(0); - static const unsigned limb_bits = sizeof(limb_type) * 8; - - double_limb_type w, x, y, z; - w = a & mask; - x = a >> limb_bits; - y = b & mask; - z = b >> limb_bits; - - result.resize(4, 4); - limb_type* pr = result.limbs(); - - double_limb_type carry = w * y; -# 440 "/usr/include/boost/multiprecision/cpp_int/multiply.hpp" 3 4 - pr[0] = static_cast<limb_type>(carry); - carry >>= limb_bits; - carry += w * z; - pr[1] = static_cast<limb_type>(carry); - carry >>= limb_bits; - pr[2] = static_cast<limb_type>(carry); - carry = x * y + pr[1]; - pr[1] = static_cast<limb_type>(carry); - carry >>= limb_bits; - carry += pr[2] + x * z; - pr[2] = static_cast<limb_type>(carry); - pr[3] = static_cast<limb_type>(carry >> limb_bits); - - result.sign(false); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, - unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - >::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& a, - cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& b) -{ - typedef typename boost::multiprecision::detail::canonical<typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type, cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::type canonical_type; - eval_multiply(result, static_cast<canonical_type>(*a.limbs()), static_cast<canonical_type>(*b.limbs())); - result.sign(a.sign() != b.sign()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class SI> -inline typename enable_if_c<is_signed<SI>::value && (sizeof(SI) <= sizeof(signed_double_limb_type) / 2)>::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - SI a, SI b) -{ - result = static_cast<signed_double_limb_type>(a) * static_cast<signed_double_limb_type>(b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class UI> -inline typename enable_if_c<is_unsigned<UI>::value && (sizeof(UI) <= sizeof(signed_double_limb_type) / 2)>::type - eval_multiply( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - UI a, UI b) -{ - result = static_cast<double_limb_type>(a) * static_cast<double_limb_type>(b); -} - - - - - -}}} -# 1978 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/divide.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/divide.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ - -template <class CppInt1, class CppInt2, class CppInt3> -void divide_unsigned_helper( - CppInt1* result, - const CppInt2& x, - const CppInt3& y, - CppInt1& r) -{ - if(((void*)result == (void*)&x) || ((void*)&r == (void*)&x)) - { - CppInt2 t(x); - divide_unsigned_helper(result, t, y, r); - return; - } - if(((void*)result == (void*)&y) || ((void*)&r == (void*)&y)) - { - CppInt3 t(y); - divide_unsigned_helper(result, x, t, r); - return; - } -# 52 "/usr/include/boost/multiprecision/cpp_int/divide.hpp" 3 4 - using default_ops::eval_subtract; - - if(result == &r) - { - CppInt1 rem; - divide_unsigned_helper(result, x, y, rem); - r = rem; - return; - } - - - - - limb_type y_order = y.size() - 1; - - if(y_order == 0) - { - - - - - - divide_unsigned_helper(result, x, y.limbs()[y_order], r); - return; - } - - typename CppInt2::const_limb_pointer px = x.limbs(); - typename CppInt3::const_limb_pointer py = y.limbs(); - - limb_type r_order = x.size() - 1; - if((r_order == 0) && (*px == 0)) - { - - r = x; - if(result) - *result = x; - return; - } - - r = x; - r.sign(false); - if(result) - *result = static_cast<limb_type>(0u); - - - - - - if(r_order <= y_order) - { - if((r_order < y_order) || (r.compare_unsigned(y) < 0)) - { - return; - } - } - - CppInt1 t; - bool r_neg = false; - - - - - if(r_order == 0) - { - if(result) - { - *result = px[0] / py[0]; - } - r = px[0] % py[0]; - return; - } - else if(r_order == 1) - { - double_limb_type a, b; - a = (static_cast<double_limb_type>(px[1]) << CppInt1::limb_bits) | px[0]; - b = y_order ? - (static_cast<double_limb_type>(py[1]) << CppInt1::limb_bits) | py[0] - : py[0]; - if(result) - { - *result = a / b; - } - r = a % b; - return; - } - - - - if(result) - result->resize(1 + r_order - y_order, 1 + r_order - y_order); - typename CppInt1::const_limb_pointer prem = r.limbs(); - - typename CppInt1::limb_pointer pr - = typename CppInt1::limb_pointer(); - if(result) - { - pr = result->limbs(); - for(unsigned i = 1; i < 1 + r_order - y_order; ++i) - pr[i] = 0; - } - bool first_pass = true; - - do - { - - - - limb_type guess; - if((prem[r_order] <= py[y_order]) && (r_order > 0)) - { - double_limb_type a, b, v; - a = (static_cast<double_limb_type>(prem[r_order]) << CppInt1::limb_bits) | prem[r_order - 1]; - b = py[y_order]; - v = a / b; - if(v > CppInt1::max_limb_value) - guess = 1; - else - { - guess = static_cast<limb_type>(v); - --r_order; - } - } - else if(r_order == 0) - { - guess = prem[0] / py[y_order]; - } - else - { - double_limb_type a, b, v; - a = (static_cast<double_limb_type>(prem[r_order]) << CppInt1::limb_bits) | prem[r_order - 1]; - b = (y_order > 0) ? (static_cast<double_limb_type>(py[y_order]) << CppInt1::limb_bits) | py[y_order - 1] : (static_cast<double_limb_type>(py[y_order]) << CppInt1::limb_bits); - v = a / b; - guess = static_cast<limb_type>(v); - } - (static_cast <bool> (guess) ? void (0) : __assert_fail ("guess", "/usr/include/boost/multiprecision/cpp_int/divide.hpp", 186, __extension__ __PRETTY_FUNCTION__)); - - - - limb_type shift = r_order - y_order; - if(result) - { - if(r_neg) - { - if(pr[shift] > guess) - pr[shift] -= guess; - else - { - t.resize(shift + 1, shift + 1); - t.limbs()[shift] = guess; - for(unsigned i = 0; i < shift; ++i) - t.limbs()[i] = 0; - eval_subtract(*result, t); - } - } - else if(CppInt1::max_limb_value - pr[shift] > guess) - pr[shift] += guess; - else - { - t.resize(shift + 1, shift + 1); - t.limbs()[shift] = guess; - for(unsigned i = 0; i < shift; ++i) - t.limbs()[i] = 0; - eval_add(*result, t); - } - } - - - - - double_limb_type carry = 0; - t.resize(y.size() + shift + 1, y.size() + shift); - bool truncated_t = (t.size() != y.size() + shift + 1); - typename CppInt1::limb_pointer pt = t.limbs(); - for(unsigned i = 0; i < shift; ++i) - pt[i] = 0; - for(unsigned i = 0; i < y.size(); ++i) - { - carry += static_cast<double_limb_type>(py[i]) * static_cast<double_limb_type>(guess); - - - - pt[i + shift] = static_cast<limb_type>(carry); - - carry >>= CppInt1::limb_bits; - } - if(carry && !truncated_t) - { - - - - pt[t.size() - 1] = static_cast<limb_type>(carry); - - } - else if(!truncated_t) - { - t.resize(t.size() - 1, t.size() - 1); - } - - - - - if(truncated_t && carry) - { - - - - - - for(unsigned i = 0; i <= r_order; ++i) - r.limbs()[i] = ~prem[i]; - r.normalize(); - eval_increment(r); - eval_add(r, t); - r_neg = !r_neg; - } - else if(r.compare(t) > 0) - { - eval_subtract(r, t); - } - else - { - r.swap(t); - eval_subtract(r, t); - prem = r.limbs(); - r_neg = !r_neg; - } - - - - - if(result && first_pass) - { - first_pass = false; - while(pr[result->size() - 1] == 0) - result->resize(result->size() - 1, result->size() - 1); - } - - - - r_order = r.size() - 1; - if(r_order < y_order) - break; - } - - - while((r_order > y_order) || (r.compare_unsigned(y) >= 0)); - - - - - if(r_neg && eval_get_sign(r)) - { - - if(result) - eval_decrement(*result); - if(y.sign()) - { - r.negate(); - eval_subtract(r, y); - } - else - eval_subtract(r, y, r); - } - - (static_cast <bool> (r.compare_unsigned(y) < 0) ? void (0) : __assert_fail ("r.compare_unsigned(y) < 0", "/usr/include/boost/multiprecision/cpp_int/divide.hpp", 316, __extension__ __PRETTY_FUNCTION__)); -} - -template <class CppInt1, class CppInt2> -void divide_unsigned_helper( - CppInt1* result, - const CppInt2& x, - limb_type y, - CppInt1& r) -{ - if(((void*)result == (void*)&x) || ((void*)&r == (void*)&x)) - { - CppInt2 t(x); - divide_unsigned_helper(result, t, y, r); - return; - } - - if(result == &r) - { - CppInt1 rem; - divide_unsigned_helper(result, x, y, rem); - r = rem; - return; - } - - - - using default_ops::eval_subtract; - - if(y == 0) - { - ::boost::exception_detail::throw_exception_(std::overflow_error("Integer Division by zero."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/divide.hpp",347); - } - - - - limb_type r_order = x.size() - 1; - - - - - r = x; - r.sign(false); - typename CppInt1::limb_pointer pr = r.limbs(); - - - - - - if((r_order == 0) && (*pr < y)) - { - if(result) - *result = static_cast<limb_type>(0u); - return; - } - - - - - if(r_order == 0) - { - if(result) - { - *result = *pr / y; - result->sign(x.sign()); - } - *pr %= y; - r.sign(x.sign()); - return; - } - else if(r_order == 1) - { - double_limb_type a; - a = (static_cast<double_limb_type>(pr[r_order]) << CppInt1::limb_bits) | pr[0]; - if(result) - { - *result = a / y; - result->sign(x.sign()); - } - r = a % y; - r.sign(x.sign()); - return; - } - - - typename CppInt1::limb_pointer pres = typename CppInt1::limb_pointer(); - if(result) - { - result->resize(r_order + 1, r_order + 1); - pres = result->limbs(); - if(result->size() > r_order) - pres[r_order] = 0; - } - - do - { - - - - if((pr[r_order] < y) && r_order) - { - double_limb_type a, b; - a = (static_cast<double_limb_type>(pr[r_order]) << CppInt1::limb_bits) | pr[r_order - 1]; - b = a % y; - r.resize(r.size() - 1, r.size() - 1); - --r_order; - pr[r_order] = static_cast<limb_type>(b); - if(result) - pres[r_order] = static_cast<limb_type>(a / y); - if(r_order && pr[r_order] == 0) - { - --r_order; - r.resize(r.size() - 1, r.size() - 1); - if(result) - pres[r_order] = static_cast<limb_type>(0u); - } - } - else - { - if(result) - pres[r_order] = pr[r_order] / y; - pr[r_order] %= y; - if(r_order && pr[r_order] == 0) - { - --r_order; - r.resize(r.size() - 1, r.size() - 1); - if(result) - pres[r_order] = static_cast<limb_type>(0u); - } - } - } - - - while(r_order || (pr[r_order] >= y)); - - if(result) - { - result->normalize(); - result->sign(x.sign()); - } - r.normalize(); - r.sign(x.sign()); - - (static_cast <bool> (r.compare(y) < 0) ? void (0) : __assert_fail ("r.compare(y) < 0", "/usr/include/boost/multiprecision/cpp_int/divide.hpp", 459, __extension__ __PRETTY_FUNCTION__)); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) -{ - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> r; - bool s = a.sign() != b.sign(); - divide_unsigned_helper(&result, a, b, r); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - limb_type& b) -{ - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> r; - bool s = a.sign(); - divide_unsigned_helper(&result, a, b, r); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - signed_limb_type& b) -{ - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> r; - bool s = a.sign() != (b < 0); - divide_unsigned_helper(&result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(b)), r); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_divide(result, a, b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - limb_type b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_divide(result, a, b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - signed_limb_type b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_divide(result, a, b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) -{ - bool s = a.sign(); - divide_unsigned_helper(static_cast<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>* >(0), a, b, result); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, limb_type b) -{ - bool s = a.sign(); - divide_unsigned_helper(static_cast<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>* >(0), a, b, result); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a, - signed_limb_type b) -{ - bool s = a.sign(); - divide_unsigned_helper(static_cast<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>* >(0), a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(b)), result); - result.sign(s); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_modulus(result, a, b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - limb_type b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_modulus(result, a, b); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - signed_limb_type b) -{ - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> a(result); - eval_modulus(result, a, b); -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value) - >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) -{ - if(!*o.limbs()) - ::boost::exception_detail::throw_exception_(std::overflow_error("Division by zero."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/divide.hpp",617); - *result.limbs() /= *o.limbs(); - result.sign(result.sign() != o.sign()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_divide( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) -{ - if(!*o.limbs()) - ::boost::exception_detail::throw_exception_(std::overflow_error("Division by zero."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/divide.hpp",634); - *result.limbs() /= *o.limbs(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - >::type - eval_modulus( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) -{ - if(!*o.limbs()) - ::boost::exception_detail::throw_exception_(std::overflow_error("Division by zero."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/divide.hpp",648); - *result.limbs() %= *o.limbs(); - result.sign(result.sign()); -} - -}}} -# 1979 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 1 3 4 -# 16 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -void is_valid_bitwise_op( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::int_<checked>&) -{ - if(result.sign() || o.sign()) - ::boost::exception_detail::throw_exception_(std::range_error("Bitwise operations on negative values results in undefined behavior."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/bitwise.hpp",24); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -void is_valid_bitwise_op( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& , const mpl::int_<unchecked>&){} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -void is_valid_bitwise_op( - const cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result, const mpl::int_<checked>&) -{ - if(result.sign()) - ::boost::exception_detail::throw_exception_(std::range_error("Bitwise operations on negative values results in undefined behavior."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/bitwise.hpp",37); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -void is_valid_bitwise_op( - const cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>&, const mpl::int_<checked>&){} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -void is_valid_bitwise_op( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&, const mpl::int_<unchecked>&){} - -template <class CppInt1, class CppInt2, class Op> -void bitwise_op( - CppInt1& result, - const CppInt2& o, - Op op, const mpl::true_&) noexcept(((is_non_throwing_cpp_int<CppInt1>::value))) -{ -# 67 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 3 4 - is_valid_bitwise_op(result, o, typename CppInt1::checked_type()); - - - - unsigned rs = result.size(); - unsigned os = o.size(); - unsigned m, x; - minmax(rs, os, m, x); - result.resize(x, x); - typename CppInt1::limb_pointer pr = result.limbs(); - typename CppInt2::const_limb_pointer po = o.limbs(); - for(unsigned i = rs; i < x; ++i) - pr[i] = 0; - - limb_type next_limb = 0; - - if(!result.sign()) - { - if(!o.sign()) - { - for(unsigned i = 0; i < os; ++i) - pr[i] = op(pr[i], po[i]); - for(unsigned i = os; i < x; ++i) - pr[i] = op(pr[i], limb_type(0)); - } - else - { - - double_limb_type carry = 1; - for(unsigned i = 0; i < os; ++i) - { - carry += static_cast<double_limb_type>(~po[i]); - pr[i] = op(pr[i], static_cast<limb_type>(carry)); - carry >>= CppInt1::limb_bits; - } - for(unsigned i = os; i < x; ++i) - { - carry += static_cast<double_limb_type>(~limb_type(0)); - pr[i] = op(pr[i], static_cast<limb_type>(carry)); - carry >>= CppInt1::limb_bits; - } - - carry += static_cast<double_limb_type>(~limb_type(0)); - next_limb = op(limb_type(0), static_cast<limb_type>(carry)); - } - } - else - { - if(!o.sign()) - { - - double_limb_type carry = 1; - for(unsigned i = 0; i < os; ++i) - { - carry += static_cast<double_limb_type>(~pr[i]); - pr[i] = op(static_cast<limb_type>(carry), po[i]); - carry >>= CppInt1::limb_bits; - } - for(unsigned i = os; i < x; ++i) - { - carry += static_cast<double_limb_type>(~pr[i]); - pr[i] = op(static_cast<limb_type>(carry), limb_type(0)); - carry >>= CppInt1::limb_bits; - } - - carry += static_cast<double_limb_type>(~limb_type(0)); - next_limb = op(static_cast<limb_type>(carry), limb_type(0)); - } - else - { - - double_limb_type r_carry = 1; - double_limb_type o_carry = 1; - for(unsigned i = 0; i < os; ++i) - { - r_carry += static_cast<double_limb_type>(~pr[i]); - o_carry += static_cast<double_limb_type>(~po[i]); - pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry)); - r_carry >>= CppInt1::limb_bits; - o_carry >>= CppInt1::limb_bits; - } - for(unsigned i = os; i < x; ++i) - { - r_carry += static_cast<double_limb_type>(~pr[i]); - o_carry += static_cast<double_limb_type>(~limb_type(0)); - pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry)); - r_carry >>= CppInt1::limb_bits; - o_carry >>= CppInt1::limb_bits; - } - - r_carry += static_cast<double_limb_type>(~limb_type(0)); - o_carry += static_cast<double_limb_type>(~limb_type(0)); - next_limb = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry)); - } - } - - - - if(static_cast<signed_limb_type>(next_limb) < 0) - { - double_limb_type carry = 1; - for(unsigned i = 0; i < x; ++i) - { - carry += static_cast<double_limb_type>(~pr[i]); - pr[i] = static_cast<limb_type>(carry); - carry >>= CppInt1::limb_bits; - } - if(carry) - { - result.resize(x + 1, x); - if(result.size() > x) - result.limbs()[x] = static_cast<limb_type>(carry); - } - result.sign(true); - } - else - result.sign(false); - - result.normalize(); -} - -template <class CppInt1, class CppInt2, class Op> -void bitwise_op( - CppInt1& result, - const CppInt2& o, - Op op, const mpl::false_&) noexcept(((is_non_throwing_cpp_int<CppInt1>::value))) -{ - - - - - - unsigned rs = result.size(); - unsigned os = o.size(); - unsigned m, x; - minmax(rs, os, m, x); - result.resize(x, x); - typename CppInt1::limb_pointer pr = result.limbs(); - typename CppInt2::const_limb_pointer po = o.limbs(); - for(unsigned i = rs; i < x; ++i) - pr[i] = 0; - - for(unsigned i = 0; i < os; ++i) - pr[i] = op(pr[i], po[i]); - for(unsigned i = os; i < x; ++i) - pr[i] = op(pr[i], limb_type(0)); - - result.normalize(); -} - -struct bit_and{ limb_type operator()(limb_type a, limb_type b)const noexcept { return a & b; } }; -struct bit_or { limb_type operator()(limb_type a, limb_type b)const noexcept { return a | b; } }; -struct bit_xor{ limb_type operator()(limb_type a, limb_type b)const noexcept { return a ^ b; } }; - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_bitwise_and( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - bitwise_op(result, o, bit_and(), - mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_bitwise_or( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - bitwise_op(result, o, bit_or(), - mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_bitwise_xor( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - bitwise_op(result, o, bit_xor(), - mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>()); -} - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type - eval_bitwise_and( - cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result, - limb_type l) noexcept -{ - result.limbs()[0] &= l; - result.resize(1, 1); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type - eval_bitwise_or( - cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result, - limb_type l) noexcept -{ - result.limbs()[0] |= l; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type - eval_bitwise_xor( - cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result, - limb_type l) noexcept -{ - result.limbs()[0] ^= l; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c<is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type - eval_complement( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - static_assert(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior."); - - result = o; - eval_increment(result); - result.negate(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value >::type - eval_complement( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - unsigned os = o.size(); - result.resize((0x7fffffff * 2U + 1U), os); - for(unsigned i = 0; i < os; ++i) - result.limbs()[i] = ~o.limbs()[i]; - for(unsigned i = os; i < result.size(); ++i) - result.limbs()[i] = ~static_cast<limb_type>(0); - result.normalize(); -} - -template <class Int> -inline void left_shift_byte(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - limb_type shift = static_cast<limb_type>(s % Int::limb_bits); - unsigned ors = result.size(); - if((ors == 1) && (!*result.limbs())) - return; - unsigned rs = ors; - if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift))) - ++rs; - rs += offset; - result.resize(rs, rs); - rs = result.size(); - - typename Int::limb_pointer pr = result.limbs(); - - if(rs != ors) - pr[rs - 1] = 0u; - std::size_t bytes = static_cast<std::size_t>(s / 8); - std::size_t len = (std::min)(ors * sizeof(limb_type), rs * sizeof(limb_type) - bytes); - if(bytes >= rs * sizeof(limb_type)) - result = static_cast<limb_type>(0u); - else - { - unsigned char* pc = reinterpret_cast<unsigned char*>(pr); - std::memmove(pc + bytes, pc, len); - std::memset(pc, 0, bytes); - } -} - -template <class Int> -inline void left_shift_limb(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - limb_type shift = static_cast<limb_type>(s % Int::limb_bits); - - unsigned ors = result.size(); - if((ors == 1) && (!*result.limbs())) - return; - unsigned rs = ors; - if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift))) - ++rs; - rs += offset; - result.resize(rs, rs); - - typename Int::limb_pointer pr = result.limbs(); - - if(offset > rs) - { - - result = static_cast<limb_type>(0); - return; - } - - unsigned i = rs - result.size(); - for(; i < ors; ++i) - pr[rs - 1 - i] = pr[ors - 1 - i]; - for(; i < rs; ++i) - pr[rs - 1 - i] = 0; -} - -template <class Int> -inline void left_shift_generic(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - limb_type shift = static_cast<limb_type>(s % Int::limb_bits); - - unsigned ors = result.size(); - if((ors == 1) && (!*result.limbs())) - return; - unsigned rs = ors; - if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift))) - ++rs; - rs += offset; - result.resize(rs, rs); - bool truncated = result.size() != rs; - - typename Int::limb_pointer pr = result.limbs(); - - if(offset > rs) - { - - result = static_cast<limb_type>(0); - return; - } - - unsigned i = rs - result.size(); - - (static_cast <bool> (shift) ? void (0) : __assert_fail ("shift", "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp", 398, __extension__ __PRETTY_FUNCTION__)); - if(!truncated) - { - if(rs > ors + offset) - { - pr[rs - 1 - i] = pr[ors - 1 - i] >> (Int::limb_bits - shift); - --rs; - } - else - { - pr[rs - 1 - i] = pr[ors - 1 - i] << shift; - if(ors > 1) - pr[rs - 1 - i] |= pr[ors - 2 - i] >> (Int::limb_bits - shift); - ++i; - } - } - for(; rs - i >= 2 + offset; ++i) - { - pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift; - pr[rs - 1 - i] |= pr[rs - 2 - i - offset] >> (Int::limb_bits - shift); - } - if(rs - i >= 1 + offset) - { - pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift; - ++i; - } - for(; i < rs; ++i) - pr[rs - 1 - i] = 0; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_left_shift( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - double_limb_type s) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - if(!s) - return; -# 450 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 3 4 - static const limb_type byte_shift_mask = 8 - 1; - if((s & byte_shift_mask) == 0) - { - left_shift_byte(result, s); - } - - - - - - - - else - { - left_shift_generic(result, s); - } - - - - result.normalize(); -} - -template <class Int> -inline void right_shift_byte(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - limb_type shift; - (static_cast <bool> ((s % 8) == 0) ? void (0) : __assert_fail ("(s % 8) == 0", "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp", 477, __extension__ __PRETTY_FUNCTION__)); - unsigned ors = result.size(); - unsigned rs = ors; - if(offset >= rs) - { - result = limb_type(0); - return; - } - rs -= offset; - typename Int::limb_pointer pr = result.limbs(); - unsigned char* pc = reinterpret_cast<unsigned char*>(pr); - shift = static_cast<limb_type>(s / 8); - std::memmove(pc, pc + shift, ors * sizeof(pr[0]) - shift); - shift = (sizeof(limb_type) - shift % sizeof(limb_type)) * 8; - if(shift < Int::limb_bits) - { - pr[ors - offset - 1] &= (static_cast<limb_type>(1u) << shift) - 1; - if(!pr[ors - offset - 1] && (rs > 1)) - --rs; - } - result.resize(rs, rs); -} - -template <class Int> -inline void right_shift_limb(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - (static_cast <bool> ((s % Int::limb_bits) == 0) ? void (0) : __assert_fail ("(s % Int::limb_bits) == 0", "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp", 504, __extension__ __PRETTY_FUNCTION__)); - unsigned ors = result.size(); - unsigned rs = ors; - if(offset >= rs) - { - result = limb_type(0); - return; - } - rs -= offset; - typename Int::limb_pointer pr = result.limbs(); - unsigned i = 0; - for(; i < rs; ++i) - pr[i] = pr[i + offset]; - result.resize(rs, rs); -} - -template <class Int> -inline void right_shift_generic(Int& result, double_limb_type s) -{ - limb_type offset = static_cast<limb_type>(s / Int::limb_bits); - limb_type shift = static_cast<limb_type>(s % Int::limb_bits); - unsigned ors = result.size(); - unsigned rs = ors; - if(offset >= rs) - { - result = limb_type(0); - return; - } - rs -= offset; - typename Int::limb_pointer pr = result.limbs(); - if((pr[ors - 1] >> shift) == 0) - { - if(--rs == 0) - { - result = limb_type(0); - return; - } - } - unsigned i = 0; - - - (static_cast <bool> (shift) ? void (0) : __assert_fail ("shift", "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp", 545, __extension__ __PRETTY_FUNCTION__)); - for(; i + offset + 1 < ors; ++i) - { - pr[i] = pr[i + offset] >> shift; - pr[i] |= pr[i + offset + 1] << (Int::limb_bits - shift); - } - pr[i] = pr[i + offset] >> shift; - result.resize(rs, rs); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type - eval_right_shift( - cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result, - double_limb_type s) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>::checked_type()); - if(!s) - return; -# 573 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 3 4 - static const limb_type byte_shift_mask = 8 - 1; - if((s & byte_shift_mask) == 0) - right_shift_byte(result, s); - - - - - - else - right_shift_generic(result, s); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value>::type - eval_right_shift( - cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result, - double_limb_type s) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::checked_type()); - if(!s) - return; - - bool is_neg = result.sign(); - if(is_neg) - eval_increment(result); -# 606 "/usr/include/boost/multiprecision/cpp_int/bitwise.hpp" 3 4 - static const limb_type byte_shift_mask = 8 - 1; - if((s & byte_shift_mask) == 0) - right_shift_byte(result, s); - - - - - - else - right_shift_generic(result, s); - if(is_neg) - eval_decrement(result); -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T> -inline typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type - eval_left_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - *result.limbs() = detail::checked_left_shift(*result.limbs(), s, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T> -inline typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type - eval_right_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - - is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - *result.limbs() = (static_cast<unsigned>(s) >= sizeof(*result.limbs()) * 8) ? 0 : (result.sign() ? ((--*result.limbs()) >> s) + 1 : *result.limbs() >> s); - if(result.sign() && (*result.limbs() == 0)) - result = static_cast<signed_limb_type>(-1); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value) - >::type - eval_complement( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - static_assert(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior."); - - - - if(o.sign()) - { - *result.limbs() = *o.limbs() - 1; - result.sign(false); - } - else - { - *result.limbs() = 1 + *o.limbs(); - result.sign(true); - } - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - >::type - eval_complement( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = ~*o.limbs(); - result.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - >::type - eval_bitwise_and( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() &= *o.limbs(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value) - >::type - eval_bitwise_and( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - - using default_ops::eval_bit_test; - using default_ops::eval_increment; - - if(result.sign() || o.sign()) - { - static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value; - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result); - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o); - eval_bitwise_and(t1, t2); - bool s = eval_bit_test(t1, m + 1); - if(s) - { - eval_complement(t1, t1); - eval_increment(t1); - } - result = t1; - result.sign(s); - } - else - { - *result.limbs() &= *o.limbs(); - } -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - >::type - eval_bitwise_or( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() |= *o.limbs(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value) - >::type - eval_bitwise_or( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - - using default_ops::eval_bit_test; - using default_ops::eval_increment; - - if(result.sign() || o.sign()) - { - static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value; - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result); - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o); - eval_bitwise_or(t1, t2); - bool s = eval_bit_test(t1, m + 1); - if(s) - { - eval_complement(t1, t1); - eval_increment(t1); - } - result = t1; - result.sign(s); - } - else - { - *result.limbs() |= *o.limbs(); - result.normalize(); - } -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - >::type - eval_bitwise_xor( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() ^= *o.limbs(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value - && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value) - >::type - eval_bitwise_xor( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - - using default_ops::eval_bit_test; - using default_ops::eval_increment; - - if(result.sign() || o.sign()) - { - static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value; - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result); - cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o); - eval_bitwise_xor(t1, t2); - bool s = eval_bit_test(t1, m + 1); - if(s) - { - eval_complement(t1, t1); - eval_increment(t1); - } - result = t1; - result.sign(s); - } - else - { - *result.limbs() ^= *o.limbs(); - } -} - -}}} -# 1980 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/misc.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/misc.hpp" 3 4 -# 1 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 3 4 -# 1 "/usr/include/boost/predef/other/endian.h" 1 3 4 -# 194 "/usr/include/boost/predef/other/endian.h" 3 4 - - - - - - - - - - -# 12 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 2 3 4 -# 1 "/usr/include/boost/cstdint.hpp" 1 3 4 -# 13 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 2 3 4 - - - - - -namespace boost{ namespace multiprecision{ namespace detail{ - -template <class Unsigned> -inline unsigned find_lsb(Unsigned mask, const mpl::int_<0>&) -{ - unsigned result = 0; - while(!(mask & 1u)) - { - mask >>= 1; - ++result; - } - return result; -} - -template <class Unsigned> -inline unsigned find_msb(Unsigned mask, const mpl::int_<0>&) -{ - unsigned index = 0; - while(mask) - { - ++index; - mask >>= 1; - } - return --index; -} -# 122 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 3 4 -inline __attribute__ ((__always_inline__)) unsigned find_lsb(unsigned mask, mpl::int_<1> const&) -{ - return __builtin_ctz(mask); -} -inline __attribute__ ((__always_inline__)) unsigned find_lsb(unsigned long mask, mpl::int_<2> const&) -{ - return __builtin_ctzl(mask); -} -inline __attribute__ ((__always_inline__)) unsigned find_lsb(boost::ulong_long_type mask, mpl::int_<3> const&) -{ - return __builtin_ctzll(mask); -} -inline __attribute__ ((__always_inline__)) unsigned find_msb(unsigned mask, mpl::int_<1> const&) -{ - return sizeof(unsigned) * 8 - 1 - __builtin_clz(mask); -} -inline __attribute__ ((__always_inline__)) unsigned find_msb(unsigned long mask, mpl::int_<2> const&) -{ - return sizeof(unsigned long) * 8 - 1 - __builtin_clzl(mask); -} -inline __attribute__ ((__always_inline__)) unsigned find_msb(boost::ulong_long_type mask, mpl::int_<3> const&) -{ - return sizeof(boost::ulong_long_type) * 8 - 1 - __builtin_clzll(mask); -} - - -__extension__ typedef unsigned __int128 uint128_type; - -inline __attribute__ ((__always_inline__)) unsigned find_msb(uint128_type mask, mpl::int_<0> const&) -{ - union { uint128_type v; boost::uint64_t sv[2]; } val; - val.v = mask; - - if(val.sv[1]) - return find_msb(val.sv[1], mpl::int_<3>()) + 64; - return find_msb(val.sv[0], mpl::int_<3>()); - - - - - -} -inline __attribute__ ((__always_inline__)) unsigned find_lsb(uint128_type mask, mpl::int_<0> const&) -{ - union { uint128_type v; boost::uint64_t sv[2]; } val; - val.v = mask; - - if(val.sv[0] == 0) - return find_lsb(val.sv[1], mpl::int_<3>()) + 64; - return find_lsb(val.sv[0], mpl::int_<3>()); - - - - - -} - - -template <class Unsigned> -inline __attribute__ ((__always_inline__)) unsigned find_lsb(Unsigned mask) -{ - typedef typename make_unsigned<Unsigned>::type ui_type; - typedef typename mpl::if_c< - sizeof(Unsigned) <= sizeof(unsigned), - mpl::int_<1>, - typename mpl::if_c< - sizeof(Unsigned) <= sizeof(unsigned long), - mpl::int_<2>, - typename mpl::if_c< - sizeof(Unsigned) <= sizeof(boost::ulong_long_type), - mpl::int_<3>, - mpl::int_<0> - >::type - >::type - >::type tag_type; - return find_lsb(static_cast<ui_type>(mask), tag_type()); -} -template <class Unsigned> -inline __attribute__ ((__always_inline__)) unsigned find_msb(Unsigned mask) -{ - typedef typename make_unsigned<Unsigned>::type ui_type; - typedef typename mpl::if_c< - sizeof(Unsigned) <= sizeof(unsigned), - mpl::int_<1>, - typename mpl::if_c< - sizeof(Unsigned) <= sizeof(unsigned long), - mpl::int_<2>, - typename mpl::if_c< - sizeof(Unsigned) <= sizeof(boost::ulong_long_type), - mpl::int_<3>, - mpl::int_<0> - >::type - >::type - >::type tag_type; - return find_msb(static_cast<ui_type>(mask), tag_type()); -} -# 262 "/usr/include/boost/multiprecision/detail/bitscan.hpp" 3 4 -}}} -# 12 "/usr/include/boost/multiprecision/cpp_int/misc.hpp" 2 3 4 - -# 1 "/usr/include/boost/functional/hash_fwd.hpp" 1 3 4 -# 14 "/usr/include/boost/multiprecision/cpp_int/misc.hpp" 2 3 4 -# 23 "/usr/include/boost/multiprecision/cpp_int/misc.hpp" 3 4 -namespace boost{ namespace multiprecision{ namespace backends{ - -template <class R, class CppInt> -void check_in_range(const CppInt& val, const mpl::int_<checked>&) -{ - typedef typename boost::multiprecision::detail::canonical<R, CppInt>::type cast_type; - if(val.sign()) - { - if(boost::is_signed<R>::value == false) - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to assign a negative value to an unsigned type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",32); - if(val.compare(static_cast<cast_type>((std::numeric_limits<R>::min)())) < 0) - ::boost::exception_detail::throw_exception_(std::overflow_error("Could not convert to the target type - -value is out of range."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",34); - } - else - { - if(val.compare(static_cast<cast_type>((std::numeric_limits<R>::max)())) > 0) - ::boost::exception_detail::throw_exception_(std::overflow_error("Could not convert to the target type - -value is out of range."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",39); - } -} -template <class R, class CppInt> -inline void check_in_range(const CppInt& , const mpl::int_<unchecked>&) noexcept {} - -inline void check_is_negative(const mpl::true_&) noexcept {} -inline void check_is_negative(const mpl::false_&) -{ - ::boost::exception_detail::throw_exception_(std::range_error("Attempt to assign a negative value to an unsigned type."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",48); -} - -template <class Integer> -inline Integer negate_integer(Integer i, const mpl::true_&) noexcept -{ - return -i; -} -template <class Integer> -inline Integer negate_integer(Integer i, const mpl::false_&) noexcept -{ - return ~(i-1); -} - -template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_integral<R>::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, void>::type - eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& backend) -{ - typedef mpl::int_<Checked1> checked_type; - check_in_range<R>(backend, checked_type()); - - if (std::numeric_limits<R>::digits < cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits) - { - if ((backend.sign() && boost::is_signed<R>::value) && (1 + static_cast<boost::multiprecision::limb_type>((std::numeric_limits<R>::max)()) <= backend.limbs()[0])) - { - *result = (std::numeric_limits<R>::min)(); - return; - } - else if (boost::is_signed<R>::value && !backend.sign() && static_cast<boost::multiprecision::limb_type>((std::numeric_limits<R>::max)()) <= backend.limbs()[0]) - { - *result = (std::numeric_limits<R>::max)(); - return; - } - else - *result = static_cast<R>(backend.limbs()[0]); - } - else - *result = static_cast<R>(backend.limbs()[0]); - unsigned shift = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - unsigned i = 1; - if (std::numeric_limits<R>::digits > cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits) - { - while ((i < backend.size()) && (shift < static_cast<unsigned>(std::numeric_limits<R>::digits - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits))) - { - *result += static_cast<R>(backend.limbs()[i]) << shift; - shift += cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - ++i; - } - - - - if (i < backend.size()) - { - static const limb_type mask = std::numeric_limits<R>::digits - shift == cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits ? - ~static_cast<limb_type>(0) : (static_cast<limb_type>(1u) << (std::numeric_limits<R>::digits - shift)) - 1; - *result += (static_cast<R>(backend.limbs()[i]) & mask) << shift; - if ((static_cast<R>(backend.limbs()[i]) & static_cast<limb_type>(~mask)) || (i + 1 < backend.size())) - { - - if (backend.sign()) - { - check_is_negative(boost::is_signed<R>()); - *result = (std::numeric_limits<R>::min)(); - } - else if(boost::is_signed<R>::value) - *result = (std::numeric_limits<R>::max)(); - return; - } - } - } - else if (backend.size() > 1) - { - - if (backend.sign()) - { - check_is_negative(boost::is_signed<R>()); - *result = (std::numeric_limits<R>::min)(); - } - else if(boost::is_signed<R>::value) - *result = (std::numeric_limits<R>::max)(); - return; - } - if(backend.sign()) - { - check_is_negative(boost::is_signed<R>()); - *result = negate_integer(*result, boost::is_signed<R>()); - } -} - -template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_floating_point<R>::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, void>::type - eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& backend) noexcept((is_arithmetic<R>::value)) -{ - typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::const_limb_pointer p = backend.limbs(); - unsigned shift = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - *result = static_cast<R>(*p); - for(unsigned i = 1; i < backend.size(); ++i) - { - *result += static_cast<R>(std::ldexp(static_cast<long double>(p[i]), shift)); - shift += cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - } - if(backend.sign()) - *result = -*result; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, bool>::type - eval_is_zero(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) noexcept -{ - return (val.size() == 1) && (val.limbs()[0] == 0); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, int>::type - eval_get_sign(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) noexcept -{ - return eval_is_zero(val) ? 0 : val.sign() ? -1 : 1; -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_abs(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - result = val; - result.sign(false); -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type - eval_lsb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - using default_ops::eval_get_sign; - if(eval_get_sign(a) == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",183); - } - if(a.sign()) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",187); - } - - - - - unsigned index = 0; - while(!a.limbs()[index] && (index < a.size())) - ++index; - - - - unsigned result = boost::multiprecision::detail::find_lsb(a.limbs()[index]); - - return result + index * cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; -} - - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type -eval_msb_imp(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - - - - return (a.size() - 1) * cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits + boost::multiprecision::detail::find_msb(a.limbs()[a.size() - 1]); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type - eval_msb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - using default_ops::eval_get_sign; - if(eval_get_sign(a) == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",224); - } - if(a.sign()) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",228); - } - return eval_msb_imp(a); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, bool>::type - eval_bit_test(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val, unsigned index) noexcept -{ - unsigned offset = index / cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - unsigned shift = index % cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - limb_type mask = shift ? limb_type(1u) << shift : limb_type(1u); - if(offset >= val.size()) - return false; - return val.limbs()[offset] & mask ? true : false; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_bit_set(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val, unsigned index) -{ - unsigned offset = index / cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - unsigned shift = index % cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - limb_type mask = shift ? limb_type(1u) << shift : limb_type(1u); - if(offset >= val.size()) - { - unsigned os = val.size(); - val.resize(offset + 1, offset + 1); - if(offset >= val.size()) - return; - for(unsigned i = os; i <= offset; ++i) - val.limbs()[i] = 0; - } - val.limbs()[offset] |= mask; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_bit_unset(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val, unsigned index) noexcept -{ - unsigned offset = index / cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - unsigned shift = index % cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - limb_type mask = shift ? limb_type(1u) << shift : limb_type(1u); - if(offset >= val.size()) - return; - val.limbs()[offset] &= ~mask; - val.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_bit_flip(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val, unsigned index) -{ - unsigned offset = index / cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - unsigned shift = index % cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits; - limb_type mask = shift ? limb_type(1u) << shift : limb_type(1u); - if(offset >= val.size()) - { - unsigned os = val.size(); - val.resize(offset + 1, offset + 1); - if(offset >= val.size()) - return; - for(unsigned i = os; i <= offset; ++i) - val.limbs()[i] = 0; - } - val.limbs()[offset] ^= mask; - val.normalize(); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_qr( - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& x, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& y, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& q, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& r) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - divide_unsigned_helper(&q, x, y, r); - q.sign(x.sign() != y.sign()); - r.sign(x.sign()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_qr( - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& x, - limb_type y, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& q, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& r) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - divide_unsigned_helper(&q, x, y, r); - q.sign(x.sign()); - r.sign(x.sign()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class U> -inline typename enable_if_c<is_integral<U>::value>::type eval_qr( - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& x, - U y, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& q, - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& r) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - using default_ops::eval_qr; - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t; - t = y; - eval_qr(x, t, q, r); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class Integer> -inline typename enable_if_c<is_unsigned<Integer>::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, Integer>::type - eval_integer_modulus(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& x, Integer val) -{ - if((sizeof(Integer) <= sizeof(limb_type)) || (val <= (std::numeric_limits<limb_type>::max)())) - { - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> d; - divide_unsigned_helper(static_cast<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>*>(0), x, static_cast<limb_type>(val), d); - return d.limbs()[0]; - } - else - { - return default_ops::eval_integer_modulus(x, val); - } -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class Integer> -inline typename enable_if_c<is_signed<Integer>::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, Integer>::type - eval_integer_modulus(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& x, Integer val) -{ - return eval_integer_modulus(x, boost::multiprecision::detail::unsigned_abs(val)); -} - -inline limb_type integer_gcd_reduce(limb_type u, limb_type v) -{ - do - { - if(u > v) - std::swap(u, v); - if(u == v) - break; - v -= u; - v >>= boost::multiprecision::detail::find_lsb(v); - } while(true); - return u; -} - -inline double_limb_type integer_gcd_reduce(double_limb_type u, double_limb_type v) -{ - do - { - if(u > v) - std::swap(u, v); - if(u == v) - break; - if(v <= ~static_cast<limb_type>(0)) - { - u = integer_gcd_reduce(static_cast<limb_type>(v), static_cast<limb_type>(u)); - break; - } - v -= u; - - - - while((static_cast<unsigned>(v) & 1u) == 0) - - v >>= 1; - } while(true); - return u; -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_gcd( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - limb_type v) -{ - using default_ops::eval_lsb; - using default_ops::eval_is_zero; - using default_ops::eval_get_sign; - - int shift; - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> u(a); - - int s = eval_get_sign(u); - - - if(s < 0) - { - u.negate(); - } - else if(s == 0) - { - result = v; - return; - } - if(v == 0) - { - result = u; - return; - } - - - - - unsigned us = eval_lsb(u); - unsigned vs = boost::multiprecision::detail::find_lsb(v); - shift = (std::min)(us, vs); - eval_right_shift(u, us); - if(vs) - v >>= vs; - - do - { - - - if(u.size() <= 2) - { - if(u.size() == 1) - v = integer_gcd_reduce(*u.limbs(), v); - else - { - double_limb_type i; - i = u.limbs()[0] | (static_cast<double_limb_type>(u.limbs()[1]) << sizeof(limb_type) * 8); - v = static_cast<limb_type>(integer_gcd_reduce(i, static_cast<double_limb_type>(v))); - } - break; - } - eval_subtract(u, v); - us = eval_lsb(u); - eval_right_shift(u, us); - } - while(true); - - result = v; - eval_left_shift(result, shift); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class Integer> -inline typename enable_if_c<is_unsigned<Integer>::value && (sizeof(Integer) <= sizeof(limb_type)) && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_gcd( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - const Integer& v) -{ - eval_gcd(result, a, static_cast<limb_type>(v)); -} -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class Integer> -inline typename enable_if_c<is_signed<Integer>::value && (sizeof(Integer) <= sizeof(limb_type)) && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_gcd( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - const Integer& v) -{ - eval_gcd(result, a, static_cast<limb_type>(v < 0 ? -v : v)); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_gcd( - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, - const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) -{ - using default_ops::eval_lsb; - using default_ops::eval_is_zero; - using default_ops::eval_get_sign; - - if(a.size() == 1) - { - eval_gcd(result, b, *a.limbs()); - return; - } - if(b.size() == 1) - { - eval_gcd(result, a, *b.limbs()); - return; - } - - int shift; - - cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> u(a), v(b); - - int s = eval_get_sign(u); - - - if(s < 0) - { - u.negate(); - } - else if(s == 0) - { - result = v; - return; - } - s = eval_get_sign(v); - if(s < 0) - { - v.negate(); - } - else if(s == 0) - { - result = u; - return; - } - - - - - unsigned us = eval_lsb(u); - unsigned vs = eval_lsb(v); - shift = (std::min)(us, vs); - eval_right_shift(u, us); - eval_right_shift(v, vs); - - do - { - - - s = u.compare(v); - if(s > 0) - u.swap(v); - if(s == 0) - break; - if(v.size() <= 2) - { - if(v.size() == 1) - u = integer_gcd_reduce(*v.limbs(), *u.limbs()); - else - { - double_limb_type i, j; - i = v.limbs()[0] | (static_cast<double_limb_type>(v.limbs()[1]) << sizeof(limb_type) * 8); - j = (u.size() == 1) ? *u.limbs() : u.limbs()[0] | (static_cast<double_limb_type>(u.limbs()[1]) << sizeof(limb_type) * 8); - u = integer_gcd_reduce(i, j); - } - break; - } - eval_subtract(v, u); - vs = eval_lsb(v); - eval_right_shift(v, vs); - } - while(true); - - result = u; - eval_left_shift(result, shift); -} - - - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type - eval_gcd(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) noexcept -{ - *result.limbs() = boost::integer::gcd(*a.limbs(), *b.limbs()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && (Checked1 == unchecked)>::type - eval_lcm(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) noexcept(((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))) -{ - *result.limbs() = boost::integer::lcm(*a.limbs(), *b.limbs()); - result.normalize(); -} - -inline void conversion_overflow(const mpl::int_<checked>&) -{ - ::boost::exception_detail::throw_exception_(std::overflow_error("Overflow in conversion to narrower type"),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",593); -} -inline void conversion_overflow(const mpl::int_<unchecked>&){} - -template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && boost::is_convertible<typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type, R>::value - >::type - eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) -{ - typedef typename common_type<R, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type>::type common_type; - if(std::numeric_limits<R>::is_specialized && (static_cast<common_type>(*val.limbs()) > static_cast<common_type>((std::numeric_limits<R>::max)()))) - { - if(val.isneg()) - { - check_is_negative(mpl::bool_<boost::is_signed<R>::value || (number_category<R>::value == number_kind_floating_point)>()); - if(static_cast<common_type>(*val.limbs()) > -static_cast<common_type>((std::numeric_limits<R>::min)())) - conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - *result = (std::numeric_limits<R>::min)(); - } - else - { - conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - *result = boost::is_signed<R>::value ? (std::numeric_limits<R>::max)() : static_cast<R>(*val.limbs()); - } - } - else - { - *result = static_cast<R>(*val.limbs()); - if(val.isneg()) - { - check_is_negative(mpl::bool_<boost::is_signed<R>::value || (number_category<R>::value == number_kind_floating_point)>()); - *result = negate_integer(*result, mpl::bool_<is_signed_number<R>::value || (number_category<R>::value == number_kind_floating_point)>()); - } - } -} - -template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c< - is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value - && boost::is_convertible<typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type, R>::value - >::type - eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) -{ - typedef typename common_type<R, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type>::type common_type; - if(std::numeric_limits<R>::is_specialized && (static_cast<common_type>(*val.limbs()) > static_cast<common_type>((std::numeric_limits<R>::max)()))) - { - conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type()); - *result = boost::is_signed<R>::value ? (std::numeric_limits<R>::max)() : static_cast<R>(*val.limbs()); - } - else - *result = static_cast<R>(*val.limbs()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type - eval_lsb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - using default_ops::eval_get_sign; - if(eval_get_sign(a) == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",657); - } - if(a.sign()) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",661); - } - - - - return boost::multiprecision::detail::find_lsb(*a.limbs()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type -eval_msb_imp(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - - - - return boost::multiprecision::detail::find_msb(*a.limbs()); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type - eval_msb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) -{ - using default_ops::eval_get_sign; - if(eval_get_sign(a) == 0) - { - ::boost::exception_detail::throw_exception_(std::range_error("No bits were set in the operand."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",686); - } - if(a.sign()) - { - ::boost::exception_detail::throw_exception_(std::range_error("Testing individual bits in negative values is not supported - results are undefined."),__PRETTY_FUNCTION__,"/usr/include/boost/multiprecision/cpp_int/misc.hpp",690); - } - return eval_msb_imp(a); -} - -template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1> -inline std::size_t hash_value(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) noexcept -{ - std::size_t result = 0; - for(unsigned i = 0; i < val.size(); ++i) - { - boost::hash_combine(result, val.limbs()[i]); - } - boost::hash_combine(result, val.sign()); - return result; -} - - - - - -}}} -# 1981 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/limits.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/limits.hpp" 3 4 -namespace std{ - -namespace detail{ - - - - - - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_min(const boost::mpl::true_&, const boost::mpl::true_&) -{ - - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> result_type; - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MaxBits, MaxBits, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked>, ExpressionTemplates> ui_type; - static const result_type val = -result_type(~ui_type(0)); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_min(const boost::mpl::true_&, const boost::mpl::false_&) -{ - - static const boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> val(0u); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_min(const boost::mpl::false_&, const boost::mpl::true_&) -{ - - - static const boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> val(0u); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_min(const boost::mpl::false_&, const boost::mpl::false_&) -{ - - static const boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> val(0u); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_max(const boost::mpl::true_&, const boost::mpl::true_&) -{ - - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> result_type; - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MaxBits, MaxBits, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked>, ExpressionTemplates> ui_type; - static const result_type val = ~ui_type(0); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_max(const boost::mpl::true_&, const boost::mpl::false_&) -{ - - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> result_type; - typedef boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, Allocator>, ExpressionTemplates> ui_type; - static const result_type val = ~ui_type(0); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_max(const boost::mpl::false_&, const boost::mpl::true_&) -{ - - - static const boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> val(0u); - return val; -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> - get_max(const boost::mpl::false_&, const boost::mpl::false_&) -{ - - static const boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> val(0u); - return val; -} - -} - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -class numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> > -{ - typedef boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> backend_type; - typedef boost::multiprecision::number<backend_type, ExpressionTemplates> number_type; - - struct inititializer - { - inititializer() - { - (std::numeric_limits<number_type>::max)(); - (std::numeric_limits<number_type>::min)(); - } - void do_nothing()const{} - }; - - static const inititializer init; - -public: - static constexpr bool is_specialized = true; - - - - - static number_type (min)() - { - init.do_nothing(); - return detail::get_min<MinBits, MaxBits, SignType, Checked, Allocator, ExpressionTemplates>(boost::multiprecision::backends::is_fixed_precision<backend_type>(), boost::multiprecision::is_signed_number<backend_type>()); - } - static number_type (max)() - { - init.do_nothing(); - return detail::get_max<MinBits, MaxBits, SignType, Checked, Allocator, ExpressionTemplates>(boost::multiprecision::backends::is_fixed_precision<backend_type>(), boost::multiprecision::is_signed_number<backend_type>()); - } - static number_type lowest() { return (min)(); } - static constexpr int digits = boost::multiprecision::backends::max_precision<backend_type>::value == (0x7fffffff * 2U + 1U) ? 0x7fffffff : boost::multiprecision::backends::max_precision<backend_type>::value; - static constexpr int digits10 = (digits > 0x7fffffff / 301) ? (digits / 1000) * 301L : (digits * 301) / 1000; - static constexpr int max_digits10 = digits10 + 3; - static constexpr bool is_signed = boost::multiprecision::is_signed_number<backend_type>::value; - static constexpr bool is_integer = true; - static constexpr bool is_exact = true; - static constexpr int radix = 2; - static number_type epsilon() { return 0; } - static number_type round_error() { 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 number_type infinity() { return 0; } - static number_type quiet_NaN() { return 0; } - static number_type signaling_NaN() { return 0; } - static number_type denorm_min() { return 0; } - static constexpr bool is_iec559 = false; - static constexpr bool is_bounded = boost::multiprecision::backends::is_fixed_precision<backend_type>::value; - static constexpr bool is_modulo = (boost::multiprecision::backends::is_fixed_precision<backend_type>::value && (Checked == boost::multiprecision::unchecked)); - static constexpr bool traps = false; - static constexpr bool tinyness_before = false; - static constexpr float_round_style round_style = round_toward_zero; -}; - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -const typename numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::inititializer numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::init; - - - -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::digits; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::digits10; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::max_digits10; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_signed; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_integer; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_exact; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::radix; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::min_exponent; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::min_exponent10; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::max_exponent; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::max_exponent10; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::has_infinity; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::has_quiet_NaN; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::has_signaling_NaN; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr float_denorm_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::has_denorm; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::has_denorm_loss; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_iec559; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_bounded; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::is_modulo; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::traps; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::tinyness_before; -template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates> -constexpr float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::round_style; - - - - - - -} -# 1982 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 - -# 1 "/usr/include/boost/multiprecision/cpp_int/literals.hpp" 1 3 4 -# 11 "/usr/include/boost/multiprecision/cpp_int/literals.hpp" 3 4 -namespace boost{ namespace multiprecision{ - -namespace literals{ namespace detail{ - -template <char> struct hex_value; -template <> struct hex_value<'0'> { static constexpr limb_type value = 0; }; -template <> struct hex_value<'1'> { static constexpr limb_type value = 1; }; -template <> struct hex_value<'2'> { static constexpr limb_type value = 2; }; -template <> struct hex_value<'3'> { static constexpr limb_type value = 3; }; -template <> struct hex_value<'4'> { static constexpr limb_type value = 4; }; -template <> struct hex_value<'5'> { static constexpr limb_type value = 5; }; -template <> struct hex_value<'6'> { static constexpr limb_type value = 6; }; -template <> struct hex_value<'7'> { static constexpr limb_type value = 7; }; -template <> struct hex_value<'8'> { static constexpr limb_type value = 8; }; -template <> struct hex_value<'9'> { static constexpr limb_type value = 9; }; -template <> struct hex_value<'a'> { static constexpr limb_type value = 10; }; -template <> struct hex_value<'b'> { static constexpr limb_type value = 11; }; -template <> struct hex_value<'c'> { static constexpr limb_type value = 12; }; -template <> struct hex_value<'d'> { static constexpr limb_type value = 13; }; -template <> struct hex_value<'e'> { static constexpr limb_type value = 14; }; -template <> struct hex_value<'f'> { static constexpr limb_type value = 15; }; -template <> struct hex_value<'A'> { static constexpr limb_type value = 10; }; -template <> struct hex_value<'B'> { static constexpr limb_type value = 11; }; -template <> struct hex_value<'C'> { static constexpr limb_type value = 12; }; -template <> struct hex_value<'D'> { static constexpr limb_type value = 13; }; -template <> struct hex_value<'E'> { static constexpr limb_type value = 14; }; -template <> struct hex_value<'F'> { static constexpr limb_type value = 15; }; - -template <class Pack, limb_type value> -struct combine_value_to_pack; -template <limb_type first, limb_type...ARGS, limb_type value> -struct combine_value_to_pack<value_pack<first, ARGS...>, value> -{ - typedef value_pack<first | value, ARGS...> type; -}; - -template <char NextChar, char...CHARS> -struct pack_values -{ - static constexpr unsigned chars_per_limb = sizeof(limb_type) * 8 / 4; - static constexpr unsigned shift = ((sizeof...(CHARS)) % chars_per_limb) * 4; - static constexpr limb_type value_to_add = shift ? hex_value<NextChar>::value << shift : hex_value<NextChar>::value; - - typedef typename pack_values<CHARS...>::type recursive_packed_type; - typedef typename boost::mpl::if_c<shift == 0, - typename recursive_packed_type::next_type, - recursive_packed_type>::type pack_type; - typedef typename combine_value_to_pack<pack_type, value_to_add>::type type; -}; -template <char NextChar> -struct pack_values<NextChar> -{ - static constexpr limb_type value_to_add = hex_value<NextChar>::value; - - typedef value_pack<value_to_add> type; -}; - -template <class T> -struct strip_leading_zeros_from_pack; -template <limb_type...PACK> -struct strip_leading_zeros_from_pack<value_pack<PACK...> > -{ - typedef value_pack<PACK...> type; -}; -template <limb_type...PACK> -struct strip_leading_zeros_from_pack<value_pack<0u, PACK...> > -{ - typedef typename strip_leading_zeros_from_pack<value_pack<PACK...> >::type type; -}; - -template <limb_type v, class PACK> -struct append_value_to_pack; -template <limb_type v, limb_type...PACK> -struct append_value_to_pack<v, value_pack<PACK...> > -{ - typedef value_pack<PACK..., v> type; -}; - -template <class T> -struct reverse_value_pack; -template <limb_type v, limb_type...VALUES> -struct reverse_value_pack<value_pack<v, VALUES...> > -{ - typedef typename reverse_value_pack<value_pack<VALUES...> >::type lead_values; - typedef typename append_value_to_pack<v, lead_values>::type type; -}; -template <limb_type v> -struct reverse_value_pack<value_pack<v> > -{ - typedef value_pack<v> type; -}; -template <> -struct reverse_value_pack<value_pack<> > -{ - typedef value_pack<> type; -}; - -template <char l1, char l2, char...STR> -struct make_packed_value_from_str -{ - static_assert(l1 == '0', "Multi-precision integer literals must be in hexadecimal notation."); - static_assert((l2 == 'X') || (l2 == 'x'), "Multi-precision integer literals must be in hexadecimal notation."); - typedef typename pack_values<STR...>::type packed_type; - typedef typename strip_leading_zeros_from_pack<packed_type>::type stripped_type; - typedef typename reverse_value_pack<stripped_type>::type type; -}; - -template <class Pack, class B> -struct make_backend_from_pack -{ - static constexpr Pack p = {}; - static constexpr B value = p; -}; - -template <class Pack, class B> -constexpr B make_backend_from_pack<Pack, B>::value; - -template <unsigned Digits> -struct signed_cpp_int_literal_result_type -{ - static constexpr unsigned bits = Digits * 4; - typedef boost::multiprecision::backends::cpp_int_backend<bits, bits, signed_magnitude, unchecked, void> backend_type; - typedef number<backend_type, et_off> number_type; -}; - -template <unsigned Digits> -struct unsigned_cpp_int_literal_result_type -{ - static constexpr unsigned bits = Digits * 4; - typedef boost::multiprecision::backends::cpp_int_backend<bits, bits, unsigned_magnitude, unchecked, void> backend_type; - typedef number<backend_type, et_off> number_type; -}; - -} - -template <char... STR> -constexpr typename boost::multiprecision::literals::detail::signed_cpp_int_literal_result_type<(sizeof...(STR)) - 2>::number_type operator "" _cppi() -{ - typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; - return boost::multiprecision::literals::detail::make_backend_from_pack<pt, typename boost::multiprecision::literals::detail::signed_cpp_int_literal_result_type<(sizeof...(STR)) - 2>::backend_type>::value; -} - -template <char... STR> -constexpr typename boost::multiprecision::literals::detail::unsigned_cpp_int_literal_result_type<(sizeof...(STR)) - 2>::number_type operator "" _cppui() -{ - typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; - return boost::multiprecision::literals::detail::make_backend_from_pack<pt, typename boost::multiprecision::literals::detail::unsigned_cpp_int_literal_result_type<(sizeof...(STR)) - 2>::backend_type>::value; -} -# 180 "/usr/include/boost/multiprecision/cpp_int/literals.hpp" 3 4 -template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppi128(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> >::value;}template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppui128(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<128, 128, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >::value;} -template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppi256(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> >::value;}template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppui256(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >::value;} -template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppi512(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<512, 512, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> >::value;}template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512, 512, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppui512(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<512, 512, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >::value;} -template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<1024, 1024, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppi1024(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<1024, 1024, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> >::value;}template <char... STR> constexpr boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<1024, 1024, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> > operator "" _cppui1024(){ typedef typename boost::multiprecision::literals::detail::make_packed_value_from_str<STR...>::type pt; return boost::multiprecision::literals::detail::make_backend_from_pack< pt, boost::multiprecision::backends::cpp_int_backend<1024, 1024, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >::value;} - -} - - - - -template <unsigned MinBits, cpp_int_check_type Checked> -constexpr number<cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>, et_off> - operator - (const number<cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>, et_off>& a) -{ - return cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>(a.backend(), boost::multiprecision::literals::detail::make_negate_tag()); -} -template <unsigned MinBits, cpp_int_check_type Checked> -constexpr number<cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>, et_off> - operator - (number<cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>, et_off>&& a) -{ - return cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>(static_cast<const number<cpp_int_backend<MinBits, MinBits, signed_magnitude, Checked, void>, et_off>&>(a).backend(), boost::multiprecision::literals::detail::make_negate_tag()); -} - -}} -# 1984 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 - -# 1 "/usr/include/boost/multiprecision/cpp_int/serialize.hpp" 1 3 4 -# 9 "/usr/include/boost/multiprecision/cpp_int/serialize.hpp" 3 4 -namespace boost { - -namespace archive{ - -class binary_oarchive; -class binary_iarchive; - -} - -namespace serialization { - -namespace mp = boost::multiprecision; - -namespace cpp_int_detail{ - -using namespace boost::multiprecision; -using namespace boost::multiprecision::backends; - -template <class T> -struct is_binary_archive : public mpl::false_ {}; -template <> -struct is_binary_archive<boost::archive::binary_oarchive> : public mpl::true_ {}; -template <> -struct is_binary_archive<boost::archive::binary_iarchive> : public mpl::true_ {}; - - - - - - - -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::false_ const&) -{ - - - - - using boost::serialization::make_nvp; - bool s; - ar & make_nvp("sign", s); - std::size_t limb_count; - std::size_t byte_count; - ar & make_nvp("byte-count", byte_count); - limb_count = byte_count / sizeof(limb_type) + ((byte_count % sizeof(limb_type)) ? 1 : 0); - val.resize(limb_count, limb_count); - limb_type* pl = val.limbs(); - for(std::size_t i = 0; i < limb_count; ++i) - { - pl[i] = 0; - for(std::size_t j = 0; (j < sizeof(limb_type)) && byte_count; ++j) - { - unsigned char byte; - ar & make_nvp("byte", byte); - pl[i] |= static_cast<limb_type>(byte) << (j * 8); - --byte_count; - } - } - if(s != val.sign()) - val.negate(); - val.normalize(); -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::false_ const&) -{ - - - - - using boost::serialization::make_nvp; - bool s = val.sign(); - ar & make_nvp("sign", s); - limb_type* pl = val.limbs(); - std::size_t limb_count = val.size(); - std::size_t byte_count = limb_count * sizeof(limb_type); - ar & make_nvp("byte-count", byte_count); - - for(std::size_t i = 0; i < limb_count; ++i) - { - limb_type l = pl[i]; - for(std::size_t j = 0; j < sizeof(limb_type); ++j) - { - unsigned char byte = static_cast<unsigned char>((l >> (j * 8)) & ((1u << 8) - 1)); - ar & make_nvp("byte", byte); - } - } -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::false_ const&) -{ - - - - using boost::serialization::make_nvp; - bool s; - typename Int::local_limb_type l = 0; - ar & make_nvp("sign", s); - std::size_t byte_count; - ar & make_nvp("byte-count", byte_count); - for(std::size_t i = 0; i < byte_count; ++i) - { - unsigned char b; - ar & make_nvp("byte", b); - l |= static_cast<typename Int::local_limb_type>(b) << (i * 8); - } - *val.limbs() = l; - if(s != val.sign()) - val.negate(); -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::false_ const&) -{ - - - - using boost::serialization::make_nvp; - bool s = val.sign(); - typename Int::local_limb_type l = *val.limbs(); - ar & make_nvp("sign", s); - std::size_t limb_count = sizeof(l); - ar & make_nvp("byte-count", limb_count); - for(std::size_t i = 0; i < limb_count; ++i) - { - unsigned char b = static_cast<unsigned char>(static_cast<typename Int::local_limb_type>(l >> (i * 8)) & static_cast<typename Int::local_limb_type>((1u << 8) - 1)); - ar & make_nvp("byte", b); - } -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::true_ const&) -{ - - - - bool s; - std::size_t c; - ar & s; - ar & c; - val.resize(c, c); - ar.load_binary(val.limbs(), c * sizeof(limb_type)); - if(s != val.sign()) - val.negate(); - val.normalize(); -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::true_ const&) -{ - - - - bool s = val.sign(); - std::size_t c = val.size(); - ar & s; - ar & c; - ar.save_binary(val.limbs(), c * sizeof(limb_type)); -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::true_ const&) -{ - - - - bool s; - ar & s; - ar.load_binary(val.limbs(), sizeof(*val.limbs())); - if(s != val.sign()) - val.negate(); -} -template <class Archive, class Int> -void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::true_ const&) -{ - - - - bool s = val.sign(); - ar & s; - ar.save_binary(val.limbs(), sizeof(*val.limbs())); -} - -} - -template<class Archive, unsigned MinBits, unsigned MaxBits, mp::cpp_integer_type SignType, mp::cpp_int_check_type Checked, class Allocator> -void serialize(Archive & ar, mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& val, const unsigned int ) -{ - typedef typename Archive::is_saving save_tag; - typedef mpl::bool_<mp::backends::is_trivial_cpp_int<mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> trivial_tag; - typedef typename cpp_int_detail::is_binary_archive<Archive>::type binary_tag; - - - cpp_int_detail::do_serialize(ar, val, save_tag(), trivial_tag(), binary_tag()); -} - -}} -# 1986 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 1 "/usr/include/boost/multiprecision/cpp_int/import_export.hpp" 1 3 4 -# 10 "/usr/include/boost/multiprecision/cpp_int/import_export.hpp" 3 4 -namespace boost { - namespace multiprecision { - - namespace detail { - - template <class Backend, class Unsigned> - void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::false_& tag) - { - unsigned limb = bit_location / (sizeof(limb_type) * 8); - unsigned shift = bit_location % (sizeof(limb_type) * 8); - - limb_type mask = chunk_bits >= sizeof(limb_type) * 8 ? ~static_cast<limb_type>(0u) : (static_cast<limb_type>(1u) << chunk_bits) - 1; - - limb_type value = static_cast<limb_type>(bits & mask) << shift; - if(value) - { - if(val.size() == limb) - { - val.resize(limb + 1, limb + 1); - if(val.size() > limb) - val.limbs()[limb] = value; - } - else if(val.size() > limb) - val.limbs()[limb] |= value; - } - if(chunk_bits > sizeof(limb_type) * 8 - shift) - { - shift = sizeof(limb_type) * 8 - shift; - chunk_bits -= shift; - bit_location += shift; - bits >>= shift; - if(bits) - assign_bits(val, bits, bit_location, chunk_bits, tag); - } - } - template <class Backend, class Unsigned> - void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::true_&) - { - typedef typename Backend::local_limb_type local_limb_type; - - - - - if((bit_location >= sizeof(local_limb_type) * 8) && bits) - val.resize(2, 2); - else - { - local_limb_type mask = chunk_bits >= sizeof(local_limb_type) * 8 ? ~static_cast<local_limb_type>(0u) : (static_cast<local_limb_type>(1u) << chunk_bits) - 1; - local_limb_type value = (static_cast<local_limb_type>(bits) & mask) << bit_location; - *val.limbs() |= value; - - - - bit_location = sizeof(local_limb_type) * 8 - bit_location; - if((bit_location < sizeof(bits)*8) && (bits >>= bit_location)) - val.resize(2, 2); - } - } - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> - inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned bits, const mpl::false_&) - { - unsigned limb_count = static_cast<unsigned>(bits / (sizeof(limb_type) * 8)); - if(bits % (sizeof(limb_type) * 8)) - ++limb_count; - static const unsigned max_limbs = MaxBits ? MaxBits / (8 * sizeof(limb_type)) + ((MaxBits % (8 * sizeof(limb_type))) ? 1 : 0) : (std::numeric_limits<unsigned>::max)(); - if(limb_count > max_limbs) - limb_count = max_limbs; - newval.resize(limb_count, limb_count); - std::memset(newval.limbs(), 0, newval.size() * sizeof(limb_type)); - } - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator> - inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned, const mpl::true_&) - { - *newval.limbs() = 0; - } - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator> - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& - import_bits_generic( - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true) - { - typename number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>::backend_type newval; - - typedef typename std::iterator_traits<Iterator>::value_type value_type; - typedef typename boost::make_unsigned<value_type>::type unsigned_value_type; - typedef typename std::iterator_traits<Iterator>::difference_type difference_type; - typedef typename boost::make_unsigned<difference_type>::type size_type; - typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type; - - if(!chunk_size) - chunk_size = std::numeric_limits<value_type>::digits; - - size_type limbs = std::distance(i, j); - size_type bits = limbs * chunk_size; - - detail::resize_to_bit_size(newval, static_cast<unsigned>(bits), tag_type()); - - difference_type bit_location = msv_first ? bits - chunk_size : 0; - difference_type bit_location_change = msv_first ? -static_cast<difference_type>(chunk_size) : chunk_size; - - while(i != j) - { - detail::assign_bits(newval, static_cast<unsigned_value_type>(*i), static_cast<unsigned>(bit_location), chunk_size, tag_type()); - ++i; - bit_location += bit_location_change; - } - - newval.normalize(); - - val.backend().swap(newval); - return val; - } - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T> - inline typename boost::disable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type - import_bits_fast( - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0) - { - std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / 8 : sizeof(*i)); - std::size_t limb_len = byte_len / sizeof(limb_type); - if(byte_len % sizeof(limb_type)) - ++limb_len; - cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend(); - result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); - result.limbs()[result.size() - 1] = 0u; - std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(limb_type))); - result.normalize(); - return val; - } - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T> - inline typename boost::enable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type - import_bits_fast( - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0) - { - cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend(); - std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / 8 : sizeof(*i)); - std::size_t limb_len = byte_len / sizeof(result.limbs()[0]); - if(byte_len % sizeof(result.limbs()[0])) - ++limb_len; - result.limbs()[0] = 0u; - result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); - std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(result.limbs()[0]))); - result.normalize(); - return val; - } - } - - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator> - inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& - import_bits( - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true) - { - return detail::import_bits_generic(val, i, j, chunk_size, msv_first); - } - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T> - inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& - import_bits( - number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0, bool msv_first = true) - { - - if(((chunk_size % 8) == 0) && !msv_first) - return detail::import_bits_fast(val, i, j, chunk_size); - - return detail::import_bits_generic(val, i, j, chunk_size, msv_first); - } - - namespace detail { - - template <class Backend> - boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::false_& tag) - { - unsigned limb = location / (sizeof(limb_type) * 8); - unsigned shift = location % (sizeof(limb_type) * 8); - boost::uintmax_t result = 0; - boost::uintmax_t mask = count == std::numeric_limits<boost::uintmax_t>::digits ? ~static_cast<boost::uintmax_t>(0) : (static_cast<boost::uintmax_t>(1u) << count) - 1; - if(count > (sizeof(limb_type) * 8 - shift)) - { - result = extract_bits(val, location + sizeof(limb_type) * 8 - shift, count - sizeof(limb_type) * 8 + shift, tag); - result <<= sizeof(limb_type) * 8 - shift; - } - if(limb < val.size()) - result |= (val.limbs()[limb] >> shift) & mask; - return result; - } - - template <class Backend> - inline boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::true_&) - { - typename Backend::local_limb_type result = *val.limbs(); - typename Backend::local_limb_type mask = count >= std::numeric_limits<typename Backend::local_limb_type>::digits ? ~static_cast<typename Backend::local_limb_type>(0) : (static_cast<typename Backend::local_limb_type>(1u) << count) - 1; - return (result >> location) & mask; - } - - } - - template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class OutputIterator> - OutputIterator export_bits( - const number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, OutputIterator out, unsigned chunk_size, bool msv_first = true) - { - - - - - typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type; - if(!val) - { - *out = 0; - ++out; - return out; - } - unsigned bitcount = boost::multiprecision::backends::eval_msb_imp(val.backend()) + 1; - unsigned chunks = bitcount / chunk_size; - if(bitcount % chunk_size) - ++chunks; - - int bit_location = msv_first ? bitcount - chunk_size : 0; - int bit_step = msv_first ? -static_cast<int>(chunk_size) : chunk_size; - while(bit_location % bit_step) ++bit_location; - - do - { - *out = detail::extract_bits(val.backend(), bit_location, chunk_size, tag_type()); - ++out; - bit_location += bit_step; - } while((bit_location >= 0) && (bit_location < (int)bitcount)); - - return out; - - - - } - - } -} -# 1987 "/usr/include/boost/multiprecision/cpp_int.hpp" 2 3 4 -# 5 "/home/nivoliev/Sandbox/Cpp/convex.cpp" 2 - - - -# 1 "/usr/include/c++/9.2.0/random" 1 3 -# 32 "/usr/include/c++/9.2.0/random" 3 - -# 33 "/usr/include/c++/9.2.0/random" 3 - - - - - -# 1 "/usr/include/c++/9.2.0/cmath" 1 3 -# 39 "/usr/include/c++/9.2.0/cmath" 3 - -# 40 "/usr/include/c++/9.2.0/cmath" 3 -# 39 "/usr/include/c++/9.2.0/random" 2 3 -# 1 "/usr/include/c++/9.2.0/cstdlib" 1 3 -# 39 "/usr/include/c++/9.2.0/cstdlib" 3 - -# 40 "/usr/include/c++/9.2.0/cstdlib" 3 -# 40 "/usr/include/c++/9.2.0/random" 2 3 -# 49 "/usr/include/c++/9.2.0/random" 3 -# 1 "/usr/include/c++/9.2.0/bits/random.h" 1 3 -# 37 "/usr/include/c++/9.2.0/bits/random.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 56 "/usr/include/c++/9.2.0/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 const _UIntType __value = 0; }; - - template<typename _UIntType, size_t __w> - struct _Shift<_UIntType, __w, true> - { static const _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> - { typedef unsigned int type; }; - - template<int __s> - struct _Select_uint_least_t<__s, 3> - { typedef unsigned long type; }; - - template<int __s> - struct _Select_uint_least_t<__s, 2> - { typedef unsigned long long type; }; - - - template<int __s> - struct _Select_uint_least_t<__s, 1> - { typedef unsigned __int128 type; }; - - - - 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 - { - typedef typename _Select_uint_least_t<std::__lg(__a) - + std::__lg(__m) + 2>::type _Tp2; - static _Tp - __calc(_Tp __x) - { 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) - { return _Mod<_Tp, __m, __a, __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 __is_seed_seq = __and_< - __not_<is_same<__remove_cvref_t<_Sseq>, _Engine>>, - is_unsigned<typename _Sseq::result_type>, - __not_<is_convertible<_Sseq, _Res>> - >; - - } -# 243 "/usr/include/c++/9.2.0/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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, linear_congruential_engine, _UIntType>::value>::type; - - 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) - { } -# 281 "/usr/include/c++/9.2.0/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); -# 312 "/usr/include/c++/9.2.0/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; - } -# 364 "/usr/include/c++/9.2.0/bits/random.h" 3 - friend bool - operator==(const linear_congruential_engine& __lhs, - const linear_congruential_engine& __rhs) - { return __lhs._M_x == __rhs._M_x; } -# 377 "/usr/include/c++/9.2.0/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); -# 397 "/usr/include/c++/9.2.0/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; - }; -# 419 "/usr/include/c++/9.2.0/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); } -# 456 "/usr/include/c++/9.2.0/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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, mersenne_twister_engine, _UIntType>::value>::type; - - 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()(); -# 575 "/usr/include/c++/9.2.0/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); } -# 593 "/usr/include/c++/9.2.0/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); -# 619 "/usr/include/c++/9.2.0/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; - }; -# 652 "/usr/include/c++/9.2.0/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); } -# 680 "/usr/include/c++/9.2.0/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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, subtract_with_carry_engine, _UIntType>::value>::type; - - 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 result_type default_seed = 19780503u; - - subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) - { } - - - - - - 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); } -# 738 "/usr/include/c++/9.2.0/bits/random.h" 3 - 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) - { - for (; __z != 0ULL; --__z) - (*this)(); - } - - - - - result_type - operator()(); -# 793 "/usr/include/c++/9.2.0/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); } -# 812 "/usr/include/c++/9.2.0/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); -# 831 "/usr/include/c++/9.2.0/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; - }; -# 857 "/usr/include/c++/9.2.0/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); } -# 872 "/usr/include/c++/9.2.0/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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, discard_block_engine, result_type>::value>::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()(); -# 1023 "/usr/include/c++/9.2.0/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; } -# 1039 "/usr/include/c++/9.2.0/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); -# 1057 "/usr/include/c++/9.2.0/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; - }; -# 1080 "/usr/include/c++/9.2.0/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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, independent_bits_engine, _UIntType>::value>::type; - - 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()(); -# 1234 "/usr/include/c++/9.2.0/bits/random.h" 3 - friend bool - operator==(const independent_bits_engine& __lhs, - const independent_bits_engine& __rhs) - { return __lhs._M_b == __rhs._M_b; } -# 1251 "/usr/include/c++/9.2.0/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; - }; -# 1277 "/usr/include/c++/9.2.0/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); } -# 1295 "/usr/include/c++/9.2.0/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; - } - - - - - - - - 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 = typename enable_if<__detail::__is_seed_seq< - _Sseq, shuffle_order_engine, result_type>::value>::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()(); -# 1464 "/usr/include/c++/9.2.0/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); } -# 1482 "/usr/include/c++/9.2.0/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); -# 1500 "/usr/include/c++/9.2.0/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; - }; -# 1530 "/usr/include/c++/9.2.0/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; -# 1559 "/usr/include/c++/9.2.0/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(); } -# 1621 "/usr/include/c++/9.2.0/bits/random.h" 3 - 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; - - union - { - void* _M_file; - mt19937 _M_mt; - }; - }; -# 1690 "/usr/include/c++/9.2.0/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); } -# 1706 "/usr/include/c++/9.2.0/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>&); -# 1720 "/usr/include/c++/9.2.0/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>&); -# 1733 "/usr/include/c++/9.2.0/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) - { - ; - } - - 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); } -# 1927 "/usr/include/c++/9.2.0/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>&); -# 1941 "/usr/include/c++/9.2.0/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>&); -# 1963 "/usr/include/c++/9.2.0/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) - { - ; - } - - _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), _M_saved_available(false) - { } - - explicit - normal_distribution(const param_type& __p) - : _M_param(__p), _M_saved_available(false) - { } - - - - - 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); -# 2132 "/usr/include/c++/9.2.0/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); -# 2147 "/usr/include/c++/9.2.0/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; - bool _M_saved_available; - }; - - - - - template<typename _RealType> - inline bool - operator!=(const std::normal_distribution<_RealType>& __d1, - const std::normal_distribution<_RealType>& __d2) - { return !(__d1 == __d2); } -# 2184 "/usr/include/c++/9.2.0/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); } -# 2343 "/usr/include/c++/9.2.0/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); -# 2358 "/usr/include/c++/9.2.0/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); } -# 2395 "/usr/include/c++/9.2.0/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) - { - ; - _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); } -# 2575 "/usr/include/c++/9.2.0/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); -# 2589 "/usr/include/c++/9.2.0/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); } -# 2623 "/usr/include/c++/9.2.0/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; } -# 2791 "/usr/include/c++/9.2.0/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); -# 2806 "/usr/include/c++/9.2.0/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); } -# 2847 "/usr/include/c++/9.2.0/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); } -# 3024 "/usr/include/c++/9.2.0/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); -# 3039 "/usr/include/c++/9.2.0/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); -# 3055 "/usr/include/c++/9.2.0/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); } -# 3230 "/usr/include/c++/9.2.0/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); -# 3245 "/usr/include/c++/9.2.0/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); } -# 3287 "/usr/include/c++/9.2.0/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); } -# 3452 "/usr/include/c++/9.2.0/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); -# 3467 "/usr/include/c++/9.2.0/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); } -# 3515 "/usr/include/c++/9.2.0/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) - { - ; - } - - 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); } -# 3698 "/usr/include/c++/9.2.0/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); -# 3712 "/usr/include/c++/9.2.0/bits/random.h" 3 - template<typename _CharT, typename _Traits> - std::basic_istream<_CharT, _Traits>& - operator>>(std::basic_istream<_CharT, _Traits>& __is, - std::bernoulli_distribution& __x) - { - double __p; - __is >> __p; - __x.param(bernoulli_distribution::param_type(__p)); - return __is; - } -# 3731 "/usr/include/c++/9.2.0/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) - { - - - ; - _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; } -# 3913 "/usr/include/c++/9.2.0/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); -# 3929 "/usr/include/c++/9.2.0/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); } -# 3971 "/usr/include/c++/9.2.0/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) - { - ; - _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); } -# 4152 "/usr/include/c++/9.2.0/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); -# 4167 "/usr/include/c++/9.2.0/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); -# 4181 "/usr/include/c++/9.2.0/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) - { - ; - } - - _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; } -# 4349 "/usr/include/c++/9.2.0/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); -# 4364 "/usr/include/c++/9.2.0/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); } -# 4412 "/usr/include/c++/9.2.0/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) - { - ; - _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; } -# 4579 "/usr/include/c++/9.2.0/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); -# 4594 "/usr/include/c++/9.2.0/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); } -# 4638 "/usr/include/c++/9.2.0/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) - { - ; - } - - _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); } -# 4823 "/usr/include/c++/9.2.0/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); -# 4838 "/usr/include/c++/9.2.0/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); -# 4853 "/usr/include/c++/9.2.0/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); } -# 5033 "/usr/include/c++/9.2.0/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); -# 5048 "/usr/include/c++/9.2.0/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); -# 5063 "/usr/include/c++/9.2.0/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); } -# 5243 "/usr/include/c++/9.2.0/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); -# 5258 "/usr/include/c++/9.2.0/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); -# 5270 "/usr/include/c++/9.2.0/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; } -# 5456 "/usr/include/c++/9.2.0/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); -# 5472 "/usr/include/c++/9.2.0/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); } -# 5505 "/usr/include/c++/9.2.0/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; } -# 5727 "/usr/include/c++/9.2.0/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); -# 5743 "/usr/include/c++/9.2.0/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); } -# 5776 "/usr/include/c++/9.2.0/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; } -# 6000 "/usr/include/c++/9.2.0/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); -# 6016 "/usr/include/c++/9.2.0/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); } -# 6057 "/usr/include/c++/9.2.0/bits/random.h" 3 - class seed_seq - { - public: - - typedef uint_least32_t result_type; - - - seed_seq() noexcept - : _M_v() - { } - - template<typename _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; - }; - - - - - - -} -# 50 "/usr/include/c++/9.2.0/random" 2 3 -# 1 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/opt_random.h" 1 3 -# 38 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/opt_random.h" 3 - -# 39 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/opt_random.h" 3 - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 217 "/usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/opt_random.h" 3 - -} -# 51 "/usr/include/c++/9.2.0/random" 2 3 -# 1 "/usr/include/c++/9.2.0/bits/random.tcc" 1 3 -# 33 "/usr/include/c++/9.2.0/bits/random.tcc" 3 -# 1 "/usr/include/c++/9.2.0/numeric" 1 3 -# 58 "/usr/include/c++/9.2.0/numeric" 3 - -# 59 "/usr/include/c++/9.2.0/numeric" 3 - - - -# 1 "/usr/include/c++/9.2.0/bits/stl_numeric.h" 1 3 -# 65 "/usr/include/c++/9.2.0/bits/stl_numeric.h" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 80 "/usr/include/c++/9.2.0/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; - } - } - - -} - - - -namespace std __attribute__ ((__visibility__ ("default"))) -{ - -# 126 "/usr/include/c++/9.2.0/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; - } -# 152 "/usr/include/c++/9.2.0/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; - } -# 180 "/usr/include/c++/9.2.0/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; - } -# 211 "/usr/include/c++/9.2.0/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; - } -# 244 "/usr/include/c++/9.2.0/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; - } -# 284 "/usr/include/c++/9.2.0/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; - } -# 324 "/usr/include/c++/9.2.0/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; - } -# 366 "/usr/include/c++/9.2.0/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++/9.2.0/numeric" 2 3 -# 79 "/usr/include/c++/9.2.0/numeric" 3 -namespace std __attribute__ ((__visibility__ ("default"))) -{ - - -namespace __detail -{ - - template<typename _Tp> - constexpr - enable_if_t<__and_<is_integral<_Tp>, is_signed<_Tp>>::value, _Tp> - __abs_integral(_Tp __val) - { return __val < 0 ? -__val : __val; } - - template<typename _Tp> - constexpr - enable_if_t<__and_<is_integral<_Tp>, is_unsigned<_Tp>>::value, _Tp> - __abs_integral(_Tp __val) - { return __val; } - - void __abs_integral(bool) = delete; - - template<typename _Mn, typename _Nn> - constexpr common_type_t<_Mn, _Nn> - __gcd(_Mn __m, _Nn __n) - { - return __m == 0 ? __detail::__abs_integral(__n) - : __n == 0 ? __detail::__abs_integral(__m) - : __detail::__gcd(__n, __m % __n); - } - - - template<typename _Mn, typename _Nn> - constexpr common_type_t<_Mn, _Nn> - __lcm(_Mn __m, _Nn __n) - { - return (__m != 0 && __n != 0) - ? (__detail::__abs_integral(__m) / __detail::__gcd(__m, __n)) - * __detail::__abs_integral(__n) - : 0; - } -} -# 158 "/usr/include/c++/9.2.0/numeric" 3 - -} -# 34 "/usr/include/c++/9.2.0/bits/random.tcc" 2 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; - } - - } - - template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> - constexpr _UIntType - linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier; - - template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> - constexpr _UIntType - linear_congruential_engine<_UIntType, __a, __c, __m>::increment; - - template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> - constexpr _UIntType - linear_congruential_engine<_UIntType, __a, __c, __m>::modulus; - - template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> - constexpr _UIntType - linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed; - - - - - - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec); - - __is >> __lcr._M_x; - - __is.flags(__flags); - return __is; - } - - - 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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::word_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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::shift_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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::mask_bits; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::xor_mask; - - 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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_u; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_d; - - 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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_s; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_b; - - 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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_t; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_c; - - 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> - constexpr size_t - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::tempering_l; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>:: - initialization_multiplier; - - 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> - constexpr _UIntType - mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, - __s, __b, __t, __c, __l, __f>::default_seed; - - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __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; - } - - - template<typename _UIntType, size_t __w, size_t __s, size_t __r> - constexpr size_t - subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size; - - template<typename _UIntType, size_t __w, size_t __s, size_t __r> - constexpr size_t - subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag; - - template<typename _UIntType, size_t __w, size_t __s, size_t __r> - constexpr size_t - subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag; - - template<typename _UIntType, size_t __w, size_t __s, size_t __r> - constexpr _UIntType - subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed; - - 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<result_type, 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_ostream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __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; - } - - - template<typename _RandomNumberEngine, size_t __p, size_t __r> - constexpr size_t - discard_block_engine<_RandomNumberEngine, __p, __r>::block_size; - - template<typename _RandomNumberEngine, size_t __p, size_t __r> - constexpr size_t - discard_block_engine<_RandomNumberEngine, __p, __r>::used_block; - - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __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; - } - - - template<typename _RandomNumberEngine, size_t __k> - constexpr size_t - shuffle_order_engine<_RandomNumberEngine, __k>::table_size; - - template<typename _RandomNumberEngine, size_t __k> - typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type - shuffle_order_engine<_RandomNumberEngine, __k>:: - operator()() - { - size_t __j = __k * ((_M_y - _M_b.min()) - / (_M_b.max() - _M_b.min() + 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _IntType __a, __b; - __is >> __a >> __b; - __x.param(typename uniform_int_distribution<_IntType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::skipws); - - _RealType __a, __b; - __is >> __a >> __b; - __x.param(typename uniform_real_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::skipws); - - double __p; - __is >> __p; - __x.param(typename geometric_distribution<_IntType>::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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::skipws); - - _IntType __k; - double __p; - __is >> __k >> __p >> __x._M_gd; - __x.param(typename negative_binomial_distribution<_IntType>:: - 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); - } -# 1280 "/usr/include/c++/9.2.0/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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::skipws); - - double __mean; - __is >> __mean >> __x._M_nd; - __x.param(typename poisson_distribution<_IntType>::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; - } -# 1536 "/usr/include/c++/9.2.0/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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _IntType __t; - double __p; - __is >> __t >> __p >> __x._M_nd; - __x.param(typename binomial_distribution<_IntType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __lambda; - __is >> __lambda; - __x.param(typename exponential_distribution<_RealType>:: - param_type(__lambda)); - - __is.flags(__flags); - return __is; - } -# 1785 "/usr/include/c++/9.2.0/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) - { - if (__d1._M_saved_available - && __d1._M_saved == __d2._M_saved) - return true; - else if(!__d1._M_saved_available) - return true; - else - return false; - } - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - double __mean, __stddev; - __is >> __mean >> __stddev - >> __x._M_saved_available; - if (__x._M_saved_available) - __is >> __x._M_saved; - __x.param(typename normal_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __m, __s; - __is >> __m >> __s >> __x._M_nd; - __x.param(typename lognormal_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __n; - __is >> __n >> __x._M_gd; - __x.param(typename chi_squared_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __a, __b; - __is >> __a >> __b; - __x.param(typename cauchy_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __m, __n; - __is >> __m >> __n >> __x._M_gd_x >> __x._M_gd_y; - __x.param(typename fisher_f_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __n; - __is >> __n >> __x._M_nd >> __x._M_gd; - __x.param(typename student_t_distribution<_RealType>::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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __alpha_val, __beta_val; - __is >> __alpha_val >> __beta_val >> __x._M_nd; - __x.param(typename gamma_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __a, __b; - __is >> __a >> __b; - __x.param(typename weibull_distribution<_RealType>:: - 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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - _RealType __a, __b; - __is >> __a >> __b; - __x.param(typename extreme_value_distribution<_RealType>:: - 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); - - __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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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; - } - - template<typename _IntType, typename _CharT, typename _Traits> - std::basic_istream<_CharT, _Traits>& - operator>>(std::basic_istream<_CharT, _Traits>& __is, - discrete_distribution<_IntType>& __x) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - size_t __n; - __is >> __n; - - std::vector<double> __prob_vec; - __prob_vec.reserve(__n); - for (; __n != 0; --__n) - { - double __prob; - __is >> __prob; - __prob_vec.push_back(__prob); - } - - __x.param(typename discrete_distribution<_IntType>:: - param_type(__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); - - __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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - size_t __n; - __is >> __n; - - std::vector<_RealType> __int_vec; - __int_vec.reserve(__n + 1); - for (size_t __i = 0; __i <= __n; ++__i) - { - _RealType __int; - __is >> __int; - __int_vec.push_back(__int); - } - - std::vector<double> __den_vec; - __den_vec.reserve(__n); - for (size_t __i = 0; __i < __n; ++__i) - { - double __den; - __is >> __den; - __den_vec.push_back(__den); - } - - __x.param(typename piecewise_constant_distribution<_RealType>:: - param_type(__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); - } - - - __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) - { - typedef std::basic_ostream<_CharT, _Traits> __ostream_type; - typedef typename __ostream_type::ios_base __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) - { - typedef std::basic_istream<_CharT, _Traits> __istream_type; - typedef typename __istream_type::ios_base __ios_base; - - const typename __ios_base::fmtflags __flags = __is.flags(); - __is.flags(__ios_base::dec | __ios_base::skipws); - - size_t __n; - __is >> __n; - - std::vector<_RealType> __int_vec; - __int_vec.reserve(__n + 1); - for (size_t __i = 0; __i <= __n; ++__i) - { - _RealType __int; - __is >> __int; - __int_vec.push_back(__int); - } - - std::vector<double> __den_vec; - __den_vec.reserve(__n + 1); - for (size_t __i = 0; __i <= __n; ++__i) - { - double __den; - __is >> __den; - __den_vec.push_back(__den); - } - - __x.param(typename piecewise_linear_distribution<_RealType>:: - param_type(__int_vec.begin(), __int_vec.end(), __den_vec.begin())); - - __is.flags(__flags); - return __is; - } - - - template<typename _IntType> - seed_seq::seed_seq(std::initializer_list<_IntType> __il) - { - 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) - { - 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); - - for (size_t __k = 0; __k < __m; ++__k) - { - _Type __arg = (__begin[__k % __n] - ^ __begin[(__k + __p) % __n] - ^ __begin[(__k - 1) % __n]); - _Type __r1 = __arg ^ (__arg >> 27); - __r1 = __detail::__mod<_Type, - __detail::_Shift<_Type, 32>::__value>(1664525u * __r1); - _Type __r2 = __r1; - if (__k == 0) - __r2 += __s; - else if (__k <= __s) - __r2 += __k % __n + _M_v[__k - 1]; - else - __r2 += __k % __n; - __r2 = __detail::__mod<_Type, - __detail::_Shift<_Type, 32>::__value>(__r2); - __begin[(__k + __p) % __n] += __r1; - __begin[(__k + __q) % __n] += __r2; - __begin[__k % __n] = __r2; - } - - for (size_t __k = __m; __k < __m + __n; ++__k) - { - _Type __arg = (__begin[__k % __n] - + __begin[(__k + __p) % __n] - + __begin[(__k - 1) % __n]); - _Type __r3 = __arg ^ (__arg >> 27); - __r3 = __detail::__mod<_Type, - __detail::_Shift<_Type, 32>::__value>(1566083941u * __r3); - _Type __r4 = __r3 - __k % __n; - __r4 = __detail::__mod<_Type, - __detail::_Shift<_Type, 32>::__value>(__r4); - __begin[(__k + __p) % __n] ^= __r3; - __begin[(__k + __q) % __n] ^= __r4; - __begin[__k % __n] = __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; - } - - -} -# 52 "/usr/include/c++/9.2.0/random" 2 3 -# 9 "/home/nivoliev/Sandbox/Cpp/convex.cpp" 2 - - -# 1 "/usr/include/c++/9.2.0/cmath" 1 3 -# 39 "/usr/include/c++/9.2.0/cmath" 3 - -# 40 "/usr/include/c++/9.2.0/cmath" 3 -# 12 "/home/nivoliev/Sandbox/Cpp/convex.cpp" 2 - - -# 13 "/home/nivoliev/Sandbox/Cpp/convex.cpp" struct vec { vec(float x, float y) : x(x), y(y) {} float x ; @@ -143773,7 +30,7 @@ struct vec { float length2() const { return x*x + y*y ; } - + float length() const { return sqrt(length2()) ; } @@ -143792,7 +49,7 @@ int orient(const vec& v0, const vec& v1) { if(d > 0) return 1 ; if(d < 0) return -1 ; std::cout << "zero case" << std::endl ; - + //return 0 ; if(v1y > 0) return 1 ; if(v1y < 0) return -1 ; if(v1x > 0) return -1 ; @@ -143814,7 +71,7 @@ struct vec_compare { } ; size_t leftmost(const std::vector<vec>& points) { - size_t min = 0 ; + size_t min = 0 ; for(size_t i = 1; i < points.size(); ++i) { if(points[i].x < points[min].x) { min = i ;