Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1749502 Details for
Bug 1918957
GCC Seg Fault
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Output from compiler
cc7cRfss.out (text/x-csrc), 2.93 MB, created by
jacob.gannon
on 2021-01-21 18:39:17 UTC
(
hide
)
Description:
Output from compiler
Filename:
MIME Type:
Creator:
jacob.gannon
Created:
2021-01-21 18:39:17 UTC
Size:
2.93 MB
patch
obsolete
>// /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus -quiet -I /opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include -I /opt/osi/12.2/monarch_x86_64/monarch/src/hsh_mongo/include -I /opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include -I /opt/osi/12.2/monarch_x86_64/monarch/src/include -I ../include -I /opt/osi/12.2/monarch_x86_64/monarch/src/chronus/hsh_chronus_deployer -D_GNU_SOURCE -D LINUX -D UNIX -D _REENTRANT -D OSI64 LogDataProvider.cpp -quiet -dumpbase LogDataProvider.cpp -msse2 -mtune=generic -march=x86-64 -auxbase-strip LogDataProvider.o -O2 -O2 -Wreturn-type -std=c++11 -fPIC -fno-guess-branch-probability -fno-strict-aliasing -o - -frandom-seed=0 ># 1 "LogDataProvider.cpp" ># 1 "<built-in>" ># 1 "<command-line>" ># 1 "/usr/include/stdc-predef.h" 1 3 4 ># 1 "<command-line>" 2 ># 1 "LogDataProvider.cpp" ># 1 "LogDataProvider.h" 1 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_HistorianQueryConnection.h" 1 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 1 > > > > > ># 1 "/usr/include/c++/4.8.2/vector" 1 3 ># 58 "/usr/include/c++/4.8.2/vector" 3 > ># 59 "/usr/include/c++/4.8.2/vector" 3 > ># 1 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 1 3 ># 59 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 1 3 > > ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 4 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 2 3 ># 1855 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 3 >namespace std >{ > typedef long unsigned int size_t; > typedef long int ptrdiff_t; > > > typedef decltype(nullptr) nullptr_t; > >} ># 2097 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h" 1 3 ># 39 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h" 3 ># 1 "/usr/include/features.h" 1 3 4 ># 375 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 392 "/usr/include/sys/cdefs.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 393 "/usr/include/sys/cdefs.h" 2 3 4 ># 376 "/usr/include/features.h" 2 3 4 ># 399 "/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 ># 400 "/usr/include/features.h" 2 3 4 ># 40 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h" 2 3 ># 2098 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 2 3 > > ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/cpu_defines.h" 1 3 ># 2101 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h" 2 3 ># 60 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/functexcept.h" 1 3 ># 40 "/usr/include/c++/4.8.2/bits/functexcept.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/exception_defines.h" 1 3 ># 41 "/usr/include/c++/4.8.2/bits/functexcept.h" 2 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_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_system_error(int) __attribute__((__noreturn__)); > > void > __throw_future_error(int) __attribute__((__noreturn__)); > > > void > __throw_bad_function_call() __attribute__((__noreturn__)); > > >} ># 61 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/cpp_type_traits.h" 1 3 ># 35 "/usr/include/c++/4.8.2/bits/cpp_type_traits.h" 3 > ># 36 "/usr/include/c++/4.8.2/bits/cpp_type_traits.h" 3 ># 68 "/usr/include/c++/4.8.2/bits/cpp_type_traits.h" 3 >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Iterator, typename _Container> > class __normal_iterator; > > >} > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > struct __true_type { }; > struct __false_type { }; > > template<bool> > struct __truth_type > { typedef __false_type __type; }; > > template<> > struct __truth_type<true> > { typedef __true_type __type; }; > > > > template<class _Sp, class _Tp> > struct __traitor > { > enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; > typedef typename __truth_type<__value>::__type __type; > }; > > > template<typename, typename> > struct __are_same > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > template<typename _Tp> > struct __are_same<_Tp, _Tp> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > template<typename _Tp> > struct __is_void > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > template<> > struct __is_void<void> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > > > template<typename _Tp> > struct __is_integer > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > > > > template<> > struct __is_integer<bool> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<char> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<signed char> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<unsigned char> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > template<> > struct __is_integer<wchar_t> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > > template<> > struct __is_integer<char16_t> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<char32_t> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > template<> > struct __is_integer<short> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<unsigned short> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<int> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<unsigned int> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<long> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<unsigned long> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<long long> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_integer<unsigned long long> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > > > template<typename _Tp> > struct __is_floating > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > > template<> > struct __is_floating<float> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_floating<double> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > template<> > struct __is_floating<long double> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > > > template<typename _Tp> > struct __is_pointer > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > template<typename _Tp> > struct __is_pointer<_Tp*> > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > > > template<typename _Tp> > struct __is_normal_iterator > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > template<typename _Iterator, typename _Container> > struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, > _Container> > > { > 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_fundamental > : public __traitor<__is_void<_Tp>, __is_arithmetic<_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; > }; > > > > > template<typename _Tp> > struct __is_move_iterator > { > enum { __value = 0 }; > typedef __false_type __type; > }; > > > template<typename _Iterator> > class move_iterator; > > template<typename _Iterator> > struct __is_move_iterator< move_iterator<_Iterator> > > { > enum { __value = 1 }; > typedef __true_type __type; > }; > > > >} ># 62 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/ext/type_traits.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/type_traits.h" 3 > ># 33 "/usr/include/c++/4.8.2/ext/type_traits.h" 3 > > > > >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; } > > > > 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++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/ext/numeric_traits.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/numeric_traits.h" 3 > ># 33 "/usr/include/c++/4.8.2/ext/numeric_traits.h" 3 > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > ># 54 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_pair.h" 1 3 ># 59 "/usr/include/c++/4.8.2/bits/stl_pair.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/move.h" 1 3 ># 34 "/usr/include/c++/4.8.2/bits/move.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/concept_check.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/concept_check.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/concept_check.h" 3 ># 35 "/usr/include/c++/4.8.2/bits/move.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _Tp> > inline _Tp* > __addressof(_Tp& __r) noexcept > { > return reinterpret_cast<_Tp*> > (&const_cast<char&>(reinterpret_cast<const volatile char&>(__r))); > } > > >} > > ># 1 "/usr/include/c++/4.8.2/type_traits" 1 3 ># 32 "/usr/include/c++/4.8.2/type_traits" 3 > ># 33 "/usr/include/c++/4.8.2/type_traits" 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 56 "/usr/include/c++/4.8.2/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() { 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, 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 integral_constant<bool, !_Pp::value> > { }; > > struct __sfinae_types > { > typedef char __one; > typedef struct { char __arr[2]; } __two; > }; > > > > > > > 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 integral_constant<bool, (__is_void_helper<typename > remove_cv<_Tp>::type>::value)> > { }; > > template<typename> > struct __is_integral_helper > : public false_type { }; > > template<> > struct __is_integral_helper<bool> > : public true_type { }; > > template<> > struct __is_integral_helper<char> > : public true_type { }; > > template<> > struct __is_integral_helper<signed char> > : public true_type { }; > > template<> > struct __is_integral_helper<unsigned char> > : public true_type { }; > > > template<> > struct __is_integral_helper<wchar_t> > : public true_type { }; > > > template<> > struct __is_integral_helper<char16_t> > : public true_type { }; > > template<> > struct __is_integral_helper<char32_t> > : public true_type { }; > > template<> > struct __is_integral_helper<short> > : public true_type { }; > > template<> > struct __is_integral_helper<unsigned short> > : public true_type { }; > > template<> > struct __is_integral_helper<int> > : public true_type { }; > > template<> > struct __is_integral_helper<unsigned int> > : public true_type { }; > > template<> > struct __is_integral_helper<long> > : public true_type { }; > > template<> > struct __is_integral_helper<unsigned long> > : public true_type { }; > > template<> > struct __is_integral_helper<long long> > : public true_type { }; > > template<> > struct __is_integral_helper<unsigned long long> > : public true_type { }; ># 245 "/usr/include/c++/4.8.2/type_traits" 3 > template<typename _Tp> > struct is_integral > : public integral_constant<bool, (__is_integral_helper<typename > remove_cv<_Tp>::type>::value)> > { }; > > 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 { }; ># 274 "/usr/include/c++/4.8.2/type_traits" 3 > template<typename _Tp> > struct is_floating_point > : public integral_constant<bool, (__is_floating_point_helper<typename > remove_cv<_Tp>::type>::value)> > { }; > > > 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 integral_constant<bool, (__is_pointer_helper<typename > remove_cv<_Tp>::type>::value)> > { }; > > > 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 integral_constant<bool, !is_function<_Tp>::value> { }; > > > template<typename _Tp> > struct is_member_object_pointer > : public integral_constant<bool, (__is_member_object_pointer_helper< > typename remove_cv<_Tp>::type>::value)> > { }; > > 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 integral_constant<bool, is_function<_Tp>::value> { }; > > > template<typename _Tp> > struct is_member_function_pointer > : public integral_constant<bool, (__is_member_function_pointer_helper< > typename remove_cv<_Tp>::type>::value)> > { }; > > > 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...) 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...) const volatile> > : public true_type { }; > > template<typename _Res, typename... _ArgTypes> > struct is_function<_Res(_ArgTypes......) const volatile> > : public true_type { }; > > template<typename> > struct __is_nullptr_t_helper > : public false_type { }; > > template<> > struct __is_nullptr_t_helper<std::nullptr_t> > : public true_type { }; > > > template<typename _Tp> > struct __is_nullptr_t > : public integral_constant<bool, (__is_nullptr_t_helper<typename > remove_cv<_Tp>::type>::value)> > { }; > > > > > 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_nullptr_t<_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_nullptr_t<_Tp>>::type > { }; > > > template<typename _Tp> > struct is_compound > : public integral_constant<bool, !is_fundamental<_Tp>::value> { }; > > 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 integral_constant<bool, (__is_member_pointer_helper< > typename remove_cv<_Tp>::type>::value)> > { }; > > > > > 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_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_abstract > : public integral_constant<bool, __is_abstract(_Tp)> > { }; > > template<typename _Tp, > bool = is_integral<_Tp>::value, > bool = is_floating_point<_Tp>::value> > struct __is_signed_helper > : public false_type { }; > > template<typename _Tp> > struct __is_signed_helper<_Tp, false, true> > : public true_type { }; > > template<typename _Tp> > struct __is_signed_helper<_Tp, true, false> > : public integral_constant<bool, static_cast<bool>(_Tp(-1) < _Tp(0))> > { }; > > > template<typename _Tp> > struct is_signed > : public integral_constant<bool, __is_signed_helper<_Tp>::value> > { }; > > > template<typename _Tp> > struct is_unsigned > : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type > { }; > > > > > template<typename> > struct add_rvalue_reference; > > > > > > template<typename _Tp> > typename add_rvalue_reference<_Tp>::type declval() noexcept; > > 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>>>::type > { }; > > > > > > > struct __do_is_destructible_impl > { > template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())> > static true_type __test(int); > > template<typename> > static false_type __test(...); > }; > > template<typename _Tp> > struct __is_destructible_impl > : public __do_is_destructible_impl > { > typedef decltype(__test<_Tp>(0)) type; > }; > > template<typename _Tp, > bool = __or_<is_void<_Tp>, > __is_array_unknown_bounds<_Tp>, > is_function<_Tp>>::value, > bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value> > struct __is_destructible_safe; > > template<typename _Tp> > struct __is_destructible_safe<_Tp, false, false> > : public __is_destructible_impl<typename > remove_all_extents<_Tp>::type>::type > { }; > > template<typename _Tp> > struct __is_destructible_safe<_Tp, true, false> > : public false_type { }; > > template<typename _Tp> > struct __is_destructible_safe<_Tp, false, true> > : public true_type { }; > > > template<typename _Tp> > struct is_destructible > : public integral_constant<bool, (__is_destructible_safe<_Tp>::value)> > { }; > > > > > > struct __do_is_nt_destructible_impl > { > template<typename _Tp> > static integral_constant<bool, 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 integral_constant<bool, (__is_nt_destructible_safe<_Tp>::value)> > { }; > > struct __do_is_default_constructible_impl > { > template<typename _Tp, typename = decltype(_Tp())> > static true_type __test(int); > > template<typename> > static false_type __test(...); > }; > > template<typename _Tp> > struct __is_default_constructible_impl > : public __do_is_default_constructible_impl > { > typedef decltype(__test<_Tp>(0)) type; > }; > > template<typename _Tp> > struct __is_default_constructible_atom > : public __and_<__not_<is_void<_Tp>>, > __is_default_constructible_impl<_Tp>>::type > { }; > > template<typename _Tp, bool = is_array<_Tp>::value> > struct __is_default_constructible_safe; > > > > > > > template<typename _Tp> > struct __is_default_constructible_safe<_Tp, true> > : public __and_<__is_array_known_bounds<_Tp>, > __is_default_constructible_atom<typename > remove_all_extents<_Tp>::type>>::type > { }; > > template<typename _Tp> > struct __is_default_constructible_safe<_Tp, false> > : public __is_default_constructible_atom<_Tp>::type > { }; > > > template<typename _Tp> > struct is_default_constructible > : public integral_constant<bool, (__is_default_constructible_safe< > _Tp>::value)> > { }; ># 765 "/usr/include/c++/4.8.2/type_traits" 3 > struct __do_is_static_castable_impl > { > template<typename _From, typename _To, typename > = decltype(static_cast<_To>(declval<_From>()))> > static true_type __test(int); > > template<typename, typename> > static false_type __test(...); > }; > > template<typename _From, typename _To> > struct __is_static_castable_impl > : public __do_is_static_castable_impl > { > typedef decltype(__test<_From, _To>(0)) type; > }; > > template<typename _From, typename _To> > struct __is_static_castable_safe > : public __is_static_castable_impl<_From, _To>::type > { }; > > > template<typename _From, typename _To> > struct __is_static_castable > : public integral_constant<bool, (__is_static_castable_safe< > _From, _To>::value)> > { }; > > > > > > > struct __do_is_direct_constructible_impl > { > template<typename _Tp, typename _Arg, typename > = decltype(::new _Tp(declval<_Arg>()))> > static true_type __test(int); > > template<typename, typename> > static false_type __test(...); > }; > > template<typename _Tp, typename _Arg> > struct __is_direct_constructible_impl > : public __do_is_direct_constructible_impl > { > typedef decltype(__test<_Tp, _Arg>(0)) type; > }; > > template<typename _Tp, typename _Arg> > struct __is_direct_constructible_new_safe > : public __and_<is_destructible<_Tp>, > __is_direct_constructible_impl<_Tp, _Arg>>::type > { }; > > template<typename, typename> > struct is_same; > > template<typename, typename> > struct is_base_of; > > template<typename> > struct remove_reference; > > template<typename _From, typename _To, bool > = __not_<__or_<is_void<_From>, > is_function<_From>>>::value> > struct __is_base_to_derived_ref; > > > > template<typename _From, typename _To> > struct __is_base_to_derived_ref<_From, _To, true> > { > typedef typename remove_cv<typename remove_reference<_From > >::type>::type __src_t; > typedef typename remove_cv<typename remove_reference<_To > >::type>::type __dst_t; > typedef __and_<__not_<is_same<__src_t, __dst_t>>, > is_base_of<__src_t, __dst_t>> type; > static constexpr bool value = type::value; > }; > > template<typename _From, typename _To> > struct __is_base_to_derived_ref<_From, _To, false> > : public false_type > { }; > > template<typename _From, typename _To, bool > = __and_<is_lvalue_reference<_From>, > is_rvalue_reference<_To>>::value> > struct __is_lvalue_to_rvalue_ref; > > > > template<typename _From, typename _To> > struct __is_lvalue_to_rvalue_ref<_From, _To, true> > { > typedef typename remove_cv<typename remove_reference< > _From>::type>::type __src_t; > typedef typename remove_cv<typename remove_reference< > _To>::type>::type __dst_t; > typedef __and_<__not_<is_function<__src_t>>, > __or_<is_same<__src_t, __dst_t>, > is_base_of<__dst_t, __src_t>>> type; > static constexpr bool value = type::value; > }; > > template<typename _From, typename _To> > struct __is_lvalue_to_rvalue_ref<_From, _To, false> > : public false_type > { }; > > > > > > > > template<typename _Tp, typename _Arg> > struct __is_direct_constructible_ref_cast > : public __and_<__is_static_castable<_Arg, _Tp>, > __not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>, > __is_lvalue_to_rvalue_ref<_Arg, _Tp> > >>>::type > { }; > > template<typename _Tp, typename _Arg> > struct __is_direct_constructible_new > : public conditional<is_reference<_Tp>::value, > __is_direct_constructible_ref_cast<_Tp, _Arg>, > __is_direct_constructible_new_safe<_Tp, _Arg> > >::type > { }; > > template<typename _Tp, typename _Arg> > struct __is_direct_constructible > : public integral_constant<bool, (__is_direct_constructible_new< > _Tp, _Arg>::value)> > { }; > > > > > > > struct __do_is_nary_constructible_impl > { > template<typename _Tp, typename... _Args, typename > = decltype(_Tp(declval<_Args>()...))> > static true_type __test(int); > > template<typename, typename...> > static false_type __test(...); > }; > > template<typename _Tp, typename... _Args> > struct __is_nary_constructible_impl > : public __do_is_nary_constructible_impl > { > typedef decltype(__test<_Tp, _Args...>(0)) type; > }; > > template<typename _Tp, typename... _Args> > struct __is_nary_constructible > : public __is_nary_constructible_impl<_Tp, _Args...>::type > { > static_assert(sizeof...(_Args) > 1, > "Only useful for > 1 arguments"); > }; > > template<typename _Tp, typename... _Args> > struct __is_constructible_impl > : public __is_nary_constructible<_Tp, _Args...> > { }; > > template<typename _Tp, typename _Arg> > struct __is_constructible_impl<_Tp, _Arg> > : public __is_direct_constructible<_Tp, _Arg> > { }; > > template<typename _Tp> > struct __is_constructible_impl<_Tp> > : public is_default_constructible<_Tp> > { }; > > > template<typename _Tp, typename... _Args> > struct is_constructible > : public integral_constant<bool, (__is_constructible_impl<_Tp, > _Args...>::value)> > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_copy_constructible_impl; > > template<typename _Tp> > struct __is_copy_constructible_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_copy_constructible_impl<_Tp, false> > : public is_constructible<_Tp, const _Tp&> > { }; > > > template<typename _Tp> > struct is_copy_constructible > : public __is_copy_constructible_impl<_Tp> > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_move_constructible_impl; > > template<typename _Tp> > struct __is_move_constructible_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_move_constructible_impl<_Tp, false> > : 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>>::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>>::type > { }; > > 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...>>::type > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_nothrow_copy_constructible_impl; > > template<typename _Tp> > struct __is_nothrow_copy_constructible_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_nothrow_copy_constructible_impl<_Tp, false> > : 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_void<_Tp>::value> > struct __is_nothrow_move_constructible_impl; > > template<typename _Tp> > struct __is_nothrow_move_constructible_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_nothrow_move_constructible_impl<_Tp, false> > : 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> > class __is_assignable_helper > : public __sfinae_types > { > template<typename _Tp1, typename _Up1> > static decltype(declval<_Tp1>() = declval<_Up1>(), __one()) > __test(int); > > template<typename, typename> > static __two __test(...); > > public: > static constexpr bool value = sizeof(__test<_Tp, _Up>(0)) == 1; > }; > > > template<typename _Tp, typename _Up> > struct is_assignable > : public integral_constant<bool, > __is_assignable_helper<_Tp, _Up>::value> > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_copy_assignable_impl; > > template<typename _Tp> > struct __is_copy_assignable_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_copy_assignable_impl<_Tp, false> > : public is_assignable<_Tp&, const _Tp&> > { }; > > > template<typename _Tp> > struct is_copy_assignable > : public __is_copy_assignable_impl<_Tp> > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_move_assignable_impl; > > template<typename _Tp> > struct __is_move_assignable_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_move_assignable_impl<_Tp, false> > : 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>>::type > { }; > > template<typename _Tp, bool = is_void<_Tp>::value> > struct __is_nt_copy_assignable_impl; > > template<typename _Tp> > struct __is_nt_copy_assignable_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_nt_copy_assignable_impl<_Tp, false> > : 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_void<_Tp>::value> > struct __is_nt_move_assignable_impl; > > template<typename _Tp> > struct __is_nt_move_assignable_impl<_Tp, true> > : public false_type { }; > > template<typename _Tp> > struct __is_nt_move_assignable_impl<_Tp, false> > : public is_nothrow_assignable<_Tp&, _Tp&&> > { }; > > > template<typename _Tp> > struct is_nothrow_move_assignable > : public __is_nt_move_assignable_impl<_Tp> > { }; ># 1203 "/usr/include/c++/4.8.2/type_traits" 3 > template<typename _Tp> > struct is_trivially_destructible > : public __and_<is_destructible<_Tp>, integral_constant<bool, > __has_trivial_destructor(_Tp)>>::type > { }; > > > template<typename _Tp> > struct has_trivial_default_constructor > : public integral_constant<bool, __has_trivial_constructor(_Tp)> > { }; > > > template<typename _Tp> > struct has_trivial_copy_constructor > : public integral_constant<bool, __has_trivial_copy(_Tp)> > { }; > > > template<typename _Tp> > struct has_trivial_copy_assign > : public integral_constant<bool, __has_trivial_assign(_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 > { static constexpr bool value = is_void<_To>::value; }; > > template<typename _From, typename _To> > class __is_convertible_helper<_From, _To, false> > : public __sfinae_types > { > template<typename _To1> > static void __test_aux(_To1); > > template<typename _From1, typename _To1> > static decltype(__test_aux<_To1>(std::declval<_From1>()), __one()) > __test(int); > > template<typename, typename> > static __two __test(...); > > public: > static constexpr bool value = sizeof(__test<_From, _To>(0)) == 1; > }; > > > template<typename _From, typename _To> > struct is_convertible > : public integral_constant<bool, > __is_convertible_helper<_From, _To>::value> > { }; > > > > > > template<typename _Tp> > struct remove_const > { typedef _Tp type; }; > > template<typename _Tp> > struct remove_const<_Tp const> > { typedef _Tp type; }; > > > template<typename _Tp> > struct remove_volatile > { typedef _Tp type; }; > > template<typename _Tp> > struct remove_volatile<_Tp volatile> > { typedef _Tp type; }; > > > template<typename _Tp> > struct remove_cv > { > 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> > 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 = __and_<__not_<is_reference<_Tp>>, > __not_<is_void<_Tp>>>::value, > bool = is_rvalue_reference<_Tp>::value> > struct __add_lvalue_reference_helper > { typedef _Tp type; }; > > template<typename _Tp> > struct __add_lvalue_reference_helper<_Tp, true, false> > { typedef _Tp& type; }; > > template<typename _Tp> > struct __add_lvalue_reference_helper<_Tp, false, true> > { typedef typename remove_reference<_Tp>::type& type; }; > > > template<typename _Tp> > struct add_lvalue_reference > : public __add_lvalue_reference_helper<_Tp> > { }; > > template<typename _Tp, > bool = __and_<__not_<is_reference<_Tp>>, > __not_<is_void<_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 _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; }; ># 1492 "/usr/include/c++/4.8.2/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> > { > typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt; > typedef typename __unsignedt::__type __unsigned_type; > typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; > > public: > typedef typename __cv_unsigned::__type __type; > }; > > template<typename _Tp> > class __make_unsigned_selector<_Tp, false, true> > { > > typedef unsigned char __smallest; > static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); > static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); > static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); > typedef conditional<__b2, unsigned int, unsigned long> __cond2; > typedef typename __cond2::type __cond2_type; > typedef conditional<__b1, unsigned short, __cond2_type> __cond1; > typedef typename __cond1::type __cond1_type; > > public: > typedef typename conditional<__b0, __smallest, __cond1_type>::type __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; }; ># 1574 "/usr/include/c++/4.8.2/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> > { > typedef __make_signed<typename remove_cv<_Tp>::type> __signedt; > typedef typename __signedt::__type __signed_type; > typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed; > > public: > typedef typename __cv_signed::__type __type; > }; > > template<typename _Tp> > class __make_signed_selector<_Tp, false, true> > { > > typedef signed char __smallest; > static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); > static const bool __b1 = sizeof(_Tp) <= sizeof(signed short); > static const bool __b2 = sizeof(_Tp) <= sizeof(signed int); > typedef conditional<__b2, signed int, signed long> __cond2; > typedef typename __cond2::type __cond2_type; > typedef conditional<__b1, signed short, __cond2_type> __cond1; > typedef typename __cond1::type __cond1_type; > > public: > typedef typename conditional<__b0, __smallest, __cond1_type>::type __type; > }; > > > > > > template<typename _Tp> > struct make_signed > { typedef typename __make_signed_selector<_Tp>::__type type; }; > > > template<> > struct make_signed<bool>; > > > > > > 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, 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> > struct add_pointer > { typedef typename remove_reference<_Tp>::type* type; }; > > > template<std::size_t _Len> > struct __aligned_storage_msa > { > union __type > { > unsigned char __data[_Len]; > struct __attribute__((__aligned__)) { } __align; > }; > }; ># 1691 "/usr/include/c++/4.8.2/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 _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 __strip_reference_wrapper<const 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<typename _Tp> > struct common_type<_Tp> > { typedef typename decay<_Tp>::type type; }; > > 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> > struct underlying_type > { > typedef __underlying_type(_Tp) type; > }; > > template<typename _Tp> > struct __declval_protector > { > static const bool __stop = false; > static typename add_rvalue_reference<_Tp>::type __delegate(); > }; > > template<typename _Tp> > inline typename add_rvalue_reference<_Tp>::type > declval() noexcept > { > static_assert(__declval_protector<_Tp>::__stop, > "declval() must not be used!"); > return __declval_protector<_Tp>::__delegate(); > } > > > template<typename _Signature> > class result_of; > > > > > struct __result_of_memfun_ref_impl > { > template<typename _Fp, typename _Tp1, typename... _Args> > static __success_type<decltype( > (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...) > )> _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 __success_type<decltype( > ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...) > )> _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 __success_type<decltype( > std::declval<_Tp1>().*std::declval<_Fp>() > )> _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 __success_type<decltype( > (*std::declval<_Tp1>()).*std::declval<_Fp>() > )> _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 typename remove_cv<typename remove_reference< > _Arg>::type>::type _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_cv<typename remove_reference< > _Arg>::type>::type _Argval; > typedef _Res _Class::* _MemPtr; > typedef typename conditional<__or_<is_same<_Argval, _Class>, > is_base_of<_Class, _Argval>>::value, > __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, > __result_of_memfun_deref<_MemPtr, _Arg, _Args...> > >::type::type type; > }; > > 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, _Arg> > { }; > > template<typename _MemPtr, typename _Arg, typename... _Args> > struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...> > : public __result_of_memfun<typename decay<_MemPtr>::type, _Arg, _Args...> > { }; > > > struct __result_of_other_impl > { > template<typename _Fn, typename... _Args> > static __success_type<decltype( > std::declval<_Fn>()(std::declval<_Args>()...) > )> _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 result_of<_Functor(_ArgTypes...)> > : 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 > { }; ># 2069 "/usr/include/c++/4.8.2/type_traits" 3 > >} ># 58 "/usr/include/c++/4.8.2/bits/move.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 74 "/usr/include/c++/4.8.2/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 { }; ># 118 "/usr/include/c++/4.8.2/bits/move.h" 3 > template<typename _Tp> > inline constexpr typename > conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type > move_if_noexcept(_Tp& __x) noexcept > { return std::move(__x); } ># 133 "/usr/include/c++/4.8.2/bits/move.h" 3 > template<typename _Tp> > inline _Tp* > addressof(_Tp& __r) noexcept > { return std::__addressof(__r); } > > > >} ># 149 "/usr/include/c++/4.8.2/bits/move.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 164 "/usr/include/c++/4.8.2/bits/move.h" 3 > template<typename _Tp> > inline void > 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 void > swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) > > noexcept(noexcept(swap(*__a, *__b))) > > { > for (size_t __n = 0; __n < _Nm; ++__n) > swap(__a[__n], __b[__n]); > } > > > >} ># 60 "/usr/include/c++/4.8.2/bits/stl_pair.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 76 "/usr/include/c++/4.8.2/bits/stl_pair.h" 3 > struct piecewise_construct_t { }; > > > constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); > > > template<typename...> > class tuple; > > template<std::size_t...> > struct _Index_tuple; ># 95 "/usr/include/c++/4.8.2/bits/stl_pair.h" 3 > template<class _T1, class _T2> > struct pair > { > typedef _T1 first_type; > typedef _T2 second_type; > > _T1 first; > _T2 second; > > > > > > constexpr pair() > : first(), second() { } > > > constexpr pair(const _T1& __a, const _T2& __b) > : first(__a), second(__b) { } > > > > > > > > template<class _U1, class _U2, class = typename > enable_if<__and_<is_convertible<const _U1&, _T1>, > is_convertible<const _U2&, _T2>>::value>::type> > constexpr pair(const pair<_U1, _U2>& __p) > : first(__p.first), second(__p.second) { } > > constexpr pair(const pair&) = default; > constexpr pair(pair&&) = default; > > > template<class _U1, class = typename > enable_if<is_convertible<_U1, _T1>::value>::type> > constexpr pair(_U1&& __x, const _T2& __y) > : first(std::forward<_U1>(__x)), second(__y) { } > > template<class _U2, class = typename > enable_if<is_convertible<_U2, _T2>::value>::type> > constexpr pair(const _T1& __x, _U2&& __y) > : first(__x), second(std::forward<_U2>(__y)) { } > > template<class _U1, class _U2, class = typename > enable_if<__and_<is_convertible<_U1, _T1>, > is_convertible<_U2, _T2>>::value>::type> > constexpr pair(_U1&& __x, _U2&& __y) > : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } > > template<class _U1, class _U2, class = typename > enable_if<__and_<is_convertible<_U1, _T1>, > is_convertible<_U2, _T2>>::value>::type> > 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=(const pair& __p) > { > first = __p.first; > second = __p.second; > return *this; > } > > pair& > operator=(pair&& __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<class _U1, class _U2> > pair& > operator=(const pair<_U1, _U2>& __p) > { > first = __p.first; > second = __p.second; > return *this; > } > > template<class _U1, class _U2> > pair& > operator=(pair<_U1, _U2>&& __p) > { > first = std::forward<_U1>(__p.first); > second = std::forward<_U2>(__p.second); > return *this; > } > > void > swap(pair& __p) > noexcept(noexcept(swap(first, __p.first)) > && noexcept(swap(second, __p.second))) > { > 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<class _T1, class _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<class _T1, class _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<class _T1, class _T2> > inline constexpr bool > operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__x == __y); } > > > template<class _T1, class _T2> > inline constexpr bool > operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return __y < __x; } > > > template<class _T1, class _T2> > inline constexpr bool > operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__y < __x); } > > > template<class _T1, class _T2> > inline constexpr bool > operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) > { return !(__x < __y); } > > > > > > template<class _T1, class _T2> > inline void > swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } ># 273 "/usr/include/c++/4.8.2/bits/stl_pair.h" 3 > template<class _T1, class _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)); > } ># 292 "/usr/include/c++/4.8.2/bits/stl_pair.h" 3 > >} ># 65 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h" 1 3 ># 62 "/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h" 3 > ># 63 "/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h" 3 > > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 89 "/usr/include/c++/4.8.2/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++/4.8.2/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; > }; ># 142 "/usr/include/c++/4.8.2/bits/stl_iterator_base_types.h" 3 >template<typename _Tp> class __has_iterator_category_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::iterator_category>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_iterator_category : integral_constant<bool, __has_iterator_category_helper <typename remove_cv<_Tp>::type>::value> { }; > > template<typename _Iterator, > bool = __has_iterator_category<_Iterator>::value> > struct __iterator_traits { }; > > template<typename _Iterator> > struct __iterator_traits<_Iterator, true> > { > 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> { }; ># 174 "/usr/include/c++/4.8.2/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 typename iterator_traits<_Iter>::iterator_category > __iterator_category(const _Iter&) > { return typename iterator_traits<_Iter>::iterator_category(); } > > > > > > template<typename _Iterator, bool _HasBase> > struct _Iter_base > { > typedef _Iterator iterator_type; > static iterator_type _S_base(_Iterator __it) > { return __it; } > }; > > template<typename _Iterator> > struct _Iter_base<_Iterator, true> > { > typedef typename _Iterator::iterator_type iterator_type; > static iterator_type _S_base(_Iterator __it) > { return __it.base(); } > }; > > > 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++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_iterator_base_funcs.h" 1 3 ># 62 "/usr/include/c++/4.8.2/bits/stl_iterator_base_funcs.h" 3 > ># 63 "/usr/include/c++/4.8.2/bits/stl_iterator_base_funcs.h" 3 > > ># 1 "/usr/include/c++/4.8.2/debug/debug.h" 1 3 ># 46 "/usr/include/c++/4.8.2/debug/debug.h" 3 >namespace std >{ > namespace __debug { } >} > > > > >namespace __gnu_debug >{ > using namespace std::__debug; >} ># 66 "/usr/include/c++/4.8.2/bits/stl_iterator_base_funcs.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _InputIterator> > inline 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 typename iterator_traits<_RandomAccessIterator>::difference_type > __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, > random_access_iterator_tag) > { > > > > return __last - __first; > } ># 112 "/usr/include/c++/4.8.2/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 void > __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) > { > > > ; > while (__n--) > ++__i; > } > > template<typename _BidirectionalIterator, typename _Distance> > inline 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 void > __advance(_RandomAccessIterator& __i, _Distance __n, > random_access_iterator_tag) > { > > > > __i += __n; > } ># 171 "/usr/include/c++/4.8.2/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 _ForwardIterator> > inline _ForwardIterator > next(_ForwardIterator __x, typename > iterator_traits<_ForwardIterator>::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++/4.8.2/bits/stl_algobase.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 1 3 ># 67 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 95 "/usr/include/c++/4.8.2/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; > > > > > > > > reverse_iterator() : current() { } > > > > > explicit > reverse_iterator(iterator_type __x) : current(__x) { } > > > > > reverse_iterator(const reverse_iterator& __x) > : current(__x.current) { } > > > > > > template<typename _Iter> > reverse_iterator(const reverse_iterator<_Iter>& __x) > : current(__x.base()) { } > > > > > iterator_type > base() const > { return current; } ># 159 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 3 > reference > operator*() const > { > _Iterator __tmp = current; > return *--__tmp; > } > > > > > > > pointer > operator->() const > { return &(operator*()); } > > > > > > > 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); } > }; ># 289 "/usr/include/c++/4.8.2/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 _Iterator> > inline typename reverse_iterator<_Iterator>::difference_type > operator-(const reverse_iterator<_Iterator>& __x, > const reverse_iterator<_Iterator>& __y) > { return __y.base() - __x.base(); } > > template<typename _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 _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); } > > 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(); } ># 401 "/usr/include/c++/4.8.2/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(&__x) { } ># 435 "/usr/include/c++/4.8.2/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; } > }; ># 477 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 3 > template<typename _Container> > inline back_insert_iterator<_Container> > back_inserter(_Container& __x) > { return back_insert_iterator<_Container>(__x); } ># 492 "/usr/include/c++/4.8.2/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(&__x) { } ># 525 "/usr/include/c++/4.8.2/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; } > }; ># 567 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 3 > template<typename _Container> > inline front_insert_iterator<_Container> > front_inserter(_Container& __x) > { return front_insert_iterator<_Container>(__x); } ># 586 "/usr/include/c++/4.8.2/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(&__x), iter(__i) {} ># 637 "/usr/include/c++/4.8.2/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; } > }; ># 681 "/usr/include/c++/4.8.2/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"))) >{ > ># 705 "/usr/include/c++/4.8.2/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() : _M_current(_Iterator()) { } > > explicit > __normal_iterator(const _Iterator& __i) : _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) > : _M_current(__i.base()) { } > > > reference > operator*() const > { return *_M_current; } > > pointer > operator->() const > { return _M_current; } > > __normal_iterator& > operator++() > { > ++_M_current; > return *this; > } > > __normal_iterator > operator++(int) > { return __normal_iterator(_M_current++); } > > > __normal_iterator& > operator--() > { > --_M_current; > return *this; > } > > __normal_iterator > operator--(int) > { return __normal_iterator(_M_current--); } > > > reference > operator[](const difference_type& __n) const > { return _M_current[__n]; } > > __normal_iterator& > operator+=(const difference_type& __n) > { _M_current += __n; return *this; } > > __normal_iterator > operator+(const difference_type& __n) const > { return __normal_iterator(_M_current + __n); } > > __normal_iterator& > operator-=(const difference_type& __n) > { _M_current -= __n; return *this; } > > __normal_iterator > operator-(const difference_type& __n) const > { return __normal_iterator(_M_current - __n); } > > const _Iterator& > base() const > { return _M_current; } > }; ># 803 "/usr/include/c++/4.8.2/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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > -> 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) > { 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) > { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } > > >} > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 929 "/usr/include/c++/4.8.2/bits/stl_iterator.h" 3 > template<typename _Iterator> > class move_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 _Iterator pointer; > typedef value_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 std::move(*_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 auto > operator-(const move_iterator<_Iterator>& __x, > const move_iterator<_Iterator>& __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); } > > > > >} ># 68 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 2 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 117 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > inline void > iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) > { > > > > ># 147 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > swap(*__a, *__b); > > } ># 163 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > _ForwardIterator2 > swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2) > { > > > > > > ; > > for (; __first1 != __last1; ++__first1, ++__first2) > std::iter_swap(__first1, __first2); > return __first2; > } ># 191 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _Tp> > inline const _Tp& > min(const _Tp& __a, const _Tp& __b) > { > > > > if (__b < __a) > return __b; > return __a; > } ># 214 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _Tp> > inline const _Tp& > max(const _Tp& __a, const _Tp& __b) > { > > > > if (__a < __b) > return __b; > return __a; > } ># 237 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _Tp, typename _Compare> > inline const _Tp& > min(const _Tp& __a, const _Tp& __b, _Compare __comp) > { > > if (__comp(__b, __a)) > return __b; > return __a; > } ># 258 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _Tp, typename _Compare> > inline const _Tp& > max(const _Tp& __a, const _Tp& __b, _Compare __comp) > { > > if (__comp(__a, __b)) > return __b; > return __a; > } > > > > template<typename _Iterator> > struct _Niter_base > : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> > { }; > > template<typename _Iterator> > inline typename _Niter_base<_Iterator>::iterator_type > __niter_base(_Iterator __it) > { return std::_Niter_base<_Iterator>::_S_base(__it); } > > > template<typename _Iterator> > struct _Miter_base > : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> > { }; > > template<typename _Iterator> > inline typename _Miter_base<_Iterator>::iterator_type > __miter_base(_Iterator __it) > { return std::_Miter_base<_Iterator>::_S_base(__it); } > > > > > > > > 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, ++__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, ++__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) > { > 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_trivial(_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 _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), > std::__niter_base(__last), > std::__niter_base(__result))); > } ># 448 "/usr/include/c++/4.8.2/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)); > } ># 481 "/usr/include/c++/4.8.2/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) > { > 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_trivial(_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 _BI2(std::__copy_move_backward_a<_IsMove> > (std::__niter_base(__first), std::__niter_base(__last), > std::__niter_base(__result))); > } ># 617 "/usr/include/c++/4.8.2/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)); > } ># 653 "/usr/include/c++/4.8.2/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; > __builtin_memset(__first, static_cast<unsigned char>(__tmp), > __last - __first); > } ># 719 "/usr/include/c++/4.8.2/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, ++__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, ++__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; > } ># 779 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _OI, typename _Size, typename _Tp> > inline _OI > fill_n(_OI __first, _Size __n, const _Tp& __value) > { > > > > return _OI(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, ++__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) > { > return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) > * (__last1 - __first1)); > } > }; > > 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<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) > { > 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, ++__first2) > { > if (*__first1 < *__first2) > return true; > if (*__first2 < *__first1) > return false; > } > return __first1 == __last1 && __first2 != __last2; > } > > 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; > const int __result = __builtin_memcmp(__first1, __first2, > std::min(__len1, __len2)); > return __result != 0 ? __result < 0 : __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); > } ># 941 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _ForwardIterator, typename _Tp> > _ForwardIterator > lower_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > > > > > 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 (*__middle < __val) > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > else > __len = __half; > } > return __first; > } > > > > inline constexpr int > __lg(int __n) > { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } > > inline constexpr unsigned > __lg(unsigned __n) > { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } > > inline constexpr long > __lg(long __n) > { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } > > inline constexpr unsigned long > __lg(unsigned long __n) > { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } > > inline constexpr long long > __lg(long long __n) > { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } > > inline constexpr unsigned long long > __lg(unsigned long long __n) > { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } > > > > ># 1019 "/usr/include/c++/4.8.2/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)); > } ># 1051 "/usr/include/c++/4.8.2/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, ++__first2) > if (!bool(__binary_pred(*__first1, *__first2))) > return false; > return true; > } ># 1082 "/usr/include/c++/4.8.2/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)); > } ># 1118 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _II1, typename _II2, typename _Compare> > bool > lexicographical_compare(_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, ++__first2) > { > if (__comp(*__first1, *__first2)) > return true; > if (__comp(*__first2, *__first1)) > return false; > } > return __first1 == __last1 && __first2 != __last2; > } ># 1158 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2> > pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2) > { > > > > > > > ; > > while (__first1 != __last1 && *__first1 == *__first2) > { > ++__first1; > ++__first2; > } > return pair<_InputIterator1, _InputIterator2>(__first1, __first2); > } ># 1195 "/usr/include/c++/4.8.2/bits/stl_algobase.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _BinaryPredicate> > pair<_InputIterator1, _InputIterator2> > mismatch(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _BinaryPredicate __binary_pred) > { > > > > ; > > while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) > { > ++__first1; > ++__first2; > } > return pair<_InputIterator1, _InputIterator2>(__first1, __first2); > } > > >} ># 61 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/allocator.h" 1 3 ># 46 "/usr/include/c++/4.8.2/bits/allocator.h" 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++allocator.h" 1 3 ># 33 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++allocator.h" 3 ># 1 "/usr/include/c++/4.8.2/ext/new_allocator.h" 1 3 ># 33 "/usr/include/c++/4.8.2/ext/new_allocator.h" 3 ># 1 "/usr/include/c++/4.8.2/new" 1 3 ># 37 "/usr/include/c++/4.8.2/new" 3 > ># 38 "/usr/include/c++/4.8.2/new" 3 > > ># 1 "/usr/include/c++/4.8.2/exception" 1 3 ># 33 "/usr/include/c++/4.8.2/exception" 3 > ># 34 "/usr/include/c++/4.8.2/exception" 3 > >#pragma GCC visibility push(default) > > ># 1 "/usr/include/c++/4.8.2/bits/atomic_lockfree_defines.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/atomic_lockfree_defines.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/atomic_lockfree_defines.h" 3 ># 39 "/usr/include/c++/4.8.2/exception" 2 3 > >extern "C++" { > >namespace std >{ ># 60 "/usr/include/c++/4.8.2/exception" 3 > class exception > { > public: > exception() noexcept { } > virtual ~exception() noexcept; > > > > virtual const char* what() const noexcept; > }; > > > > 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; > > > > void terminate() noexcept __attribute__ ((__noreturn__)); > > > unexpected_handler set_unexpected(unexpected_handler) noexcept; > > > > void unexpected() __attribute__ ((__noreturn__)); ># 117 "/usr/include/c++/4.8.2/exception" 3 > bool uncaught_exception() noexcept __attribute__ ((__pure__)); > > >} > >namespace __gnu_cxx >{ > ># 142 "/usr/include/c++/4.8.2/exception" 3 > void __verbose_terminate_handler(); > > >} > >} > >#pragma GCC visibility pop > > ># 1 "/usr/include/c++/4.8.2/bits/exception_ptr.h" 1 3 ># 34 "/usr/include/c++/4.8.2/bits/exception_ptr.h" 3 >#pragma GCC visibility push(default) ># 43 "/usr/include/c++/4.8.2/bits/exception_ptr.h" 3 >extern "C++" { > >namespace std >{ > class type_info; > > > > > > namespace __exception_ptr > { > class exception_ptr; > } > > using __exception_ptr::exception_ptr; > > > > > > exception_ptr current_exception() noexcept; > > > void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); > > namespace __exception_ptr > { > > > > > 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); > > 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; } ># 111 "/usr/include/c++/4.8.2/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; ># 138 "/usr/include/c++/4.8.2/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> > exception_ptr > copy_exception(_Ex __ex) noexcept > { > try > { > > throw __ex; > > } > catch(...) > { > return current_exception(); > } > } > > > > > template<typename _Ex> > exception_ptr > make_exception_ptr(_Ex __ex) noexcept > { return std::copy_exception<_Ex>(__ex); } > > >} > >} > >#pragma GCC visibility pop ># 153 "/usr/include/c++/4.8.2/exception" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/nested_exception.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/nested_exception.h" 3 >#pragma GCC visibility push(default) ># 45 "/usr/include/c++/4.8.2/bits/nested_exception.h" 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&) = default; > > nested_exception& operator=(const nested_exception&) = default; > > virtual ~nested_exception() noexcept; > > void > rethrow_nested() const __attribute__ ((__noreturn__)) > { rethrow_exception(_M_ptr); } > > exception_ptr > nested_ptr() const > { return _M_ptr; } > }; > > template<typename _Except> > struct _Nested_exception : public _Except, public nested_exception > { > explicit _Nested_exception(_Except&& __ex) > : _Except(static_cast<_Except&&>(__ex)) > { } > }; > > template<typename _Ex> > struct __get_nested_helper > { > static const nested_exception* > _S_get(const _Ex& __ex) > { return dynamic_cast<const nested_exception*>(&__ex); } > }; > > template<typename _Ex> > struct __get_nested_helper<_Ex*> > { > static const nested_exception* > _S_get(const _Ex* __ex) > { return dynamic_cast<const nested_exception*>(__ex); } > }; > > template<typename _Ex> > inline const nested_exception* > __get_nested_exception(const _Ex& __ex) > { return __get_nested_helper<_Ex>::_S_get(__ex); } > > template<typename _Ex> > void > __throw_with_nested(_Ex&&, const nested_exception* = 0) > __attribute__ ((__noreturn__)); > > template<typename _Ex> > void > __throw_with_nested(_Ex&&, ...) __attribute__ ((__noreturn__)); > > > > > template<typename _Ex> > inline void > __throw_with_nested(_Ex&& __ex, const nested_exception*) > { throw __ex; } > > template<typename _Ex> > inline void > __throw_with_nested(_Ex&& __ex, ...) > { throw _Nested_exception<_Ex>(static_cast<_Ex&&>(__ex)); } > > template<typename _Ex> > void > throw_with_nested(_Ex __ex) __attribute__ ((__noreturn__)); > > > > template<typename _Ex> > inline void > throw_with_nested(_Ex __ex) > { > if (__get_nested_exception(__ex)) > throw __ex; > __throw_with_nested(static_cast<_Ex&&>(__ex), &__ex); > } > > > template<typename _Ex> > inline void > rethrow_if_nested(const _Ex& __ex) > { > if (const nested_exception* __nested = __get_nested_exception(__ex)) > __nested->rethrow_nested(); > } > > > inline void > rethrow_if_nested(const nested_exception& __ex) > { __ex.rethrow_nested(); } > > >} > >} > > > >#pragma GCC visibility pop ># 154 "/usr/include/c++/4.8.2/exception" 2 3 ># 41 "/usr/include/c++/4.8.2/new" 2 3 > >#pragma GCC visibility push(default) > >extern "C++" { > >namespace std >{ > > > > > > > class bad_alloc : public exception > { > public: > bad_alloc() throw() { } > > > > virtual ~bad_alloc() throw(); > > > virtual const char* what() const throw(); > }; > > struct nothrow_t { }; > > extern const nothrow_t nothrow; > > > > typedef void (*new_handler)(); > > > > new_handler set_new_handler(new_handler) throw(); >} ># 91 "/usr/include/c++/4.8.2/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 new(std::size_t, const std::nothrow_t&) noexcept > __attribute__((__externally_visible__)); >void* operator new[](std::size_t, const std::nothrow_t&) noexcept > __attribute__((__externally_visible__)); >void operator delete(void*, const std::nothrow_t&) noexcept > __attribute__((__externally_visible__)); >void operator delete[](void*, const std::nothrow_t&) noexcept > __attribute__((__externally_visible__)); > > >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 { } > >} > >#pragma GCC visibility pop ># 34 "/usr/include/c++/4.8.2/ext/new_allocator.h" 2 3 > > > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > using std::size_t; > using std::ptrdiff_t; ># 57 "/usr/include/c++/4.8.2/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* = 0) > { > if (__n > this->max_size()) > std::__throw_bad_alloc(); > > 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(-1) / sizeof(_Tp); } > > > template<typename _Up, typename... _Args> > void > construct(_Up* __p, _Args&&... __args) > { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } > > template<typename _Up> > void > destroy(_Up* __p) { __p->~_Up(); } ># 135 "/usr/include/c++/4.8.2/ext/new_allocator.h" 3 > }; > > template<typename _Tp> > inline bool > operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) > { return true; } > > template<typename _Tp> > inline bool > operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) > { return false; } > > >} ># 34 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++allocator.h" 2 3 > > >namespace std >{ ># 47 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++allocator.h" 3 > template<typename _Tp> > using __allocator_base = __gnu_cxx::new_allocator<_Tp>; >} ># 47 "/usr/include/c++/4.8.2/bits/allocator.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/memoryfwd.h" 1 3 ># 46 "/usr/include/c++/4.8.2/bits/memoryfwd.h" 3 > ># 47 "/usr/include/c++/4.8.2/bits/memoryfwd.h" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 63 "/usr/include/c++/4.8.2/bits/memoryfwd.h" 3 > template<typename> > class allocator; > > template<> > class allocator<void>; > > > template<typename, typename> > struct uses_allocator; > > > > >} ># 48 "/usr/include/c++/4.8.2/bits/allocator.h" 2 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; > > }; ># 91 "/usr/include/c++/4.8.2/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; > > > allocator() throw() { } > > allocator(const allocator& __a) throw() > : __allocator_base<_Tp>(__a) { } > > template<typename _Tp1> > allocator(const allocator<_Tp1>&) throw() { } > > ~allocator() throw() { } > > > }; > > template<typename _T1, typename _T2> > inline bool > operator==(const allocator<_T1>&, const allocator<_T2>&) > { return true; } > > template<typename _Tp> > inline bool > operator==(const allocator<_Tp>&, const allocator<_Tp>&) > { return true; } > > template<typename _T1, typename _T2> > inline bool > operator!=(const allocator<_T1>&, const allocator<_T2>&) > { return false; } > > template<typename _Tp> > inline bool > operator!=(const allocator<_Tp>&, const allocator<_Tp>&) > { return false; } > > > > > > > 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&) { } }; > > template<typename _Alloc> > struct __alloc_swap<_Alloc, false> > { > static void > _S_do_it(_Alloc& __one, _Alloc& __two) > { > > 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&) { return false; } }; > > template<typename _Tp> > struct __shrink_to_fit_aux<_Tp, true> > { > static bool > _S_do_it(_Tp& __c) > { > 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; } > } > }; > > > >} ># 62 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_construct.h" 1 3 ># 61 "/usr/include/c++/4.8.2/bits/stl_construct.h" 3 ># 1 "/usr/include/c++/4.8.2/ext/alloc_traits.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/alloc_traits.h" 3 > ># 33 "/usr/include/c++/4.8.2/ext/alloc_traits.h" 3 > > > ># 1 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 1 3 ># 36 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/ptr_traits.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/ptr_traits.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > >template<typename _Tp> class __has_element_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::element_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_element_type : integral_constant<bool, __has_element_type_helper <typename remove_cv<_Tp>::type>::value> { }; >template<typename _Tp> class __has_difference_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::difference_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_difference_type : integral_constant<bool, __has_difference_type_helper <typename remove_cv<_Tp>::type>::value> { }; > > template<typename _Tp, bool = __has_element_type<_Tp>::value> > struct __ptrtr_elt_type; > > template<typename _Tp> > struct __ptrtr_elt_type<_Tp, true> > { > typedef typename _Tp::element_type __type; > }; > > template<template<typename, typename...> class _SomePtr, typename _Tp, > typename... _Args> > struct __ptrtr_elt_type<_SomePtr<_Tp, _Args...>, false> > { > typedef _Tp __type; > }; > > template<typename _Tp, bool = __has_difference_type<_Tp>::value> > struct __ptrtr_diff_type > { > typedef typename _Tp::difference_type __type; > }; > > template<typename _Tp> > struct __ptrtr_diff_type<_Tp, false> > { > typedef ptrdiff_t __type; > }; > > template<typename _Ptr, typename _Up> > class __ptrtr_rebind_helper > { > template<typename _Ptr2, typename _Up2> > static constexpr bool > _S_chk(typename _Ptr2::template rebind<_Up2>*) > { return true; } > > template<typename, typename> > static constexpr bool > _S_chk(...) > { return false; } > > public: > static const bool __value = _S_chk<_Ptr, _Up>(nullptr); > }; > > template<typename _Ptr, typename _Up> > const bool __ptrtr_rebind_helper<_Ptr, _Up>::__value; > > template<typename _Tp, typename _Up, > bool = __ptrtr_rebind_helper<_Tp, _Up>::__value> > struct __ptrtr_rebind; > > template<typename _Tp, typename _Up> > struct __ptrtr_rebind<_Tp, _Up, true> > { > typedef typename _Tp::template rebind<_Up> __type; > }; > > template<template<typename, typename...> class _SomePtr, typename _Up, > typename _Tp, typename... _Args> > struct __ptrtr_rebind<_SomePtr<_Tp, _Args...>, _Up, false> > { > typedef _SomePtr<_Up, _Args...> __type; > }; > > template<typename _Tp, typename = typename remove_cv<_Tp>::type> > struct __ptrtr_not_void > { > typedef _Tp __type; > }; > > template<typename _Tp> > struct __ptrtr_not_void<_Tp, void> > { > struct __type { }; > }; > > template<typename _Ptr> > class __ptrtr_pointer_to > { > typedef typename __ptrtr_elt_type<_Ptr>::__type __orig_type; > typedef typename __ptrtr_not_void<__orig_type>::__type __element_type; > > public: > static _Ptr pointer_to(__element_type& __e) > { return _Ptr::pointer_to(__e); } > }; > > > > > > template<typename _Ptr> > struct pointer_traits : __ptrtr_pointer_to<_Ptr> > { > > typedef _Ptr pointer; > > typedef typename __ptrtr_elt_type<_Ptr>::__type element_type; > > typedef typename __ptrtr_diff_type<_Ptr>::__type difference_type; > > template<typename _Up> > using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type; > }; > > > > > > 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(typename __ptrtr_not_void<element_type>::__type& __r) noexcept > { return std::addressof(__r); } > }; > > >} ># 37 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Alloc, typename _Tp> > class __alloctr_rebind_helper > { > template<typename _Alloc2, typename _Tp2> > static constexpr bool > _S_chk(typename _Alloc2::template rebind<_Tp2>::other*) > { return true; } > > template<typename, typename> > static constexpr bool > _S_chk(...) > { return false; } > > public: > static const bool __value = _S_chk<_Alloc, _Tp>(nullptr); > }; > > template<typename _Alloc, typename _Tp> > const bool __alloctr_rebind_helper<_Alloc, _Tp>::__value; > > template<typename _Alloc, typename _Tp, > bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value> > struct __alloctr_rebind; > > template<typename _Alloc, typename _Tp> > struct __alloctr_rebind<_Alloc, _Tp, true> > { > typedef typename _Alloc::template rebind<_Tp>::other __type; > }; > > template<template<typename, typename...> class _Alloc, typename _Tp, > typename _Up, typename... _Args> > struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false> > { > typedef _Alloc<_Tp, _Args...> __type; > }; > > > > > > template<typename _Alloc> > struct allocator_traits > { > > typedef _Alloc allocator_type; > > typedef typename _Alloc::value_type value_type; ># 100 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 >private: template<typename _Tp> static typename _Tp::pointer _S_pointer_helper(_Tp*); static value_type* _S_pointer_helper(...); typedef decltype(_S_pointer_helper((_Alloc*)0)) __pointer; public: > > > > > > > typedef __pointer pointer; > >private: template<typename _Tp> static typename _Tp::const_pointer _S_const_pointer_helper(_Tp*); static typename pointer_traits<pointer>::template rebind<const value_type> _S_const_pointer_helper(...); typedef decltype(_S_const_pointer_helper((_Alloc*)0)) __const_pointer; public: ># 118 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __const_pointer const_pointer; > >private: template<typename _Tp> static typename _Tp::void_pointer _S_void_pointer_helper(_Tp*); static typename pointer_traits<pointer>::template rebind<void> _S_void_pointer_helper(...); typedef decltype(_S_void_pointer_helper((_Alloc*)0)) __void_pointer; public: ># 129 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __void_pointer void_pointer; > >private: template<typename _Tp> static typename _Tp::const_void_pointer _S_const_void_pointer_helper(_Tp*); static typename pointer_traits<pointer>::template rebind<const void> _S_const_void_pointer_helper(...); typedef decltype(_S_const_void_pointer_helper((_Alloc*)0)) __const_void_pointer; public: ># 140 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __const_void_pointer const_void_pointer; > >private: template<typename _Tp> static typename _Tp::difference_type _S_difference_type_helper(_Tp*); static typename pointer_traits<pointer>::difference_type _S_difference_type_helper(...); typedef decltype(_S_difference_type_helper((_Alloc*)0)) __difference_type; public: ># 151 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __difference_type difference_type; > >private: template<typename _Tp> static typename _Tp::size_type _S_size_type_helper(_Tp*); static typename make_unsigned<difference_type>::type _S_size_type_helper(...); typedef decltype(_S_size_type_helper((_Alloc*)0)) __size_type; public: ># 162 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __size_type size_type; > >private: template<typename _Tp> static typename _Tp::propagate_on_container_copy_assignment _S_propagate_on_container_copy_assignment_helper(_Tp*); static false_type _S_propagate_on_container_copy_assignment_helper(...); typedef decltype(_S_propagate_on_container_copy_assignment_helper((_Alloc*)0)) __propagate_on_container_copy_assignment; public: ># 173 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __propagate_on_container_copy_assignment > propagate_on_container_copy_assignment; > >private: template<typename _Tp> static typename _Tp::propagate_on_container_move_assignment _S_propagate_on_container_move_assignment_helper(_Tp*); static false_type _S_propagate_on_container_move_assignment_helper(...); typedef decltype(_S_propagate_on_container_move_assignment_helper((_Alloc*)0)) __propagate_on_container_move_assignment; public: ># 185 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __propagate_on_container_move_assignment > propagate_on_container_move_assignment; > >private: template<typename _Tp> static typename _Tp::propagate_on_container_swap _S_propagate_on_container_swap_helper(_Tp*); static false_type _S_propagate_on_container_swap_helper(...); typedef decltype(_S_propagate_on_container_swap_helper((_Alloc*)0)) __propagate_on_container_swap; public: ># 197 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > typedef __propagate_on_container_swap propagate_on_container_swap; > > > > template<typename _Tp> > using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type; > template<typename _Tp> > using rebind_traits = allocator_traits<rebind_alloc<_Tp>>; > > private: > template<typename _Alloc2> > struct __allocate_helper > { > template<typename _Alloc3, > typename = decltype(std::declval<_Alloc3*>()->allocate( > std::declval<size_type>(), > std::declval<const_void_pointer>()))> > static true_type __test(int); > > template<typename> > static false_type __test(...); > > typedef decltype(__test<_Alloc>(0)) type; > static const bool value = type::value; > }; > > template<typename _Alloc2> > static typename > enable_if<__allocate_helper<_Alloc2>::value, pointer>::type > _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint) > { return __a.allocate(__n, __hint); } > > template<typename _Alloc2> > static typename > enable_if<!__allocate_helper<_Alloc2>::value, pointer>::type > _S_allocate(_Alloc2& __a, size_type __n, ...) > { 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(...); > > typedef decltype(__test<_Alloc>(0)) type; > static const bool value = type::value; > }; > > template<typename _Tp, typename... _Args> > static typename > enable_if<__construct_helper<_Tp, _Args...>::value, void>::type > _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) > { __a.construct(__p, std::forward<_Args>(__args)...); } > > template<typename _Tp, typename... _Args> > static typename > enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>, > is_constructible<_Tp, _Args...>>::value, void>::type > _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) > { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } > > template<typename _Tp> > struct __destroy_helper > { > template<typename _Alloc2, > typename = decltype(std::declval<_Alloc2*>()->destroy( > std::declval<_Tp*>()))> > static true_type __test(int); > > template<typename> > static false_type __test(...); > > typedef decltype(__test<_Alloc>(0)) type; > static const bool value = type::value; > }; > > template<typename _Tp> > static typename enable_if<__destroy_helper<_Tp>::value, void>::type > _S_destroy(_Alloc& __a, _Tp* __p) > { __a.destroy(__p); } > > template<typename _Tp> > static typename enable_if<!__destroy_helper<_Tp>::value, void>::type > _S_destroy(_Alloc&, _Tp* __p) > { __p->~_Tp(); } > > template<typename _Alloc2> > struct __maxsize_helper > { > template<typename _Alloc3, > typename = decltype(std::declval<_Alloc3*>()->max_size())> > static true_type __test(int); > > template<typename> > static false_type __test(...); > > typedef decltype(__test<_Alloc2>(0)) type; > static const bool value = type::value; > }; > > template<typename _Alloc2> > static typename > enable_if<__maxsize_helper<_Alloc2>::value, size_type>::type > _S_max_size(_Alloc2& __a) > { return __a.max_size(); } > > template<typename _Alloc2> > static typename > enable_if<!__maxsize_helper<_Alloc2>::value, size_type>::type > _S_max_size(_Alloc2&) > { return __gnu_cxx::__numeric_traits<size_type>::__max; } > > template<typename _Alloc2> > struct __select_helper > { > template<typename _Alloc3, typename > = decltype(std::declval<_Alloc3*>() > ->select_on_container_copy_construction())> > static true_type __test(int); > > template<typename> > static false_type __test(...); > > typedef decltype(__test<_Alloc2>(0)) type; > static const bool value = type::value; > }; > template<typename _Alloc2> > static typename > enable_if<__select_helper<_Alloc2>::value, _Alloc2>::type > _S_select(_Alloc2& __a) > { return __a.select_on_container_copy_construction(); } > > template<typename _Alloc2> > static typename > enable_if<!__select_helper<_Alloc2>::value, _Alloc2>::type > _S_select(_Alloc2& __a) > { return __a; } > > public: ># 349 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > static pointer > allocate(_Alloc& __a, size_type __n) > { return __a.allocate(__n); } ># 364 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > static pointer > allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) > { return _S_allocate(__a, __n, __hint); } ># 376 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > static void deallocate(_Alloc& __a, pointer __p, size_type __n) > { __a.deallocate(__p, __n); } ># 390 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > template<typename _Tp, typename... _Args> > static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args) > -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) > { _S_construct(__a, __p, std::forward<_Args>(__args)...); } ># 403 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > template <class _Tp> > static void destroy(_Alloc& __a, _Tp* __p) > { _S_destroy(__a, __p); } ># 415 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > static size_type max_size(const _Alloc& __a) > { return _S_max_size(__a); } ># 426 "/usr/include/c++/4.8.2/bits/alloc_traits.h" 3 > static _Alloc > select_on_container_copy_construction(const _Alloc& __rhs) > { return _S_select(__rhs); } > }; > > template<typename _Alloc> > template<typename _Alloc2> > const bool allocator_traits<_Alloc>::__allocate_helper<_Alloc2>::value; > > template<typename _Alloc> > template<typename _Tp, typename... _Args> > const bool > allocator_traits<_Alloc>::__construct_helper<_Tp, _Args...>::value; > > template<typename _Alloc> > template<typename _Tp> > const bool allocator_traits<_Alloc>::__destroy_helper<_Tp>::value; > > template<typename _Alloc> > template<typename _Alloc2> > const bool allocator_traits<_Alloc>::__maxsize_helper<_Alloc2>::value; > > template<typename _Alloc> > template<typename _Alloc2> > const bool allocator_traits<_Alloc>::__select_helper<_Alloc2>::value; > > 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> > class __is_copy_insertable_impl > { > typedef allocator_traits<_Alloc> _Traits; > > template<typename _Up, typename > = decltype(_Traits::construct(std::declval<_Alloc&>(), > std::declval<_Up*>(), > std::declval<const _Up&>()))> > static true_type > _M_select(int); > > template<typename _Up> > static false_type > _M_select(...); > > public: > typedef decltype(_M_select<typename _Alloc::value_type>(0)) type; > }; > > > template<typename _Alloc> > struct __is_copy_insertable > : __is_copy_insertable_impl<_Alloc>::type > { }; > > > template<typename _Tp> > struct __is_copy_insertable<allocator<_Tp>> > : is_copy_constructible<_Tp> > { }; > > > template<bool> struct __allow_copy_cons { }; > > > template<> > struct __allow_copy_cons<false> > { > __allow_copy_cons() = default; > __allow_copy_cons(const __allow_copy_cons&) = delete; > __allow_copy_cons(__allow_copy_cons&&) = default; > __allow_copy_cons& operator=(const __allow_copy_cons&) = default; > __allow_copy_cons& operator=(__allow_copy_cons&&) = default; > }; > > template<typename _Alloc> > using __check_copy_constructible > = __allow_copy_cons<__is_copy_insertable<_Alloc>::value>; > > >} ># 37 "/usr/include/c++/4.8.2/ext/alloc_traits.h" 2 3 > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Alloc> > struct __allocator_always_compares_equal > { static const bool value = false; }; > > template<typename _Alloc> > const bool __allocator_always_compares_equal<_Alloc>::value; > > template<typename _Tp> > struct __allocator_always_compares_equal<std::allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<std::allocator<_Tp>>::value; > > template<typename, typename> struct array_allocator; > > template<typename _Tp, typename _Array> > struct __allocator_always_compares_equal<array_allocator<_Tp, _Array>> > { static const bool value = true; }; > > template<typename _Tp, typename _Array> > const bool > __allocator_always_compares_equal<array_allocator<_Tp, _Array>>::value; > > template<typename> struct bitmap_allocator; > > template<typename _Tp> > struct __allocator_always_compares_equal<bitmap_allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<bitmap_allocator<_Tp>>::value; > > template<typename> struct malloc_allocator; > > template<typename _Tp> > struct __allocator_always_compares_equal<malloc_allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<malloc_allocator<_Tp>>::value; > > template<typename> struct mt_allocator; > > template<typename _Tp> > struct __allocator_always_compares_equal<mt_allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<mt_allocator<_Tp>>::value; > > template<typename> struct new_allocator; > > template<typename _Tp> > struct __allocator_always_compares_equal<new_allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<new_allocator<_Tp>>::value; > > template<typename> struct pool_allocator; > > template<typename _Tp> > struct __allocator_always_compares_equal<pool_allocator<_Tp>> > { static const bool value = true; }; > > template<typename _Tp> > const bool __allocator_always_compares_equal<pool_allocator<_Tp>>::value; > > > > > > >template<typename _Alloc> > 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> > struct __is_custom_pointer > : std::integral_constant<bool, std::is_same<pointer, _Ptr>::value > && !std::is_pointer<_Ptr>::value> > { }; > > public: > > template<typename _Ptr, typename... _Args> > static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type > construct(_Alloc& __a, _Ptr __p, _Args&&... __args) > { > _Base_type::construct(__a, std::addressof(*__p), > std::forward<_Args>(__args)...); > } > > > template<typename _Ptr> > static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type > destroy(_Alloc& __a, _Ptr __p) > { _Base_type::destroy(__a, std::addressof(*__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 __allocator_always_compares_equal<_Alloc>::value; } > > static constexpr bool _S_nothrow_move() > { return _S_propagate_on_move_assign() || _S_always_equal(); } > > static constexpr bool _S_nothrow_swap() > { > using std::swap; > return !_S_propagate_on_swap() > || noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>())); > } > > template<typename _Tp> > struct rebind > { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; ># 237 "/usr/include/c++/4.8.2/ext/alloc_traits.h" 3 > }; > > >} ># 62 "/usr/include/c++/4.8.2/bits/stl_construct.h" 2 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)...); } ># 90 "/usr/include/c++/4.8.2/bits/stl_construct.h" 3 > 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; > std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: > __destroy(__first, __last); > } > > > > > > > > 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); > } > > >} ># 63 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_uninitialized.h" 1 3 ># 59 "/usr/include/c++/4.8.2/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, ++__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); } > }; ># 105 "/usr/include/c++/4.8.2/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; > > return std::__uninitialized_copy<(__is_trivial(_ValueType1) > && __is_trivial(_ValueType2))>:: > __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); } > }; ># 162 "/usr/include/c++/4.8.2/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; > > std::__uninitialized_fill<__is_trivial(_ValueType)>:: > __uninit_fill(__first, __last, __x); > } > > > template<bool _TrivialValueType> > struct __uninitialized_fill_n > { > template<typename _ForwardIterator, typename _Size, typename _Tp> > static void > __uninit_fill_n(_ForwardIterator __first, _Size __n, > const _Tp& __x) > { > _ForwardIterator __cur = __first; > try > { > for (; __n > 0; --__n, ++__cur) > std::_Construct(std::__addressof(*__cur), __x); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_fill_n<true> > { > template<typename _ForwardIterator, typename _Size, typename _Tp> > static void > __uninit_fill_n(_ForwardIterator __first, _Size __n, > const _Tp& __x) > { std::fill_n(__first, __n, __x); } > }; ># 216 "/usr/include/c++/4.8.2/bits/stl_uninitialized.h" 3 > template<typename _ForwardIterator, typename _Size, typename _Tp> > inline void > uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > std::__uninitialized_fill_n<__is_trivial(_ValueType)>:: > __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, ++__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> > void > __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, ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur), __x); > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > template<typename _ForwardIterator, typename _Size, typename _Tp, > typename _Tp2> > inline void > __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, > const _Tp& __x, allocator<_Tp2>&) > { std::uninitialized_fill_n(__first, __n, __x); } ># 346 "/usr/include/c++/4.8.2/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 void > __uninit_default_n(_ForwardIterator __first, _Size __n) > { > _ForwardIterator __cur = __first; > try > { > for (; __n > 0; --__n, ++__cur) > std::_Construct(std::__addressof(*__cur)); > } > catch(...) > { > std::_Destroy(__first, __cur); > throw; > } > } > }; > > template<> > struct __uninitialized_default_n_1<true> > { > template<typename _ForwardIterator, typename _Size> > static void > __uninit_default_n(_ForwardIterator __first, _Size __n) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > 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; > > std::__uninitialized_default_1<__is_trivial(_ValueType)>:: > __uninit_default(__first, __last); > } > > > > template<typename _ForwardIterator, typename _Size> > inline void > __uninitialized_default_n(_ForwardIterator __first, _Size __n) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > std::__uninitialized_default_n_1<__is_trivial(_ValueType)>:: > __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> > void > __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, ++__cur) > __traits::construct(__alloc, std::__addressof(*__cur)); > } > catch(...) > { > std::_Destroy(__first, __cur, __alloc); > throw; > } > } > > template<typename _ForwardIterator, typename _Size, typename _Tp> > inline void > __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, > allocator<_Tp>&) > { std::__uninitialized_default_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, ++__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); } ># 645 "/usr/include/c++/4.8.2/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)); } > > > >} ># 64 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_vector.h" 1 3 ># 63 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 ># 1 "/usr/include/c++/4.8.2/initializer_list" 1 3 ># 33 "/usr/include/c++/4.8.2/initializer_list" 3 > ># 34 "/usr/include/c++/4.8.2/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 ># 64 "/usr/include/c++/4.8.2/bits/stl_vector.h" 2 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 > : public _Tp_alloc_type > { > pointer _M_start; > pointer _M_finish; > pointer _M_end_of_storage; > > _Vector_impl() > : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) > { } > > _Vector_impl(_Tp_alloc_type const& __a) > : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) > { } > > > _Vector_impl(_Tp_alloc_type&& __a) > : _Tp_alloc_type(std::move(__a)), > _M_start(0), _M_finish(0), _M_end_of_storage(0) > { } > > > void _M_swap_data(_Vector_impl& __x) > { > std::swap(_M_start, __x._M_start); > std::swap(_M_finish, __x._M_finish); > std::swap(_M_end_of_storage, __x._M_end_of_storage); > } > }; > > public: > typedef _Alloc allocator_type; > > _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); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Tp_allocator()); } > > _Vector_base() > : _M_impl() { } > > _Vector_base(const allocator_type& __a) > : _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(_Tp_alloc_type&& __a) > : _M_impl(std::move(__a)) { } > > _Vector_base(_Vector_base&& __x) > : _M_impl(std::move(__x._M_get_Tp_allocator())) > { this->_M_impl._M_swap_data(__x._M_impl); } > > _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() > { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage > - this->_M_impl._M_start); } > > public: > _Vector_impl _M_impl; > > pointer > _M_allocate(size_t __n) > { return __n != 0 ? _M_impl.allocate(__n) : 0; } > > void > _M_deallocate(pointer __p, size_t __n) > { > if (__p) > _M_impl.deallocate(__p, __n); > } > > private: > 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; > } > }; ># 209 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class vector : protected _Vector_base<_Tp, _Alloc> > { > > typedef typename _Alloc::value_type _Alloc_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; > > protected: > using _Base::_M_allocate; > using _Base::_M_deallocate; > using _Base::_M_impl; > using _Base::_M_get_Tp_allocator; > > public: > > > > > > vector() > : _Base() { } > > > > > > explicit > vector(const allocator_type& __a) > : _Base(__a) { } ># 268 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > explicit > vector(size_type __n, const allocator_type& __a = allocator_type()) > : _Base(__n, __a) > { _M_default_initialize(__n); } ># 281 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > vector(size_type __n, const value_type& __value, > const allocator_type& __a = allocator_type()) > : _Base(__n, __a) > { _M_fill_initialize(__n, __value); } ># 310 "/usr/include/c++/4.8.2/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()); > } ># 327 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > vector(vector&& __x) noexcept > : _Base(std::move(__x)) { } > > > 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()); > } > > > vector(vector&& __rv, const allocator_type& __m) > : _Base(std::move(__rv), __m) > { > if (__rv.get_allocator() != __m) > { > this->_M_impl._M_finish = > std::__uninitialized_move_a(__rv.begin(), __rv.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); > __rv.clear(); > } > } ># 364 "/usr/include/c++/4.8.2/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()); > } ># 390 "/usr/include/c++/4.8.2/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_initialize_dispatch(__first, __last, __false_type()); } ># 414 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > ~vector() noexcept > { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, > _M_get_Tp_allocator()); } ># 426 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > vector& > operator=(const vector& __x); ># 438 "/usr/include/c++/4.8.2/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), > integral_constant<bool, __move_storage>()); > return *this; > } ># 460 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > vector& > operator=(initializer_list<value_type> __l) > { > this->assign(__l.begin(), __l.end()); > return *this; > } ># 478 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 495 "/usr/include/c++/4.8.2/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()); } ># 523 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > assign(initializer_list<value_type> __l) > { this->assign(__l.begin(), __l.end()); } > > > > 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 _Alloc_traits::max_size(_M_get_Tp_allocator()); } ># 663 "/usr/include/c++/4.8.2/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); > } ># 683 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > resize(size_type __new_size, const value_type& __x) > { > if (__new_size > size()) > insert(end(), __new_size - size(), __x); > else if (__new_size < size()) > _M_erase_at_end(this->_M_impl._M_start + __new_size); > } ># 715 "/usr/include/c++/4.8.2/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(); } ># 754 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > reserve(size_type __n); ># 769 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > reference > operator[](size_type __n) > { return *(this->_M_impl._M_start + __n); } ># 784 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > const_reference > operator[](size_type __n) const > { return *(this->_M_impl._M_start + __n); } > > protected: > > void > _M_range_check(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range(("vector::_M_range_check")); > } > > public: ># 809 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > reference > at(size_type __n) > { > _M_range_check(__n); > return (*this)[__n]; > } ># 827 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > const_reference > at(size_type __n) const > { > _M_range_check(__n); > return (*this)[__n]; > } > > > > > > reference > front() > { return *begin(); } > > > > > > const_reference > front() const > { return *begin(); } > > > > > > reference > back() > { return *(end() - 1); } > > > > > > const_reference > back() const > { return *(end() - 1); } ># 874 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > _Tp* > > > > data() noexcept > { return std::__addressof(front()); } > > > const _Tp* > > > > data() const noexcept > { return std::__addressof(front()); } ># 900 "/usr/include/c++/4.8.2/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_emplace_back_aux(__x); > > > > } > > > void > push_back(value_type&& __x) > { emplace_back(std::move(__x)); } > > template<typename... _Args> > void > emplace_back(_Args&&... __args); ># 936 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > pop_back() > { > --this->_M_impl._M_finish; > _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); > } ># 956 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > template<typename... _Args> > iterator > emplace(iterator __position, _Args&&... __args); ># 972 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > iterator > insert(iterator __position, const value_type& __x); ># 987 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > iterator > insert(iterator __position, value_type&& __x) > { return emplace(__position, std::move(__x)); } ># 1004 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > insert(iterator __position, initializer_list<value_type> __l) > { this->insert(__position, __l.begin(), __l.end()); } ># 1022 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > insert(iterator __position, size_type __n, const value_type& __x) > { _M_fill_insert(__position, __n, __x); } ># 1041 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > insert(iterator __position, _InputIterator __first, > _InputIterator __last) > { _M_insert_dispatch(__position, __first, __last, __false_type()); } ># 1074 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > iterator > erase(iterator __position); ># 1095 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > iterator > erase(iterator __first, iterator __last); ># 1107 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > void > swap(vector& __x) > > noexcept(_Alloc_traits::_S_nothrow_swap()) > > { > 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; > } > } ># 1159 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > template<typename _Integer> > void > _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) > { > this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n)); > this->_M_impl._M_end_of_storage = > this->_M_impl._M_start + static_cast<size_type>(__n); > _M_fill_initialize(static_cast<size_type>(__n), __value); > } > > > template<typename _InputIterator> > void > _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, > __false_type) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_range_initialize(__first, __last, _IterCategory()); > } > > > template<typename _InputIterator> > void > _M_range_initialize(_InputIterator __first, > _InputIterator __last, std::input_iterator_tag) > { > for (; __first != __last; ++__first) > > emplace_back(*__first); > > > > } > > > 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(__n); > 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) > { > std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; > } > > > > void > _M_default_initialize(size_type __n) > { > std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, > _M_get_Tp_allocator()); > this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; > } ># 1237 "/usr/include/c++/4.8.2/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) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_assign_aux(__first, __last, _IterCategory()); > } > > > 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); ># 1277 "/usr/include/c++/4.8.2/bits/stl_vector.h" 3 > 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) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_range_insert(__pos, __first, __last, _IterCategory()); > } > > > 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(); > > > > > > > > template<typename... _Args> > void > _M_insert_aux(iterator __position, _Args&&... __args); > > template<typename... _Args> > void > _M_emplace_back_aux(_Args&&... __args); > > > > 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(pointer __pos) > { > std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); > this->_M_impl._M_finish = __pos; > } > > > private: > > > > void > _M_move_assign(vector&& __x, std::true_type) noexcept > { > vector __tmp(get_allocator()); > this->_M_impl._M_swap_data(__tmp._M_impl); > this->_M_impl._M_swap_data(__x._M_impl); > if (_Alloc_traits::_S_propagate_on_move_assign()) > std::__alloc_on_move(_M_get_Tp_allocator(), > __x._M_get_Tp_allocator()); > } > > > > void > _M_move_assign(vector&& __x, std::false_type) > { > if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) > _M_move_assign(std::move(__x), std::true_type()); > else > { > > > this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), > std::__make_move_if_noexcept_iterator(__x.end())); > __x.clear(); > } > } > > }; ># 1402 "/usr/include/c++/4.8.2/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())); } ># 1419 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 65 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 1 3 ># 63 "/usr/include/c++/4.8.2/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) { } > > 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) { } > > 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) { } > > 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_iterator __first, _Bit_iterator __last, bool __x) > { > for (; __first != __last; ++__first) > *__first = __x; > } > > inline void > fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) > { > if (__first._M_p != __last._M_p) > { > std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); > __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); > __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); > } > else > __fill_bvector(__first, __last, __x); > } > > template<typename _Alloc> > struct _Bvector_base > { > typedef typename _Alloc::template rebind<_Bit_type>::other > _Bit_alloc_type; > > struct _Bvector_impl > : public _Bit_alloc_type > { > _Bit_iterator _M_start; > _Bit_iterator _M_finish; > _Bit_type* _M_end_of_storage; > > _Bvector_impl() > : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) > { } > > _Bvector_impl(const _Bit_alloc_type& __a) > : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) > { } > > > _Bvector_impl(_Bit_alloc_type&& __a) > : _Bit_alloc_type(std::move(__a)), _M_start(), _M_finish(), > _M_end_of_storage(0) > { } > > }; > > public: > typedef _Alloc allocator_type; > > _Bit_alloc_type& > _M_get_Bit_allocator() noexcept > { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } > > const _Bit_alloc_type& > _M_get_Bit_allocator() const noexcept > { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Bit_allocator()); } > > _Bvector_base() > : _M_impl() { } > > _Bvector_base(const allocator_type& __a) > : _M_impl(__a) { } > > > _Bvector_base(_Bvector_base&& __x) noexcept > : _M_impl(std::move(__x._M_get_Bit_allocator())) > { > this->_M_impl._M_start = __x._M_impl._M_start; > this->_M_impl._M_finish = __x._M_impl._M_finish; > this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage; > __x._M_impl._M_start = _Bit_iterator(); > __x._M_impl._M_finish = _Bit_iterator(); > __x._M_impl._M_end_of_storage = 0; > } > > > ~_Bvector_base() > { this->_M_deallocate(); } > > protected: > _Bvector_impl _M_impl; > > _Bit_type* > _M_allocate(size_t __n) > { return _M_impl.allocate(_S_nword(__n)); } > > void > _M_deallocate() > { > if (_M_impl._M_start._M_p) > _M_impl.deallocate(_M_impl._M_start._M_p, > _M_impl._M_end_of_storage - _M_impl._M_start._M_p); > } > > static size_t > _S_nword(size_t __n) > { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } > }; > > >} > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 517 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 3 >template<typename _Alloc> > class vector<bool, _Alloc> : protected _Bvector_base<_Alloc> > { > typedef _Bvector_base<_Alloc> _Base; > > > template<typename> friend struct hash; > > > 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() > : _Base() { } > > 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); > std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, > __value ? ~0 : 0); > } ># 583 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 3 > vector(const vector& __x) > : _Base(__x._M_get_Bit_allocator()) > { > _M_initialize(__x.size()); > _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); > } > > > vector(vector&& __x) noexcept > : _Base(std::move(__x)) { } > > 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()); } ># 621 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 3 > ~vector() noexcept { } > > vector& > operator=(const vector& __x) > { > if (&__x == this) > return *this; > 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) > { > > > this->clear(); > this->swap(__x); > 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_dispatch(__first, __last, __false_type()); } ># 682 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 3 > void > assign(initializer_list<bool> __l) > { this->assign(__l.begin(), __l.end()); } > > > 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(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 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(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 = _M_get_Bit_allocator().max_size(); > 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_of_storage, 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(("vector<bool>::_M_range_check")); > } > > 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_of_storage) > *this->_M_impl._M_finish++ = __x; > else > _M_insert_aux(end(), __x); > } > > void > swap(vector& __x) > { > 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); > > > > std::__alloc_swap<typename _Base::_Bit_alloc_type>:: > _S_do_it(_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(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_of_storage > && __position == end()) > *this->_M_impl._M_finish++ = __x; > else > _M_insert_aux(__position, __x); > return begin() + __n; > } > > > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > insert(iterator __position, > _InputIterator __first, _InputIterator __last) > { _M_insert_dispatch(__position, __first, __last, __false_type()); } ># 887 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 3 > void > insert(iterator __position, size_type __n, const bool& __x) > { _M_fill_insert(__position, __n, __x); } > > > void insert(iterator __p, initializer_list<bool> __l) > { this->insert(__p, __l.begin(), __l.end()); } > > > void > pop_back() > { --this->_M_impl._M_finish; } > > iterator > erase(iterator __position) > { > if (__position + 1 != end()) > std::copy(__position + 1, end(), __position); > --this->_M_impl._M_finish; > return __position; > } > > iterator > erase(iterator __first, iterator __last) > { > if (__first != __last) > _M_erase_at_end(std::copy(__last, end(), __first)); > return __first; > } > > 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 > { > for (_Bit_type * __p = this->_M_impl._M_start._M_p; > __p != this->_M_impl._M_end_of_storage; ++__p) > *__p = ~*__p; > } > > void > clear() noexcept > { _M_erase_at_end(begin()); } > > > 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) > { > _Bit_type* __q = this->_M_allocate(__n); > this->_M_impl._M_end_of_storage = __q + _S_nword(__n); > this->_M_impl._M_start = iterator(__q, 0); > this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); > } > > 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)); > std::fill(this->_M_impl._M_start._M_p, > this->_M_impl._M_end_of_storage, __x ? ~0 : 0); > } > > 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); > } > > > > template<typename _Integer> > void > _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) > { _M_fill_assign(__n, __val); } > > template<class _InputIterator> > void > _M_assign_dispatch(_InputIterator __first, _InputIterator __last, > __false_type) > { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } > > void > _M_fill_assign(size_t __n, bool __x) > { > if (__n > size()) > { > std::fill(this->_M_impl._M_start._M_p, > this->_M_impl._M_end_of_storage, __x ? ~0 : 0); > insert(end(), __n - size(), __x); > } > else > { > _M_erase_at_end(begin() + __n); > std::fill(this->_M_impl._M_start._M_p, > this->_M_impl._M_end_of_storage, __x ? ~0 : 0); > } > } > > template<typename _InputIterator> > void > _M_assign_aux(_InputIterator __first, _InputIterator __last, > std::input_iterator_tag) > { > iterator __cur = begin(); > for (; __first != __last && __cur != end(); ++__cur, ++__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; } > }; > > >} > > > ># 1 "/usr/include/c++/4.8.2/bits/functional_hash.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/functional_hash.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/functional_hash.h" 3 > ># 1 "/usr/include/c++/4.8.2/bits/hash_bytes.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/hash_bytes.h" 3 > ># 34 "/usr/include/c++/4.8.2/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); > > >} ># 36 "/usr/include/c++/4.8.2/bits/functional_hash.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 49 "/usr/include/c++/4.8.2/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> > struct hash<_Tp*> : public __hash_base<size_t, _Tp*> > { > size_t > operator()(_Tp* __p) const noexcept > { return reinterpret_cast<size_t>(__p); } > }; ># 80 "/usr/include/c++/4.8.2/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); } }; > > > > struct _Hash_impl > { > static size_t > hash(const void* __ptr, size_t __clength, > size_t __seed = static_cast<size_t>(0xc70f6907UL)) > { return _Hash_bytes(__ptr, __clength, __seed); } > > template<typename _Tp> > static size_t > hash(const _Tp& __val) > { return hash(&__val, sizeof(__val)); } > > template<typename _Tp> > static size_t > __hash_combine(const _Tp& __val, size_t __hash) > { return hash(&__val, sizeof(__val), __hash); } > }; > > struct _Fnv_hash_impl > { > static size_t > hash(const void* __ptr, size_t __clength, > size_t __seed = static_cast<size_t>(2166136261UL)) > { return _Fnv_hash_bytes(__ptr, __clength, __seed); } > > template<typename _Tp> > static size_t > hash(const _Tp& __val) > { return hash(&__val, sizeof(__val)); } > > template<typename _Tp> > static size_t > __hash_combine(const _Tp& __val, size_t __hash) > { return hash(&__val, sizeof(__val), __hash); } > }; > > > template<> > struct hash<float> : public __hash_base<size_t, float> > { > size_t > operator()(float __val) const noexcept > { > > return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; > } > }; > > > template<> > struct hash<double> : public __hash_base<size_t, double> > { > size_t > operator()(double __val) const noexcept > { > > return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; > } > }; > > > template<> > struct hash<long double> > : public __hash_base<size_t, long double> > { > __attribute__ ((__pure__)) size_t > operator()(long double __val) const noexcept; > }; > > > > > > > > template<typename _Hash> > struct __is_fast_hash : public std::true_type > { }; > > template<> > struct __is_fast_hash<hash<long double>> : public std::false_type > { }; > > >} ># 1135 "/usr/include/c++/4.8.2/bits/stl_bvector.h" 2 3 > >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; > }; > > >} ># 66 "/usr/include/c++/4.8.2/vector" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/range_access.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/range_access.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/range_access.h" 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<class _Container> > inline auto > begin(_Container& __cont) -> decltype(__cont.begin()) > { return __cont.begin(); } > > > > > > > template<class _Container> > inline auto > begin(const _Container& __cont) -> decltype(__cont.begin()) > { return __cont.begin(); } > > > > > > > template<class _Container> > inline auto > end(_Container& __cont) -> decltype(__cont.end()) > { return __cont.end(); } > > > > > > > template<class _Container> > inline auto > end(const _Container& __cont) -> decltype(__cont.end()) > { return __cont.end(); } > > > > > > template<class _Tp, size_t _Nm> > inline _Tp* > begin(_Tp (&__arr)[_Nm]) > { return __arr; } > > > > > > > template<class _Tp, size_t _Nm> > inline _Tp* > end(_Tp (&__arr)[_Nm]) > { return __arr + _Nm; } > > >} ># 67 "/usr/include/c++/4.8.2/vector" 2 3 > > ># 1 "/usr/include/c++/4.8.2/bits/vector.tcc" 1 3 ># 59 "/usr/include/c++/4.8.2/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 = _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_emplace_back_aux(std::forward<_Args>(__args)...); > } > > > template<typename _Tp, typename _Alloc> > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > insert(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 > && __position == end()) > { > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); > ++this->_M_impl._M_finish; > } > else > { > > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) > { > _Tp __x_copy = __x; > _M_insert_aux(__position, std::move(__x_copy)); > } > else > > _M_insert_aux(__position, __x); > } > return iterator(this->_M_impl._M_start + __n); > } > > template<typename _Tp, typename _Alloc> > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > 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>:: > 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.swap(*this); > } > else if (__n > size()) > { > std::fill(begin(), end(), __val); > std::__uninitialized_fill_n_a(this->_M_impl._M_finish, > __n - size(), __val, > _M_get_Tp_allocator()); > this->_M_impl._M_finish += __n - size(); > } > 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, ++__first) > *__cur = *__first; > if (__first == __last) > _M_erase_at_end(__cur); > else > insert(end(), __first, __last); > } > > 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()) > { > 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); > 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> > template<typename... _Args> > typename vector<_Tp, _Alloc>::iterator > vector<_Tp, _Alloc>:: > emplace(iterator __position, _Args&&... __args) > { > const size_type __n = __position - begin(); > if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage > && __position == end()) > { > _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, > std::forward<_Args>(__args)...); > ++this->_M_impl._M_finish; > } > else > _M_insert_aux(__position, std::forward<_Args>(__args)...); > return iterator(this->_M_impl._M_start + __n); > } > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > void > vector<_Tp, _Alloc>:: > _M_insert_aux(iterator __position, _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::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 = _Tp(std::forward<_Args>(__args)...); > > } > else > { > const size_type __len = > _M_check_len(size_type(1), "vector::_M_insert_aux"); > 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 = 0; > > __new_finish > = std::__uninitialized_move_if_noexcept_a > (this->_M_impl._M_start, __position.base(), > __new_start, _M_get_Tp_allocator()); > > ++__new_finish; > > __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) > _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; > } > 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> > template<typename... _Args> > void > vector<_Tp, _Alloc>:: > _M_emplace_back_aux(_Args&&... __args) > { > const size_type __len = > _M_check_len(size_type(1), "vector::_M_emplace_back_aux"); > pointer __new_start(this->_M_allocate(__len)); > pointer __new_finish(__new_start); > try > { > _Alloc_traits::construct(this->_M_impl, __new_start + size(), > std::forward<_Args>(__args)...); > __new_finish = 0; > > __new_finish > = std::__uninitialized_move_if_noexcept_a > (this->_M_impl._M_start, this->_M_impl._M_finish, > __new_start, _M_get_Tp_allocator()); > > ++__new_finish; > } > catch(...) > { > if (!__new_finish) > _Alloc_traits::destroy(this->_M_impl, __new_start + size()); > 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_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) > { > value_type __x_copy = __x; > 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 > { > std::__uninitialized_fill_n_a(this->_M_impl._M_finish, > __n - __elems_after, > __x_copy, > _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::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 = 0; > > __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) > { > if (size_type(this->_M_impl._M_end_of_storage > - this->_M_impl._M_finish) >= __n) > { > std::__uninitialized_default_n_a(this->_M_impl._M_finish, > __n, _M_get_Tp_allocator()); > this->_M_impl._M_finish += __n; > } > else > { > const size_type __len = > _M_check_len(__n, "vector::_M_default_append"); > const size_type __old_size = this->size(); > 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, this->_M_impl._M_finish, > __new_start, _M_get_Tp_allocator()); > std::__uninitialized_default_n_a(__new_finish, __n, > _M_get_Tp_allocator()); > __new_finish += __n; > } > 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 _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) > { > for (; __first != __last; ++__first) > { > __pos = insert(__pos, *__first); > ++__pos; > } > } > > 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_type* __q = this->_M_allocate(__n); > this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), > iterator(__q, 0)); > this->_M_deallocate(); > this->_M_impl._M_start = iterator(__q, 0); > 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_type * __q = this->_M_allocate(__len); > iterator __i = _M_copy_aligned(begin(), __position, > iterator(__q, 0)); > std::fill(__i, __i + difference_type(__n), __x); > this->_M_impl._M_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 = iterator(__q, 0); > } > } > > 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_type * __q = this->_M_allocate(__len); > iterator __i = _M_copy_aligned(begin(), __position, > iterator(__q, 0)); > __i = std::copy(__first, __last, __i); > this->_M_impl._M_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 = iterator(__q, 0); > } > } > } > > 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_of_storage) > { > 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_type * __q = this->_M_allocate(__len); > iterator __i = _M_copy_aligned(begin(), __position, > iterator(__q, 0)); > *__i++ = __x; > this->_M_impl._M_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 = iterator(__q, 0); > } > } > > > 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; > } > > >} ># 70 "/usr/include/c++/4.8.2/vector" 2 3 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/usr/include/c++/4.8.2/map" 1 3 ># 58 "/usr/include/c++/4.8.2/map" 3 > ># 59 "/usr/include/c++/4.8.2/map" 3 > ># 1 "/usr/include/c++/4.8.2/bits/stl_tree.h" 1 3 ># 63 "/usr/include/c++/4.8.2/bits/stl_tree.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_function.h" 1 3 ># 59 "/usr/include/c++/4.8.2/bits/stl_function.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 100 "/usr/include/c++/4.8.2/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; > }; ># 139 "/usr/include/c++/4.8.2/bits/stl_function.h" 3 > template<typename _Tp> > struct plus : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x + __y; } > }; > > > template<typename _Tp> > struct minus : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x - __y; } > }; > > > template<typename _Tp> > struct multiplies : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x * __y; } > }; > > > template<typename _Tp> > struct divides : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x / __y; } > }; > > > template<typename _Tp> > struct modulus : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x % __y; } > }; > > > template<typename _Tp> > struct negate : public unary_function<_Tp, _Tp> > { > _Tp > operator()(const _Tp& __x) const > { return -__x; } > }; ># 203 "/usr/include/c++/4.8.2/bits/stl_function.h" 3 > template<typename _Tp> > struct equal_to : public binary_function<_Tp, _Tp, bool> > { > 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> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x != __y; } > }; > > > template<typename _Tp> > struct greater : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x > __y; } > }; > > > template<typename _Tp> > struct less : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x < __y; } > }; > > > template<typename _Tp> > struct greater_equal : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x >= __y; } > }; > > > template<typename _Tp> > struct less_equal : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x <= __y; } > }; ># 267 "/usr/include/c++/4.8.2/bits/stl_function.h" 3 > template<typename _Tp> > struct logical_and : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x && __y; } > }; > > > template<typename _Tp> > struct logical_or : public binary_function<_Tp, _Tp, bool> > { > bool > operator()(const _Tp& __x, const _Tp& __y) const > { return __x || __y; } > }; > > > template<typename _Tp> > struct logical_not : public unary_function<_Tp, bool> > { > bool > operator()(const _Tp& __x) const > { return !__x; } > }; > > > > > template<typename _Tp> > struct bit_and : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x & __y; } > }; > > template<typename _Tp> > struct bit_or : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x | __y; } > }; > > template<typename _Tp> > struct bit_xor : public binary_function<_Tp, _Tp, _Tp> > { > _Tp > operator()(const _Tp& __x, const _Tp& __y) const > { return __x ^ __y; } > }; ># 350 "/usr/include/c++/4.8.2/bits/stl_function.h" 3 > template<typename _Predicate> > class unary_negate > : public unary_function<typename _Predicate::argument_type, bool> > { > protected: > _Predicate _M_pred; > > public: > explicit > unary_negate(const _Predicate& __x) : _M_pred(__x) { } > > bool > operator()(const typename _Predicate::argument_type& __x) const > { return !_M_pred(__x); } > }; > > > template<typename _Predicate> > 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: > explicit > binary_negate(const _Predicate& __x) : _M_pred(__x) { } > > 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> > inline binary_negate<_Predicate> > not2(const _Predicate& __pred) > { return binary_negate<_Predicate>(__pred); } ># 421 "/usr/include/c++/4.8.2/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 _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; } > }; ># 541 "/usr/include/c++/4.8.2/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++/4.8.2/backward/binders.h" 1 3 ># 59 "/usr/include/c++/4.8.2/backward/binders.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 103 "/usr/include/c++/4.8.2/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)); > } > > > >} ># 732 "/usr/include/c++/4.8.2/bits/stl_function.h" 2 3 ># 64 "/usr/include/c++/4.8.2/bits/stl_tree.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 89 "/usr/include/c++/4.8.2/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) > { > while (__x->_M_left != 0) __x = __x->_M_left; > return __x; > } > > static _Const_Base_ptr > _S_minimum(_Const_Base_ptr __x) > { > while (__x->_M_left != 0) __x = __x->_M_left; > return __x; > } > > static _Base_ptr > _S_maximum(_Base_ptr __x) > { > while (__x->_M_right != 0) __x = __x->_M_right; > return __x; > } > > static _Const_Base_ptr > _S_maximum(_Const_Base_ptr __x) > { > while (__x->_M_right != 0) __x = __x->_M_right; > return __x; > } > }; > > template<typename _Val> > struct _Rb_tree_node : public _Rb_tree_node_base > { > typedef _Rb_tree_node<_Val>* _Link_type; > _Val _M_value_field; > > > template<typename... _Args> > _Rb_tree_node(_Args&&... __args) > : _Rb_tree_node_base(), > _M_value_field(std::forward<_Args>(__args)...) { } > > }; > > __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() > : _M_node() { } > > explicit > _Rb_tree_iterator(_Link_type __x) > : _M_node(__x) { } > > reference > operator*() const > { return static_cast<_Link_type>(_M_node)->_M_value_field; } > > pointer > operator->() const > { return std::__addressof(static_cast<_Link_type> > (_M_node)->_M_value_field); } > > _Self& > operator++() > { > _M_node = _Rb_tree_increment(_M_node); > return *this; > } > > _Self > operator++(int) > { > _Self __tmp = *this; > _M_node = _Rb_tree_increment(_M_node); > return __tmp; > } > > _Self& > operator--() > { > _M_node = _Rb_tree_decrement(_M_node); > return *this; > } > > _Self > operator--(int) > { > _Self __tmp = *this; > _M_node = _Rb_tree_decrement(_M_node); > return __tmp; > } > > bool > operator==(const _Self& __x) const > { return _M_node == __x._M_node; } > > bool > operator!=(const _Self& __x) const > { return _M_node != __x._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() > : _M_node() { } > > explicit > _Rb_tree_const_iterator(_Link_type __x) > : _M_node(__x) { } > > _Rb_tree_const_iterator(const iterator& __it) > : _M_node(__it._M_node) { } > > iterator > _M_const_cast() const > { return iterator(static_cast<typename iterator::_Link_type> > (const_cast<typename iterator::_Base_ptr>(_M_node))); } > > reference > operator*() const > { return static_cast<_Link_type>(_M_node)->_M_value_field; } > > pointer > operator->() const > { return std::__addressof(static_cast<_Link_type> > (_M_node)->_M_value_field); } > > _Self& > operator++() > { > _M_node = _Rb_tree_increment(_M_node); > return *this; > } > > _Self > operator++(int) > { > _Self __tmp = *this; > _M_node = _Rb_tree_increment(_M_node); > return __tmp; > } > > _Self& > operator--() > { > _M_node = _Rb_tree_decrement(_M_node); > return *this; > } > > _Self > operator--(int) > { > _Self __tmp = *this; > _M_node = _Rb_tree_decrement(_M_node); > return __tmp; > } > > bool > operator==(const _Self& __x) const > { return _M_node == __x._M_node; } > > bool > operator!=(const _Self& __x) const > { return _M_node != __x._M_node; } > > _Base_ptr _M_node; > }; > > template<typename _Val> > inline bool > operator==(const _Rb_tree_iterator<_Val>& __x, > const _Rb_tree_const_iterator<_Val>& __y) > { return __x._M_node == __y._M_node; } > > template<typename _Val> > inline bool > operator!=(const _Rb_tree_iterator<_Val>& __x, > const _Rb_tree_const_iterator<_Val>& __y) > { return __x._M_node != __y._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 _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc = allocator<_Val> > > class _Rb_tree > { > typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other > _Node_allocator; > > protected: > typedef _Rb_tree_node_base* _Base_ptr; > typedef const _Rb_tree_node_base* _Const_Base_ptr; > > 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 _Rb_tree_node<_Val>* _Link_type; > typedef const _Rb_tree_node<_Val>* _Const_Link_type; > typedef size_t size_type; > typedef ptrdiff_t difference_type; > typedef _Alloc allocator_type; > > _Node_allocator& > _M_get_Node_allocator() noexcept > { return *static_cast<_Node_allocator*>(&this->_M_impl); } > > const _Node_allocator& > _M_get_Node_allocator() const noexcept > { return *static_cast<const _Node_allocator*>(&this->_M_impl); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Node_allocator()); } > > protected: > _Link_type > _M_get_node() > { return _M_impl._Node_allocator::allocate(1); } > > void > _M_put_node(_Link_type __p) > { _M_impl._Node_allocator::deallocate(__p, 1); } ># 399 "/usr/include/c++/4.8.2/bits/stl_tree.h" 3 > template<typename... _Args> > _Link_type > _M_create_node(_Args&&... __args) > { > _Link_type __tmp = _M_get_node(); > try > { > allocator_traits<_Node_allocator>:: > construct(_M_get_Node_allocator(), __tmp, > std::forward<_Args>(__args)...); > } > catch(...) > { > _M_put_node(__tmp); > throw; > } > return __tmp; > } > > void > _M_destroy_node(_Link_type __p) > { > _M_get_Node_allocator().destroy(__p); > _M_put_node(__p); > } > > > _Link_type > _M_clone_node(_Const_Link_type __x) > { > _Link_type __tmp = _M_create_node(__x->_M_value_field); > __tmp->_M_color = __x->_M_color; > __tmp->_M_left = 0; > __tmp->_M_right = 0; > return __tmp; > } > > protected: > template<typename _Key_compare, > bool _Is_pod_comparator = __is_pod(_Key_compare)> > struct _Rb_tree_impl : public _Node_allocator > { > _Key_compare _M_key_compare; > _Rb_tree_node_base _M_header; > size_type _M_node_count; > > _Rb_tree_impl() > : _Node_allocator(), _M_key_compare(), _M_header(), > _M_node_count(0) > { _M_initialize(); } > > _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) > : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), > _M_node_count(0) > { _M_initialize(); } > > > _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) > : _Node_allocator(std::move(__a)), _M_key_compare(__comp), > _M_header(), _M_node_count(0) > { _M_initialize(); } > > > private: > void > _M_initialize() > { > this->_M_header._M_color = _S_red; > this->_M_header._M_parent = 0; > this->_M_header._M_left = &this->_M_header; > this->_M_header._M_right = &this->_M_header; > } > }; > > _Rb_tree_impl<_Compare> _M_impl; > > protected: > _Base_ptr& > _M_root() > { return this->_M_impl._M_header._M_parent; } > > _Const_Base_ptr > _M_root() const > { return this->_M_impl._M_header._M_parent; } > > _Base_ptr& > _M_leftmost() > { return this->_M_impl._M_header._M_left; } > > _Const_Base_ptr > _M_leftmost() const > { return this->_M_impl._M_header._M_left; } > > _Base_ptr& > _M_rightmost() > { return this->_M_impl._M_header._M_right; } > > _Const_Base_ptr > _M_rightmost() const > { return this->_M_impl._M_header._M_right; } > > _Link_type > _M_begin() > { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } > > _Const_Link_type > _M_begin() const > { > return static_cast<_Const_Link_type> > (this->_M_impl._M_header._M_parent); > } > > _Link_type > _M_end() > { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); } > > _Const_Link_type > _M_end() const > { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); } > > static const_reference > _S_value(_Const_Link_type __x) > { return __x->_M_value_field; } > > static const _Key& > _S_key(_Const_Link_type __x) > { return _KeyOfValue()(_S_value(__x)); } > > static _Link_type > _S_left(_Base_ptr __x) > { return static_cast<_Link_type>(__x->_M_left); } > > static _Const_Link_type > _S_left(_Const_Base_ptr __x) > { return static_cast<_Const_Link_type>(__x->_M_left); } > > static _Link_type > _S_right(_Base_ptr __x) > { return static_cast<_Link_type>(__x->_M_right); } > > static _Const_Link_type > _S_right(_Const_Base_ptr __x) > { 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_value_field; } > > static const _Key& > _S_key(_Const_Base_ptr __x) > { return _KeyOfValue()(_S_value(__x)); } > > static _Base_ptr > _S_minimum(_Base_ptr __x) > { return _Rb_tree_node_base::_S_minimum(__x); } > > static _Const_Base_ptr > _S_minimum(_Const_Base_ptr __x) > { return _Rb_tree_node_base::_S_minimum(__x); } > > static _Base_ptr > _S_maximum(_Base_ptr __x) > { return _Rb_tree_node_base::_S_maximum(__x); } > > static _Const_Base_ptr > _S_maximum(_Const_Base_ptr __x) > { 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; > > private: > 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); > > > template<typename _Arg> > iterator > _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v); > > 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); ># 624 "/usr/include/c++/4.8.2/bits/stl_tree.h" 3 > _Link_type > _M_copy(_Const_Link_type __x, _Link_type __p); > > void > _M_erase(_Link_type __x); > > iterator > _M_lower_bound(_Link_type __x, _Link_type __y, > const _Key& __k); > > const_iterator > _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, > const _Key& __k) const; > > iterator > _M_upper_bound(_Link_type __x, _Link_type __y, > const _Key& __k); > > const_iterator > _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, > const _Key& __k) const; > > public: > > _Rb_tree() { } > > _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._M_key_compare, __x._M_get_Node_allocator()) > { > if (__x._M_root() != 0) > { > _M_root() = _M_copy(__x._M_begin(), _M_end()); > _M_leftmost() = _S_minimum(_M_root()); > _M_rightmost() = _S_maximum(_M_root()); > _M_impl._M_node_count = __x._M_impl._M_node_count; > } > } > > > _Rb_tree(_Rb_tree&& __x); > > > ~_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(static_cast<_Link_type> > (this->_M_impl._M_header._M_left)); > } > > const_iterator > begin() const noexcept > { > return const_iterator(static_cast<_Const_Link_type> > (this->_M_impl._M_header._M_left)); > } > > iterator > end() noexcept > { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } > > const_iterator > end() const noexcept > { > return const_iterator(static_cast<_Const_Link_type> > (&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 _M_get_Node_allocator().max_size(); } > > void > swap(_Rb_tree& __t); > > > > template<typename _Arg> > pair<iterator, bool> > _M_insert_unique(_Arg&& __x); > > template<typename _Arg> > iterator > _M_insert_equal(_Arg&& __x); > > template<typename _Arg> > iterator > _M_insert_unique_(const_iterator __position, _Arg&& __x); > > template<typename _Arg> > iterator > _M_insert_equal_(const_iterator __position, _Arg&& __x); > > 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); ># 784 "/usr/include/c++/4.8.2/bits/stl_tree.h" 3 > template<typename _InputIterator> > void > _M_insert_unique(_InputIterator __first, _InputIterator __last); > > template<typename _InputIterator> > void > _M_insert_equal(_InputIterator __first, _InputIterator __last); > > 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; > } ># 832 "/usr/include/c++/4.8.2/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(); > } ># 854 "/usr/include/c++/4.8.2/bits/stl_tree.h" 3 > void > erase(const key_type* __first, const key_type* __last); > > void > clear() noexcept > { > _M_erase(_M_begin()); > _M_leftmost() = _M_end(); > _M_root() = 0; > _M_rightmost() = _M_end(); > _M_impl._M_node_count = 0; > } > > > 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; > > > bool > __rb_verify() const; > }; > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { > return __x.size() == __y.size() > && std::equal(__x.begin(), __x.end(), __y.begin()); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { > return std::lexicographical_compare(__x.begin(), __x.end(), > __y.begin(), __y.end()); > } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { return !(__x == __y); } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { return __y < __x; } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) > { return !(__y < __x); } > > template<typename _Key, typename _Val, typename _KeyOfValue, > typename _Compare, typename _Alloc> > inline bool > operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, > const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __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> > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x) > : _M_impl(__x._M_impl._M_key_compare, > std::move(__x._M_get_Node_allocator())) > { > if (__x._M_root() != 0) > { > _M_root() = __x._M_root(); > _M_leftmost() = __x._M_leftmost(); > _M_rightmost() = __x._M_rightmost(); > _M_root()->_M_parent = _M_end(); > > __x._M_root() = 0; > __x._M_leftmost() = __x._M_end(); > __x._M_rightmost() = __x._M_end(); > > this->_M_impl._M_node_count = __x._M_impl._M_node_count; > __x._M_impl._M_node_count = 0; > } > } > > > 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<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) > { > if (this != &__x) > { > > clear(); > _M_impl._M_key_compare = __x._M_impl._M_key_compare; > if (__x._M_root() != 0) > { > _M_root() = _M_copy(__x._M_begin(), _M_end()); > _M_leftmost() = _S_minimum(_M_root()); > _M_rightmost() = _S_maximum(_M_root()); > _M_impl._M_node_count = __x._M_impl._M_node_count; > } > } > return *this; > } > > 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_(_Base_ptr __x, _Base_ptr __p, _Arg&& __v) > > > > { > bool __insert_left = (__x != 0 || __p == _M_end() > || _M_impl._M_key_compare(_KeyOfValue()(__v), > _S_key(__p))); > > _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_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(); > _Link_type __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> > typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type > _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: > _M_copy(_Const_Link_type __x, _Link_type __p) > { > > _Link_type __top = _M_clone_node(__x); > __top->_M_parent = __p; > > try > { > if (__x->_M_right) > __top->_M_right = _M_copy(_S_right(__x), __top); > __p = __top; > __x = _S_left(__x); > > while (__x != 0) > { > _Link_type __y = _M_clone_node(__x); > __p->_M_left = __y; > __y->_M_parent = __p; > if (__x->_M_right) > __y->_M_right = _M_copy(_S_right(__x), __y); > __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_destroy_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, _Link_type __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_Link_type __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, _Link_type __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_Link_type __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(); > _Link_type __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), __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_Link_type __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), __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<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) > { > if (_M_root() == 0) > { > if (__t._M_root() != 0) > { > _M_root() = __t._M_root(); > _M_leftmost() = __t._M_leftmost(); > _M_rightmost() = __t._M_rightmost(); > _M_root()->_M_parent = _M_end(); > > __t._M_root() = 0; > __t._M_leftmost() = __t._M_end(); > __t._M_rightmost() = __t._M_end(); > } > } > else if (__t._M_root() == 0) > { > __t._M_root() = _M_root(); > __t._M_leftmost() = _M_leftmost(); > __t._M_rightmost() = _M_rightmost(); > __t._M_root()->_M_parent = __t._M_end(); > > _M_root() = 0; > _M_leftmost() = _M_end(); > _M_rightmost() = _M_end(); > } > 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); > > > > std::__alloc_swap<_Node_allocator>:: > _S_do_it(_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(); > _Link_type __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(); > _Link_type __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) > return _Res(_M_insert_(__res.first, __res.second, > std::forward<_Arg>(__v)), > true); > > return _Res(iterator(static_cast<_Link_type>(__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)); > return _M_insert_(__res.first, __res.second, std::forward<_Arg>(__v)); > } > > 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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_unique_(const_iterator __position, _Arg&& __v) > > > > { > 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)); > return iterator(static_cast<_Link_type>(__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 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator > _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: > > _M_insert_equal_(const_iterator __position, _Arg&& __v) > > > > { > 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)); > > 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(); > _Link_type __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_destroy_node(__z); > return _Res(iterator(static_cast<_Link_type>(__res.first)), false); > } > catch(...) > { > _M_destroy_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_destroy_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_destroy_node(__z); > return iterator(static_cast<_Link_type>(__res.first)); > } > catch(...) > { > _M_destroy_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_destroy_node(__z); > throw; > } > } > > > template<typename _Key, typename _Val, typename _KoV, > typename _Cmp, typename _Alloc> > template<class _II> > void > _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: > _M_insert_unique(_II __first, _II __last) > { > for (; __first != __last; ++__first) > _M_insert_unique_(end(), *__first); > } > > template<typename _Key, typename _Val, typename _KoV, > typename _Cmp, typename _Alloc> > template<class _II> > void > _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: > _M_insert_equal(_II __first, _II __last) > { > for (; __first != __last; ++__first) > _M_insert_equal_(end(), *__first); > } > > 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_destroy_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) > erase(__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(); > erase(__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; > } > > >} ># 61 "/usr/include/c++/4.8.2/map" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_map.h" 1 3 ># 63 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 ># 1 "/usr/include/c++/4.8.2/tuple" 1 3 ># 32 "/usr/include/c++/4.8.2/tuple" 3 > ># 33 "/usr/include/c++/4.8.2/tuple" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/utility" 1 3 ># 58 "/usr/include/c++/4.8.2/utility" 3 > ># 59 "/usr/include/c++/4.8.2/utility" 3 ># 69 "/usr/include/c++/4.8.2/utility" 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_relops.h" 1 3 ># 67 "/usr/include/c++/4.8.2/bits/stl_relops.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > namespace rel_ops > { > ># 85 "/usr/include/c++/4.8.2/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator!=(const _Tp& __x, const _Tp& __y) > { return !(__x == __y); } ># 98 "/usr/include/c++/4.8.2/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator>(const _Tp& __x, const _Tp& __y) > { return __y < __x; } ># 111 "/usr/include/c++/4.8.2/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator<=(const _Tp& __x, const _Tp& __y) > { return !(__y < __x); } ># 124 "/usr/include/c++/4.8.2/bits/stl_relops.h" 3 > template <class _Tp> > inline bool > operator>=(const _Tp& __x, const _Tp& __y) > { return !(__x < __y); } > > > } > >} ># 70 "/usr/include/c++/4.8.2/utility" 2 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<class _Tp> > class tuple_size; > > template<std::size_t _Int, class _Tp> > class tuple_element; > > > 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<> > 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<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); } > > >} ># 39 "/usr/include/c++/4.8.2/tuple" 2 3 ># 1 "/usr/include/c++/4.8.2/array" 1 3 ># 32 "/usr/include/c++/4.8.2/array" 3 > ># 33 "/usr/include/c++/4.8.2/array" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/stdexcept" 1 3 ># 36 "/usr/include/c++/4.8.2/stdexcept" 3 > ># 37 "/usr/include/c++/4.8.2/stdexcept" 3 > > ># 1 "/usr/include/c++/4.8.2/string" 1 3 ># 36 "/usr/include/c++/4.8.2/string" 3 > ># 37 "/usr/include/c++/4.8.2/string" 3 > > ># 1 "/usr/include/c++/4.8.2/bits/stringfwd.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/stringfwd.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/stringfwd.h" 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > template<class _CharT> > struct char_traits; > > template<typename _CharT, typename _Traits = char_traits<_CharT>, > typename _Alloc = allocator<_CharT> > > class basic_string; > > template<> struct char_traits<char>; > > > typedef basic_string<char> string; > > > template<> struct char_traits<wchar_t>; > > > typedef basic_string<wchar_t> wstring; > > > > > > template<> struct char_traits<char16_t>; > template<> struct char_traits<char32_t>; > > > typedef basic_string<char16_t> u16string; > > > typedef basic_string<char32_t> u32string; > > > > > >} ># 40 "/usr/include/c++/4.8.2/string" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/char_traits.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/char_traits.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/char_traits.h" 3 > > ># 1 "/usr/include/c++/4.8.2/bits/postypes.h" 1 3 ># 38 "/usr/include/c++/4.8.2/bits/postypes.h" 3 > ># 39 "/usr/include/c++/4.8.2/bits/postypes.h" 3 > ># 1 "/usr/include/c++/4.8.2/cwchar" 1 3 ># 39 "/usr/include/c++/4.8.2/cwchar" 3 > ># 40 "/usr/include/c++/4.8.2/cwchar" 3 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 36 "/usr/include/wchar.h" 3 4 ># 1 "/usr/include/stdio.h" 1 3 4 ># 44 "/usr/include/stdio.h" 3 4 >struct _IO_FILE; > > > >typedef struct _IO_FILE FILE; > > > > > ># 64 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 37 "/usr/include/wchar.h" 2 3 4 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 40 "/usr/include/wchar.h" 2 3 4 > ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 22 "/usr/include/bits/wchar.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 23 "/usr/include/bits/wchar.h" 2 3 4 ># 42 "/usr/include/wchar.h" 2 3 4 ># 51 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 212 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 3 4 >typedef long unsigned int size_t; ># 353 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 3 4 >typedef unsigned int wint_t; ># 52 "/usr/include/wchar.h" 2 3 4 ># 82 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > > unsigned int __wch; > > > > char __wchb[4]; > } __value; >} __mbstate_t; ># 104 "/usr/include/wchar.h" 3 4 > > >typedef __mbstate_t mbstate_t; > > > > > > ># 132 "/usr/include/wchar.h" 3 4 >extern "C" { > > > > >struct tm; > > > > > > > > > >extern wchar_t *wcscpy (wchar_t *__restrict __dest, > const wchar_t *__restrict __src) throw (); > >extern wchar_t *wcsncpy (wchar_t *__restrict __dest, > const wchar_t *__restrict __src, size_t __n) > throw (); > > >extern wchar_t *wcscat (wchar_t *__restrict __dest, > const wchar_t *__restrict __src) throw (); > >extern wchar_t *wcsncat (wchar_t *__restrict __dest, > const wchar_t *__restrict __src, size_t __n) > throw (); > > >extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) > throw () __attribute__ ((__pure__)); > >extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) > throw () __attribute__ ((__pure__)); > > > > >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 (); > > > ># 1 "/usr/include/xlocale.h" 1 3 4 ># 27 "/usr/include/xlocale.h" 3 4 >typedef 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]; >} *__locale_t; > > >typedef __locale_t locale_t; ># 181 "/usr/include/wchar.h" 2 3 4 > >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__)); > > > > > > > > > >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__)); ># 306 "/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 (); > > > > > > > > >extern wint_t __btowc_alias (int __c) __asm ("btowc"); >extern __inline __attribute__ ((__gnu_inline__)) wint_t >__attribute__ ((__leaf__)) btowc (int __c) throw () >{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' > ? (wint_t) __c : __btowc_alias (__c)); } > >extern int __wctob_alias (wint_t __c) __asm ("wctob"); >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) wctob (wint_t __wc) throw () >{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' > ? (int) __wc : __wctob_alias (__wc)); } > >extern __inline __attribute__ ((__gnu_inline__)) size_t >__attribute__ ((__leaf__)) mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () > >{ return (__ps != __null > ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } > > > > > >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 (); > > > > > > > >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 (); ># 530 "/usr/include/wchar.h" 3 4 >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 (); > > > > > > >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 (); > > > > > > >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 () ; ># 680 "/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 () ; ># 736 "/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); > ># 801 "/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); ># 827 "/usr/include/wchar.h" 3 4 >extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); >extern wint_t putwchar_unlocked (wchar_t __wc); ># 837 "/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 (); ># 891 "/usr/include/wchar.h" 3 4 >} ># 45 "/usr/include/c++/4.8.2/cwchar" 2 3 ># 62 "/usr/include/c++/4.8.2/cwchar" 3 >namespace std >{ > using ::mbstate_t; >} ># 135 "/usr/include/c++/4.8.2/cwchar" 3 >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; ># 232 "/usr/include/c++/4.8.2/cwchar" 3 > >} > > > > > > > >namespace __gnu_cxx >{ > > > > > > using ::wcstold; ># 257 "/usr/include/c++/4.8.2/cwchar" 3 > using ::wcstoll; > using ::wcstoull; > >} > >namespace std >{ > using ::__gnu_cxx::wcstold; > using ::__gnu_cxx::wcstoll; > using ::__gnu_cxx::wcstoull; >} ># 277 "/usr/include/c++/4.8.2/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++/4.8.2/bits/postypes.h" 2 3 ># 68 "/usr/include/c++/4.8.2/bits/postypes.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 88 "/usr/include/c++/4.8.2/bits/postypes.h" 3 > typedef long streamoff; ># 98 "/usr/include/c++/4.8.2/bits/postypes.h" 3 > typedef ptrdiff_t streamsize; ># 111 "/usr/include/c++/4.8.2/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++/4.8.2/bits/postypes.h" 3 > fpos(streamoff __off) > : _M_off(__off), _M_state() { } > > > 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; > > > > typedef fpos<mbstate_t> u16streampos; > > typedef fpos<mbstate_t> u32streampos; > > > >} ># 41 "/usr/include/c++/4.8.2/bits/char_traits.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cwchar" 1 3 ># 39 "/usr/include/c++/4.8.2/cwchar" 3 > ># 40 "/usr/include/c++/4.8.2/cwchar" 3 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 45 "/usr/include/c++/4.8.2/cwchar" 2 3 ># 42 "/usr/include/c++/4.8.2/bits/char_traits.h" 2 3 > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > ># 57 "/usr/include/c++/4.8.2/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; > }; ># 82 "/usr/include/c++/4.8.2/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 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 int > compare(const char_type* __s1, const char_type* __s2, std::size_t __n); > > static std::size_t > length(const char_type* __s); > > static 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> > 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> > 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> > 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) > { > 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"))) >{ > ># 226 "/usr/include/c++/4.8.2/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 __c1 < __c2; } > > static int > compare(const char_type* __s1, const char_type* __s2, size_t __n) > { 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) > { 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) > { return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { 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) > { 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) > { return wmemchr(__s, __a, __n); } > > static char_type* > move(char_type* __s1, const char_type* __s2, size_t __n) > { return wmemmove(__s1, __s2, __n); } > > static char_type* > copy(char_type* __s1, const char_type* __s2, size_t __n) > { return wmemcpy(__s1, __s2, __n); } > > static char_type* > assign(char_type* __s, size_t __n, char_type __a) > { 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; } > }; > > > >} > > > > ># 1 "/usr/include/c++/4.8.2/cstdint" 1 3 ># 32 "/usr/include/c++/4.8.2/cstdint" 3 > ># 33 "/usr/include/c++/4.8.2/cstdint" 3 ># 41 "/usr/include/c++/4.8.2/cstdint" 3 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdint.h" 1 3 4 ># 9 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdint.h" 3 4 ># 1 "/usr/include/stdint.h" 1 3 4 ># 27 "/usr/include/stdint.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/stdint.h" 2 3 4 ># 36 "/usr/include/stdint.h" 3 4 >typedef signed char int8_t; >typedef short int int16_t; >typedef int int32_t; > >typedef long int int64_t; > > > > > > > >typedef unsigned char uint8_t; >typedef unsigned short int uint16_t; > >typedef unsigned int uint32_t; > > > >typedef unsigned long int uint64_t; ># 65 "/usr/include/stdint.h" 3 4 >typedef signed char int_least8_t; >typedef short int int_least16_t; >typedef int int_least32_t; > >typedef long int int_least64_t; > > > > > > >typedef unsigned char uint_least8_t; >typedef unsigned short int uint_least16_t; >typedef unsigned int uint_least32_t; > >typedef unsigned long int uint_least64_t; ># 90 "/usr/include/stdint.h" 3 4 >typedef signed char int_fast8_t; > >typedef long int int_fast16_t; >typedef long int int_fast32_t; >typedef long int int_fast64_t; ># 103 "/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; ># 119 "/usr/include/stdint.h" 3 4 >typedef long int intptr_t; > > >typedef unsigned long int uintptr_t; ># 134 "/usr/include/stdint.h" 3 4 >typedef long int intmax_t; >typedef unsigned long int uintmax_t; ># 10 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdint.h" 2 3 4 ># 42 "/usr/include/c++/4.8.2/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; >} ># 377 "/usr/include/c++/4.8.2/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) > { > 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) > { > 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; } > }; > > 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) > { > 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) > { > 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++/4.8.2/string" 2 3 > > ># 1 "/usr/include/c++/4.8.2/bits/localefwd.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/localefwd.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/localefwd.h" 3 > > ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h" 1 3 ># 39 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h" 3 > ># 40 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h" 3 > ># 1 "/usr/include/c++/4.8.2/clocale" 1 3 ># 39 "/usr/include/c++/4.8.2/clocale" 3 > ># 40 "/usr/include/c++/4.8.2/clocale" 3 > > ># 1 "/usr/include/locale.h" 1 3 4 ># 29 "/usr/include/locale.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 30 "/usr/include/locale.h" 2 3 4 ># 1 "/usr/include/bits/locale.h" 1 3 4 ># 31 "/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; ># 121 "/usr/include/locale.h" 3 4 >}; > > > >extern char *setlocale (int __category, const char *__locale) throw (); > > >extern struct lconv *localeconv (void) throw (); > > ># 152 "/usr/include/locale.h" 3 4 >extern __locale_t newlocale (int __category_mask, const char *__locale, > __locale_t __base) throw (); ># 187 "/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++/4.8.2/clocale" 2 3 ># 51 "/usr/include/c++/4.8.2/clocale" 3 >namespace std >{ > using ::lconv; > using ::setlocale; > using ::localeconv; >} ># 42 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h" 2 3 > > > > > > >namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) >{ > > > extern "C" __typeof(uselocale) __uselocale; > > >} > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > typedef __locale_t __c_locale; > > > > > > 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++/4.8.2/x86_64-redhat-linux/bits/c++locale.h" 3 > __builtin_va_list __args; > __builtin_va_start(__args, __fmt); > > > const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); > > > > > __builtin_va_end(__args); > > > __gnu_cxx::__uselocale(__old); > > > > > > > > return __ret; > } > > >} ># 41 "/usr/include/c++/4.8.2/bits/localefwd.h" 2 3 ># 1 "/usr/include/c++/4.8.2/iosfwd" 1 3 ># 36 "/usr/include/c++/4.8.2/iosfwd" 3 > ># 37 "/usr/include/c++/4.8.2/iosfwd" 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 74 "/usr/include/c++/4.8.2/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; > > 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; > > > > >} ># 42 "/usr/include/c++/4.8.2/bits/localefwd.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cctype" 1 3 ># 39 "/usr/include/c++/4.8.2/cctype" 3 > ># 40 "/usr/include/c++/4.8.2/cctype" 3 > > ># 1 "/usr/include/ctype.h" 1 3 4 ># 27 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/bits/types.h" 1 3 4 ># 27 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 2 3 4 > > >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 long int __quad_t; >typedef unsigned long int __u_quad_t; ># 130 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 131 "/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 __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >typedef long int __intptr_t; > > >typedef unsigned int __socklen_t; ># 28 "/usr/include/ctype.h" 2 3 4 > >extern "C" { ># 40 "/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 ># 28 "/usr/include/bits/byteswap.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/bits/byteswap.h" 2 3 4 > > > > > > ># 1 "/usr/include/bits/byteswap-16.h" 1 3 4 ># 36 "/usr/include/bits/byteswap.h" 2 3 4 ># 44 "/usr/include/bits/byteswap.h" 3 4 >static __inline unsigned int >__bswap_32 (unsigned int __bsx) >{ > return __builtin_bswap32 (__bsx); >} ># 108 "/usr/include/bits/byteswap.h" 3 4 >static __inline __uint64_t >__bswap_64 (__uint64_t __bsx) >{ > return __builtin_bswap64 (__bsx); >} ># 61 "/usr/include/endian.h" 2 3 4 ># 41 "/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)) >}; ># 80 "/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__)); ># 105 "/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 (); ># 272 "/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 (); ># 348 "/usr/include/ctype.h" 3 4 >} ># 43 "/usr/include/c++/4.8.2/cctype" 2 3 ># 62 "/usr/include/c++/4.8.2/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++/4.8.2/bits/localefwd.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/4.8.2/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> > _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<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; > > template<typename _CharT> class numpunct; > template<typename _CharT> class numpunct_byname; > > > template<typename _CharT> > class collate; > template<typename _CharT> class > collate_byname; > > > class time_base; > 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; > > template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > > class money_get; > template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > > class money_put; > > template<typename _CharT, bool _Intl = false> > class moneypunct; > template<typename _CharT, bool _Intl = false> > class moneypunct_byname; > > > class messages_base; > template<typename _CharT> > class messages; > template<typename _CharT> > class messages_byname; > > >} ># 44 "/usr/include/c++/4.8.2/string" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/ostream_insert.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/ostream_insert.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/ostream_insert.h" 3 > > ># 1 "/usr/include/c++/4.8.2/bits/cxxabi_forced.h" 1 3 ># 34 "/usr/include/c++/4.8.2/bits/cxxabi_forced.h" 3 > ># 35 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/string" 2 3 > > > > > > > ># 1 "/usr/include/c++/4.8.2/bits/basic_string.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > ># 1 "/usr/include/c++/4.8.2/ext/atomicity.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/atomicity.h" 3 > ># 33 "/usr/include/c++/4.8.2/ext/atomicity.h" 3 > > ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr.h" 1 3 ># 30 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr.h" 3 >#pragma GCC visibility push(default) ># 148 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr.h" 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 1 3 ># 35 "/usr/include/c++/4.8.2/x86_64-redhat-linux/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-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 30 "/usr/include/sched.h" 2 3 4 > > > ># 1 "/usr/include/time.h" 1 3 4 ># 73 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; > > > ># 120 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > __syscall_slong_t tv_nsec; > }; ># 34 "/usr/include/sched.h" 2 3 4 > > >typedef __pid_t pid_t; > > > > > ># 1 "/usr/include/bits/sched.h" 1 3 4 ># 73 "/usr/include/bits/sched.h" 3 4 >struct sched_param > { > int __sched_priority; > }; > >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 setns (int __fd, int __nstype) throw (); > > > >} > > > > > > > >struct __sched_param > { > int __sched_priority; > }; ># 119 "/usr/include/bits/sched.h" 3 4 >typedef unsigned long int __cpu_mask; > > > > > > >typedef struct >{ > __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; >} cpu_set_t; ># 202 "/usr/include/bits/sched.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 (); > >} ># 43 "/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 (); ># 117 "/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 >extern "C" { > > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 38 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 30 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 88 "/usr/include/bits/time.h" 3 4 ># 1 "/usr/include/bits/timex.h" 1 3 4 ># 25 "/usr/include/bits/timex.h" 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; >}; ># 89 "/usr/include/bits/time.h" 2 3 4 > >extern "C" { > > >extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); > >} ># 42 "/usr/include/time.h" 2 3 4 ># 57 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; > > > ># 91 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 103 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 131 "/usr/include/time.h" 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; > > > > >}; > > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; > > >struct sigevent; ># 186 "/usr/include/time.h" 3 4 > > > >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 (); ># 319 "/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__)); ># 334 "/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))); ># 403 "/usr/include/time.h" 3 4 >extern int getdate_err; ># 412 "/usr/include/time.h" 3 4 >extern struct tm *getdate (const char *__string); ># 426 "/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 ># 21 "/usr/include/bits/pthreadtypes.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 22 "/usr/include/bits/pthreadtypes.h" 2 3 4 ># 60 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >union pthread_attr_t >{ > char __size[56]; > long int __align; >}; > >typedef union pthread_attr_t pthread_attr_t; > > > > > >typedef struct __pthread_internal_list >{ > struct __pthread_internal_list *__prev; > struct __pthread_internal_list *__next; >} __pthread_list_t; ># 90 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef union >{ > struct __pthread_mutex_s > { > int __lock; > unsigned int __count; > int __owner; > > unsigned int __nusers; > > > > int __kind; > > short __spins; > short __elision; > __pthread_list_t __list; ># 125 "/usr/include/bits/pthreadtypes.h" 3 4 > } __data; > char __size[40]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __futex; > __extension__ unsigned long long int __total_seq; > __extension__ unsigned long long int __wakeup_seq; > __extension__ unsigned long long int __woken_seq; > void *__mutex; > unsigned int __nwaiters; > unsigned int __broadcast_seq; > } __data; > char __size[48]; > __extension__ long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; > int __writer; > int __shared; > unsigned long int __pad1; > unsigned long int __pad2; > > > unsigned int __flags; > > } __data; ># 212 "/usr/include/bits/pthreadtypes.h" 3 4 > 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 >}; ># 116 "/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 >}; ># 157 "/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 > >}; ># 192 "/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 > >}; ># 230 "/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_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))); ># 488 "/usr/include/pthread.h" 3 4 >extern int pthread_once (pthread_once_t *__once_control, > void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); ># 500 "/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__)); ># 534 "/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); } >}; ># 736 "/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_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))); ># 800 "/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))); ># 882 "/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_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_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))); ># 994 "/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))); > > > > >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))); ># 1038 "/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))); ># 1105 "/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))); ># 1139 "/usr/include/pthread.h" 3 4 >extern int pthread_atfork (void (*__prepare) (void), > void (*__parent) (void), > void (*__child) (void)) throw (); > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () >{ > return __thread1 == __thread2; >} > > >} ># 36 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 2 3 ># 47 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 3 >typedef pthread_t __gthread_t; >typedef pthread_key_t __gthread_key_t; >typedef pthread_once_t __gthread_once_t; >typedef pthread_mutex_t __gthread_mutex_t; >typedef pthread_mutex_t __gthread_recursive_mutex_t; >typedef pthread_cond_t __gthread_cond_t; >typedef struct timespec __gthread_time_t; ># 101 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 3 >static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); >static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); >static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); > >static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); >static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); >static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); >static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); >static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); > >static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); > >static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); > >static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); >static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); > >static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); > >static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); >static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); >static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); > >static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"))); >static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); >static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); >static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); >static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); >static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); > >static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); >static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); >static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); >static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); >static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); ># 236 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 3 >static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"))); ># 246 "/usr/include/c++/4.8.2/x86_64-redhat-linux/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; >} ># 658 "/usr/include/c++/4.8.2/x86_64-redhat-linux/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; >} ># 807 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/gthr-default.h" 3 >static inline int >__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_lock (__mutex); >} > >static inline int >__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_trylock (__mutex); >} > > >static inline int >__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, > const __gthread_time_t *__abs_timeout) >{ > return __gthread_mutex_timedlock (__mutex, __abs_timeout); >} > > >static inline int >__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_unlock (__mutex); >} > >static inline int >__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) >{ > return __gthread_mutex_destroy (__mutex); >} ># 849 "/usr/include/c++/4.8.2/x86_64-redhat-linux/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++/4.8.2/x86_64-redhat-linux/bits/gthr.h" 2 3 > > >#pragma GCC visibility pop ># 36 "/usr/include/c++/4.8.2/ext/atomicity.h" 2 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/atomic_word.h" 1 3 ># 32 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/atomic_word.h" 3 >typedef int _Atomic_word; ># 37 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/bits/basic_string.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 111 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<typename _CharT, typename _Traits, typename _Alloc> > class basic_string > { > typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; > > > public: > typedef _Traits traits_type; > typedef typename _Traits::char_type value_type; > typedef _Alloc allocator_type; > typedef typename _CharT_alloc_type::size_type size_type; > typedef typename _CharT_alloc_type::difference_type difference_type; > typedef typename _CharT_alloc_type::reference reference; > typedef typename _CharT_alloc_type::const_reference const_reference; > typedef typename _CharT_alloc_type::pointer pointer; > typedef typename _CharT_alloc_type::const_pointer const_pointer; > typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; > typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> > const_iterator; > typedef std::reverse_iterator<const_iterator> const_reverse_iterator; > typedef std::reverse_iterator<iterator> reverse_iterator; > > private: ># 148 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > struct _Rep_base > { > size_type _M_length; > size_type _M_capacity; > _Atomic_word _M_refcount; > }; > > struct _Rep : _Rep_base > { > > typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; ># 173 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > static const size_type _S_max_size; > static const _CharT _S_terminal; > > > > static size_type _S_empty_rep_storage[]; > > static _Rep& > _S_empty_rep() > { > > > > void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); > return *reinterpret_cast<_Rep*>(__p); > } > > bool > _M_is_leaked() const > { return this->_M_refcount < 0; } > > bool > _M_is_shared() const > { return this->_M_refcount > 0; } > > void > _M_set_leaked() > { this->_M_refcount = -1; } > > void > _M_set_sharable() > { this->_M_refcount = 0; } > > void > _M_set_length_and_sharable(size_type __n) > { > > if (__builtin_expect(this != &_S_empty_rep(), false)) > > { > this->_M_set_sharable(); > this->_M_length = __n; > traits_type::assign(this->_M_refdata()[__n], _S_terminal); > > > } > } > > _CharT* > _M_refdata() throw() > { return reinterpret_cast<_CharT*>(this + 1); } > > _CharT* > _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) > { > return (!_M_is_leaked() && __alloc1 == __alloc2) > ? _M_refcopy() : _M_clone(__alloc1); > } > > > static _Rep* > _S_create(size_type, size_type, const _Alloc&); > > void > _M_dispose(const _Alloc& __a) > { > > if (__builtin_expect(this != &_S_empty_rep(), false)) > > { > > ; > if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, > -1) <= 0) > { > ; > _M_destroy(__a); > } > } > } > > void > _M_destroy(const _Alloc&) throw(); > > _CharT* > _M_refcopy() throw() > { > > if (__builtin_expect(this != &_S_empty_rep(), false)) > > __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); > return _M_refdata(); > } > > _CharT* > _M_clone(const _Alloc&, size_type __res = 0); > }; > > > struct _Alloc_hider : _Alloc > { > _Alloc_hider(_CharT* __dat, const _Alloc& __a) > : _Alloc(__a), _M_p(__dat) { } > > _CharT* _M_p; > }; > > public: > > > > > static const size_type npos = static_cast<size_type>(-1); > > private: > > mutable _Alloc_hider _M_dataplus; > > _CharT* > _M_data() const > { return _M_dataplus._M_p; } > > _CharT* > _M_data(_CharT* __p) > { return (_M_dataplus._M_p = __p); } > > _Rep* > _M_rep() const > { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } > > > > iterator > _M_ibegin() const > { return iterator(_M_data()); } > > iterator > _M_iend() const > { return iterator(_M_data() + this->size()); } > > void > _M_leak() > { > if (!_M_rep()->_M_is_leaked()) > _M_leak_hard(); > } > > size_type > _M_check(size_type __pos, const char* __s) const > { > if (__pos > this->size()) > __throw_out_of_range((__s)); > 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 > { > const bool __testoff = __off < this->size() - __pos; > return __testoff ? __off : this->size() - __pos; > } > > > bool > _M_disjunct(const _CharT* __s) const > { > return (less<const _CharT*>()(__s, _M_data()) > || less<const _CharT*>()(_M_data() + this->size(), __s)); > } > > > > static void > _M_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 > _M_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 > _M_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, ++__p) > traits_type::assign(*__p, *__k1); > } > > static void > _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) > { _S_copy_chars(__p, __k1.base(), __k2.base()); } > > static void > _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) > { _S_copy_chars(__p, __k1.base(), __k2.base()); } > > static void > _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) > { _M_copy(__p, __k1, __k2 - __k1); } > > static void > _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) > { _M_copy(__p, __k1, __k2 - __k1); } > > static int > _S_compare(size_type __n1, size_type __n2) > { > const difference_type __d = difference_type(__n1 - __n2); > > if (__d > __gnu_cxx::__numeric_traits<int>::__max) > return __gnu_cxx::__numeric_traits<int>::__max; > else if (__d < __gnu_cxx::__numeric_traits<int>::__min) > return __gnu_cxx::__numeric_traits<int>::__min; > else > return int(__d); > } > > void > _M_mutate(size_type __pos, size_type __len1, size_type __len2); > > void > _M_leak_hard(); > > static _Rep& > _S_empty_rep() > { return _Rep::_S_empty_rep(); } > > public: > > > > > > > > basic_string() > > : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } > > > > > > > > explicit > basic_string(const _Alloc& __a); > > > > > > > basic_string(const basic_string& __str); > > > > > > > basic_string(const basic_string& __str, size_type __pos, > size_type __n = npos); > > > > > > > > basic_string(const basic_string& __str, size_type __pos, > size_type __n, const _Alloc& __a); ># 483 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string(const _CharT* __s, size_type __n, > const _Alloc& __a = _Alloc()); > > > > > > basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); > > > > > > > basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); ># 507 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string(basic_string&& __str) noexcept > : _M_dataplus(__str._M_dataplus) > { > > __str._M_data(_S_empty_rep()._M_refdata()); > > > > } > > > > > > > basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()); ># 531 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<class _InputIterator> > basic_string(_InputIterator __beg, _InputIterator __end, > const _Alloc& __a = _Alloc()); > > > > > ~basic_string() noexcept > { _M_rep()->_M_dispose(this->get_allocator()); } > > > > > > basic_string& > operator=(const basic_string& __str) > { return this->assign(__str); } > > > > > > basic_string& > operator=(const _CharT* __s) > { return this->assign(__s); } ># 564 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > operator=(_CharT __c) > { > this->assign(1, __c); > return *this; > } ># 579 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > operator=(basic_string&& __str) > { > > this->swap(__str); > return *this; > } > > > > > > basic_string& > operator=(initializer_list<_CharT> __l) > { > this->assign(__l.begin(), __l.size()); > return *this; > } > > > > > > > > iterator > begin() noexcept > { > _M_leak(); > return iterator(_M_data()); > } > > > > > > const_iterator > begin() const noexcept > { return const_iterator(_M_data()); } > > > > > > iterator > end() noexcept > { > _M_leak(); > 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_rep()->_M_length; } > > > > size_type > length() const noexcept > { return _M_rep()->_M_length; } > > > size_type > max_size() const noexcept > { return _Rep::_S_max_size; } ># 739 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > resize(size_type __n, _CharT __c); ># 752 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > resize(size_type __n) > { this->resize(__n, _CharT()); } > > > > void > shrink_to_fit() > { > if (capacity() > size()) > { > try > { reserve(0); } > catch(...) > { } > } > } > > > > > > > size_type > capacity() const noexcept > { return _M_rep()->_M_capacity; } ># 796 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > reserve(size_type __res_arg = 0); > > > > > void > clear() noexcept > { _M_mutate(0, this->size(), 0); } > > > > > > bool > empty() const noexcept > { return this->size() == 0; } ># 825 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > const_reference > operator[] (size_type __pos) const > { > ; > return _M_data()[__pos]; > } ># 842 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > reference > operator[](size_type __pos) > { > > ; > > ; > _M_leak(); > return _M_data()[__pos]; > } ># 863 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > const_reference > at(size_type __n) const > { > if (__n >= this->size()) > __throw_out_of_range(("basic_string::at")); > return _M_data()[__n]; > } ># 882 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > reference > at(size_type __n) > { > if (__n >= size()) > __throw_out_of_range(("basic_string::at")); > _M_leak(); > return _M_data()[__n]; > } > > > > > > > reference > front() > { return operator[](0); } > > > > > > const_reference > front() const > { return operator[](0); } > > > > > > reference > back() > { return operator[](this->size() - 1); } > > > > > > const_reference > back() const > { return operator[](this->size() - 1); } ># 931 "/usr/include/c++/4.8.2/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()); } > > > > > > > > basic_string& > append(const basic_string& __str); ># 988 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > append(const basic_string& __str, size_type __pos, size_type __n); > > > > > > > > basic_string& > append(const _CharT* __s, size_type __n); > > > > > > > basic_string& > append(const _CharT* __s) > { > ; > return this->append(__s, traits_type::length(__s)); > } ># 1020 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > append(size_type __n, _CharT __c); > > > > > > > > basic_string& > append(initializer_list<_CharT> __l) > { return this->append(__l.begin(), __l.size()); } ># 1042 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<class _InputIterator> > basic_string& > append(_InputIterator __first, _InputIterator __last) > { return this->replace(_M_iend(), _M_iend(), __first, __last); } > > > > > > void > push_back(_CharT __c) > { > const size_type __len = 1 + this->size(); > if (__len > this->capacity() || _M_rep()->_M_is_shared()) > this->reserve(__len); > traits_type::assign(_M_data()[this->size()], __c); > _M_rep()->_M_set_length_and_sharable(__len); > } > > > > > > > basic_string& > assign(const basic_string& __str); ># 1078 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > assign(basic_string&& __str) > { > this->swap(__str); > return *this; > } ># 1099 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > assign(const basic_string& __str, size_type __pos, size_type __n) > { return this->assign(__str._M_data() > + __str._M_check(__pos, "basic_string::assign"), > __str._M_limit(__pos, __n)); } ># 1115 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > assign(const _CharT* __s, size_type __n); ># 1127 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > assign(const _CharT* __s) > { > ; > return this->assign(__s, traits_type::length(__s)); > } ># 1143 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > assign(size_type __n, _CharT __c) > { return _M_replace_aux(size_type(0), this->size(), __n, __c); } ># 1155 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<class _InputIterator> > basic_string& > assign(_InputIterator __first, _InputIterator __last) > { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } > > > > > > > > basic_string& > assign(initializer_list<_CharT> __l) > { return this->assign(__l.begin(), __l.size()); } ># 1184 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > insert(iterator __p, size_type __n, _CharT __c) > { this->replace(__p, __p, __n, __c); } ># 1200 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<class _InputIterator> > void > insert(iterator __p, _InputIterator __beg, _InputIterator __end) > { this->replace(__p, __p, __beg, __end); } ># 1212 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > insert(iterator __p, initializer_list<_CharT> __l) > { > ; > this->insert(__p - _M_ibegin(), __l.begin(), __l.size()); > } ># 1232 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > insert(size_type __pos1, const basic_string& __str) > { return this->insert(__pos1, __str, size_type(0), __str.size()); } ># 1254 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > insert(size_type __pos1, const basic_string& __str, > size_type __pos2, size_type __n) > { return this->insert(__pos1, __str._M_data() > + __str._M_check(__pos2, "basic_string::insert"), > __str._M_limit(__pos2, __n)); } ># 1277 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > insert(size_type __pos, const _CharT* __s, size_type __n); ># 1295 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > insert(size_type __pos, const _CharT* __s) > { > ; > return this->insert(__pos, __s, traits_type::length(__s)); > } ># 1318 "/usr/include/c++/4.8.2/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); } ># 1336 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > iterator > insert(iterator __p, _CharT __c) > { > ; > const size_type __pos = __p - _M_ibegin(); > _M_replace_aux(__pos, size_type(0), size_type(1), __c); > _M_rep()->_M_set_leaked(); > return iterator(_M_data() + __pos); > } ># 1361 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > erase(size_type __pos = 0, size_type __n = npos) > { > _M_mutate(_M_check(__pos, "basic_string::erase"), > _M_limit(__pos, __n), size_type(0)); > return *this; > } ># 1377 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > iterator > erase(iterator __position) > { > > ; > const size_type __pos = __position - _M_ibegin(); > _M_mutate(__pos, size_type(1), size_type(0)); > _M_rep()->_M_set_leaked(); > return iterator(_M_data() + __pos); > } ># 1397 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > iterator > erase(iterator __first, iterator __last); > > > > > > > > void > pop_back() > { erase(size()-1, 1); } ># 1428 "/usr/include/c++/4.8.2/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()); } ># 1450 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(size_type __pos1, size_type __n1, const basic_string& __str, > size_type __pos2, size_type __n2) > { return this->replace(__pos1, __n1, __str._M_data() > + __str._M_check(__pos2, "basic_string::replace"), > __str._M_limit(__pos2, __n2)); } ># 1475 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(size_type __pos, size_type __n1, const _CharT* __s, > size_type __n2); ># 1495 "/usr/include/c++/4.8.2/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)); > } ># 1519 "/usr/include/c++/4.8.2/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); } ># 1537 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(iterator __i1, iterator __i2, const basic_string& __str) > { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } ># 1556 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) > { > > ; > return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); > } ># 1577 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(iterator __i1, iterator __i2, const _CharT* __s) > { > ; > return this->replace(__i1, __i2, __s, traits_type::length(__s)); > } ># 1598 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& > replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) > { > > ; > return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); > } ># 1621 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > template<class _InputIterator> > basic_string& > replace(iterator __i1, iterator __i2, > _InputIterator __k1, _InputIterator __k2) > { > > ; > ; > typedef typename std::__is_integer<_InputIterator>::__type _Integral; > return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); > } > > > > basic_string& > replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) > { > > ; > ; > return this->replace(__i1 - _M_ibegin(), __i2 - __i1, > __k1, __k2 - __k1); > } > > basic_string& > replace(iterator __i1, iterator __i2, > const _CharT* __k1, const _CharT* __k2) > { > > ; > ; > return this->replace(__i1 - _M_ibegin(), __i2 - __i1, > __k1, __k2 - __k1); > } > > basic_string& > replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) > { > > ; > ; > return this->replace(__i1 - _M_ibegin(), __i2 - __i1, > __k1.base(), __k2 - __k1); > } > > basic_string& > replace(iterator __i1, iterator __i2, > const_iterator __k1, const_iterator __k2) > { > > ; > ; > return this->replace(__i1 - _M_ibegin(), __i2 - __i1, > __k1.base(), __k2 - __k1); > } ># 1692 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > basic_string& replace(iterator __i1, iterator __i2, > initializer_list<_CharT> __l) > { return this->replace(__i1, __i2, __l.begin(), __l.end()); } > > > private: > template<class _Integer> > basic_string& > _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, > _Integer __val, __true_type) > { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } > > template<class _InputIterator> > basic_string& > _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, > _InputIterator __k2, __false_type); > > basic_string& > _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, > _CharT __c); > > basic_string& > _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, > size_type __n2); > > > > template<class _InIterator> > static _CharT* > _S_construct_aux(_InIterator __beg, _InIterator __end, > const _Alloc& __a, __false_type) > { > typedef typename iterator_traits<_InIterator>::iterator_category _Tag; > return _S_construct(__beg, __end, __a, _Tag()); > } > > > > template<class _Integer> > static _CharT* > _S_construct_aux(_Integer __beg, _Integer __end, > const _Alloc& __a, __true_type) > { return _S_construct_aux_2(static_cast<size_type>(__beg), > __end, __a); } > > static _CharT* > _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) > { return _S_construct(__req, __c, __a); } > > template<class _InIterator> > static _CharT* > _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) > { > typedef typename std::__is_integer<_InIterator>::__type _Integral; > return _S_construct_aux(__beg, __end, __a, _Integral()); > } > > > template<class _InIterator> > static _CharT* > _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, > input_iterator_tag); > > > > template<class _FwdIterator> > static _CharT* > _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, > forward_iterator_tag); > > static _CharT* > _S_construct(size_type __req, _CharT __c, const _Alloc& __a); > > public: ># 1779 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > copy(_CharT* __s, size_type __n, size_type __pos = 0) const; ># 1789 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > void > swap(basic_string& __s); ># 1799 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > const _CharT* > c_str() const noexcept > { return _M_data(); } > > > > > > > > const _CharT* > data() const noexcept > { return _M_data(); } > > > > > allocator_type > get_allocator() const noexcept > { return _M_dataplus; } ># 1832 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find(const _CharT* __s, size_type __pos, size_type __n) const; ># 1845 "/usr/include/c++/4.8.2/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()); } ># 1860 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find(const _CharT* __s, size_type __pos = 0) const > { > ; > return this->find(__s, __pos, traits_type::length(__s)); > } ># 1877 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find(_CharT __c, size_type __pos = 0) const noexcept; ># 1890 "/usr/include/c++/4.8.2/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()); } ># 1907 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > rfind(const _CharT* __s, size_type __pos, size_type __n) const; ># 1920 "/usr/include/c++/4.8.2/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)); > } ># 1937 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > rfind(_CharT __c, size_type __pos = npos) const noexcept; ># 1951 "/usr/include/c++/4.8.2/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()); } ># 1968 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; ># 1981 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_of(const _CharT* __s, size_type __pos = 0) const > { > ; > return this->find_first_of(__s, __pos, traits_type::length(__s)); > } ># 2000 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_of(_CharT __c, size_type __pos = 0) const noexcept > { return this->find(__c, __pos); } ># 2015 "/usr/include/c++/4.8.2/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()); } ># 2032 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; ># 2045 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_of(const _CharT* __s, size_type __pos = npos) const > { > ; > return this->find_last_of(__s, __pos, traits_type::length(__s)); > } ># 2064 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_of(_CharT __c, size_type __pos = npos) const noexcept > { return this->rfind(__c, __pos); } ># 2078 "/usr/include/c++/4.8.2/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()); } ># 2095 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_not_of(const _CharT* __s, size_type __pos, > size_type __n) const; ># 2109 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_not_of(const _CharT* __s, size_type __pos = 0) const > { > ; > return this->find_first_not_of(__s, __pos, traits_type::length(__s)); > } ># 2126 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_first_not_of(_CharT __c, size_type __pos = 0) const > noexcept; ># 2141 "/usr/include/c++/4.8.2/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()); } ># 2158 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_not_of(const _CharT* __s, size_type __pos, > size_type __n) const; ># 2172 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_not_of(const _CharT* __s, size_type __pos = npos) const > { > ; > return this->find_last_not_of(__s, __pos, traits_type::length(__s)); > } ># 2189 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > size_type > find_last_not_of(_CharT __c, size_type __pos = npos) const > noexcept; ># 2205 "/usr/include/c++/4.8.2/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); } ># 2224 "/usr/include/c++/4.8.2/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; > } ># 2256 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > int > compare(size_type __pos, size_type __n, const basic_string& __str) const; ># 2282 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > int > compare(size_type __pos1, size_type __n1, const basic_string& __str, > size_type __pos2, size_type __n2) const; ># 2300 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > int > compare(const _CharT* __s) const; ># 2324 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > int > compare(size_type __pos, size_type __n1, const _CharT* __s) const; ># 2351 "/usr/include/c++/4.8.2/bits/basic_string.h" 3 > int > compare(size_type __pos, size_type __n1, const _CharT* __s, > size_type __n2) const; > }; ># 2363 "/usr/include/c++/4.8.2/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)); } ># 2484 "/usr/include/c++/4.8.2/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) > { 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) > { 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; } ># 2530 "/usr/include/c++/4.8.2/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) > { 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); } ># 2567 "/usr/include/c++/4.8.2/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) > { 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; } ># 2604 "/usr/include/c++/4.8.2/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) > { 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; } ># 2641 "/usr/include/c++/4.8.2/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) > { 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; } ># 2678 "/usr/include/c++/4.8.2/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) > { 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; } ># 2715 "/usr/include/c++/4.8.2/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) > { __lhs.swap(__rhs); } ># 2733 "/usr/include/c++/4.8.2/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); ># 2751 "/usr/include/c++/4.8.2/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()); > } ># 2774 "/usr/include/c++/4.8.2/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); ># 2791 "/usr/include/c++/4.8.2/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 getline(__is, __str, __is.widen('\n')); } > > 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++/4.8.2/ext/string_conversions.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/string_conversions.h" 3 > ># 33 "/usr/include/c++/4.8.2/ext/string_conversions.h" 3 ># 41 "/usr/include/c++/4.8.2/ext/string_conversions.h" 3 ># 1 "/usr/include/c++/4.8.2/cstdlib" 1 3 ># 39 "/usr/include/c++/4.8.2/cstdlib" 3 > ># 40 "/usr/include/c++/4.8.2/cstdlib" 3 ># 72 "/usr/include/c++/4.8.2/cstdlib" 3 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 32 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 2 3 4 > >extern "C" { > > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 42 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 66 "/usr/include/bits/waitstatus.h" 3 4 >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 43 "/usr/include/stdlib.h" 2 3 4 ># 95 "/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; > > ># 139 "/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))); > > > > > >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))); > ># 239 "/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))); > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) atoi (const char *__nptr) throw () >{ > return (int) strtol (__nptr, (char **) __null, 10); >} >extern __inline __attribute__ ((__gnu_inline__)) long int >__attribute__ ((__leaf__)) atol (const char *__nptr) throw () >{ > return strtol (__nptr, (char **) __null, 10); >} > > > > >__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int >__attribute__ ((__leaf__)) atoll (const char *__nptr) throw () >{ > return strtoll (__nptr, (char **) __null, 10); >} > ># 305 "/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; ># 104 "/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; ># 136 "/usr/include/sys/types.h" 3 4 >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 147 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 200 "/usr/include/sys/types.h" 3 4 >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 219 "/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/sigset.h" 1 3 4 ># 23 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 34 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 46 "/usr/include/sys/select.h" 2 3 4 ># 54 "/usr/include/sys/select.h" 3 4 >typedef long int __fd_mask; ># 64 "/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; ># 96 "/usr/include/sys/select.h" 3 4 >extern "C" { ># 106 "/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); ># 118 "/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); ># 131 "/usr/include/sys/select.h" 3 4 >} ># 220 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 29 "/usr/include/sys/sysmacros.h" 3 4 >extern "C" { > >__extension__ >extern unsigned int gnu_dev_major (unsigned long long int __dev) > throw () __attribute__ ((__const__)); >__extension__ >extern unsigned int gnu_dev_minor (unsigned long long int __dev) > throw () __attribute__ ((__const__)); >__extension__ >extern unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > throw () __attribute__ ((__const__)); > > >__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int >__attribute__ ((__leaf__)) gnu_dev_major (unsigned long long int __dev) throw () >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int >__attribute__ ((__leaf__)) gnu_dev_minor (unsigned long long int __dev) throw () >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int >__attribute__ ((__leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} > >} ># 223 "/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; ># 262 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt64_t; >typedef __fsblkcnt64_t fsblkcnt64_t; >typedef __fsfilcnt64_t fsfilcnt64_t; ># 273 "/usr/include/sys/types.h" 3 4 >} ># 315 "/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; > 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__)) ; > >extern void *calloc (size_t __nmemb, size_t __size) > throw () __attribute__ ((__malloc__)) ; > > > > > > > > > > >extern void *realloc (void *__ptr, size_t __size) > throw () __attribute__ ((__warn_unused_result__)); > >extern void free (void *__ptr) throw (); > > > > >extern void cfree (void *__ptr) throw (); > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 24 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 25 "/usr/include/alloca.h" 2 3 4 > >extern "C" { > > > > > >extern void *alloca (size_t __size) throw (); > > > > > >} ># 492 "/usr/include/stdlib.h" 2 3 4 > > > > > >extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; > > > > >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__, __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))); > > > > > > > > > >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 (); ># 605 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); ># 619 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 629 "/usr/include/stdlib.h" 3 4 >extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; ># 641 "/usr/include/stdlib.h" 3 4 >extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; ># 651 "/usr/include/stdlib.h" 3 4 >extern int mkstemps64 (char *__template, int __suffixlen) > __attribute__ ((__nonnull__ (1))) ; ># 662 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; ># 673 "/usr/include/stdlib.h" 3 4 >extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; ># 683 "/usr/include/stdlib.h" 3 4 >extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; ># 693 "/usr/include/stdlib.h" 3 4 >extern int mkostemps (char *__template, int __suffixlen, int __flags) > __attribute__ ((__nonnull__ (1))) ; ># 705 "/usr/include/stdlib.h" 3 4 >extern int mkostemps64 (char *__template, int __suffixlen, int __flags) > __attribute__ ((__nonnull__ (1))) ; > > > > > > > > > >extern int system (const char *__command) ; > > > > > > >extern char *canonicalize_file_name (const char *__name) > throw () __attribute__ ((__nonnull__ (1))) ; ># 733 "/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__)) ; > ># 807 "/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))) ; ># 895 "/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 void setkey (const char *__key) throw () __attribute__ ((__nonnull__ (1))); > > > > > > > >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))); > > ># 1 "/usr/include/bits/stdlib-float.h" 1 3 4 ># 24 "/usr/include/bits/stdlib-float.h" 3 4 > >extern __inline __attribute__ ((__gnu_inline__)) double >__attribute__ ((__leaf__)) atof (const char *__nptr) throw () >{ > return strtod (__nptr, (char **) __null); >} > ># 952 "/usr/include/stdlib.h" 2 3 4 ># 964 "/usr/include/stdlib.h" 3 4 >} ># 73 "/usr/include/c++/4.8.2/cstdlib" 2 3 ># 114 "/usr/include/c++/4.8.2/cstdlib" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > using ::div_t; > using ::ldiv_t; > > using ::abort; > using ::abs; > 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 long > abs(long __i) { return __builtin_labs(__i); } > > inline ldiv_t > div(long __i, long __j) { return ldiv(__i, __j); } > > > > inline long long > abs(long long __x) { return __builtin_llabs (__x); } > > > > > > > > >} ># 196 "/usr/include/c++/4.8.2/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; ># 228 "/usr/include/c++/4.8.2/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++/4.8.2/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cwchar" 1 3 ># 39 "/usr/include/c++/4.8.2/cwchar" 3 > ># 40 "/usr/include/c++/4.8.2/cwchar" 3 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 45 "/usr/include/c++/4.8.2/cwchar" 2 3 ># 43 "/usr/include/c++/4.8.2/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cstdio" 1 3 ># 39 "/usr/include/c++/4.8.2/cstdio" 3 > ># 40 "/usr/include/c++/4.8.2/cstdio" 3 > > ># 1 "/usr/include/stdio.h" 1 3 4 ># 29 "/usr/include/stdio.h" 3 4 >extern "C" { > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 34 "/usr/include/stdio.h" 2 3 4 ># 74 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 15 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 16 "/usr/include/_G_config.h" 2 3 4 > > > > ># 1 "/usr/include/wchar.h" 1 3 4 ># 21 "/usr/include/_G_config.h" 2 3 4 >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 33 "/usr/include/libio.h" 2 3 4 ># 50 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h" 1 3 4 ># 51 "/usr/include/libio.h" 2 3 4 ># 145 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 155 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 178 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 246 "/usr/include/libio.h" 3 4 >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; ># 294 "/usr/include/libio.h" 3 4 > __off64_t _offset; ># 303 "/usr/include/libio.h" 3 4 > void *__pad1; > void *__pad2; > void *__pad3; > void *__pad4; > size_t __pad5; > > int _mode; > > char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; > >}; > > > > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 339 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); > > > > >typedef __io_read_fn cookie_read_function_t; >typedef __io_write_fn cookie_write_function_t; >typedef __io_seek_fn cookie_seek_function_t; >typedef __io_close_fn cookie_close_function_t; > > >typedef struct >{ > __io_read_fn *read; > __io_write_fn *write; > __io_seek_fn *seek; > __io_close_fn *close; >} _IO_cookie_io_functions_t; >typedef _IO_cookie_io_functions_t cookie_io_functions_t; > >struct _IO_cookie_file; > > >extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, > void *__cookie, _IO_cookie_io_functions_t __fns); > > > > >extern "C" { > > >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); ># 435 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp); >extern int _IO_putc (int __c, _IO_FILE *__fp); >extern int _IO_feof (_IO_FILE *__fp) throw (); >extern int _IO_ferror (_IO_FILE *__fp) throw (); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) throw (); >extern void _IO_funlockfile (_IO_FILE *) throw (); >extern int _IO_ftrylockfile (_IO_FILE *) throw (); ># 465 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict); >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list); >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); > >extern void _IO_free_backup_area (_IO_FILE *) throw (); ># 527 "/usr/include/libio.h" 3 4 >} ># 75 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 108 "/usr/include/stdio.h" 3 4 > > >typedef _G_fpos_t fpos_t; > > > > > >typedef _G_fpos64_t fpos64_t; ># 164 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 165 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_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 (); > > > > > > > > >extern FILE *tmpfile (void) ; ># 205 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile64 (void) ; > > > >extern char *tmpnam (char *__s) throw () ; > > > > > >extern char *tmpnam_r (char *__s) throw () ; ># 227 "/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); > ># 252 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 262 "/usr/include/stdio.h" 3 4 >extern int fcloseall (void); > > > > > > > > > >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) ; ># 295 "/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, > _IO_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 (); ># 463 "/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))); ># 522 "/usr/include/stdio.h" 3 4 > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 550 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 561 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); > > > > > > > > > > > >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); > ># 594 "/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) > ; ># 638 "/usr/include/stdio.h" 3 4 >extern char *gets (char *__s) __attribute__ ((__deprecated__)); > > ># 649 "/usr/include/stdio.h" 3 4 >extern char *fgets_unlocked (char *__restrict __s, int __n, > FILE *__restrict __stream) ; ># 665 "/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); > ># 726 "/usr/include/stdio.h" 3 4 >extern int fputs_unlocked (const char *__restrict __s, > FILE *__restrict __stream); ># 737 "/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); > ># 773 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream) ; ># 792 "/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); ># 815 "/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[]; ># 854 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) throw () ; > > > > >extern int fileno_unlocked (FILE *__stream) throw () ; ># 873 "/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 (); ># 934 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio.h" 1 3 4 ># 35 "/usr/include/bits/stdio.h" 3 4 >extern __inline __attribute__ ((__gnu_inline__)) int >vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) >{ > return vfprintf (stdout, __fmt, __arg); >} > > > >extern __inline __attribute__ ((__gnu_inline__)) int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >fgetc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >getchar_unlocked (void) >{ > return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >putchar_unlocked (int __c) >{ > return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) __ssize_t >getline (char **__lineptr, size_t *__n, FILE *__stream) >{ > return __getdelim (__lineptr, __n, '\n', __stream); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) throw () >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) throw () >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 935 "/usr/include/stdio.h" 2 3 4 ># 943 "/usr/include/stdio.h" 3 4 >} ># 43 "/usr/include/c++/4.8.2/cstdio" 2 3 ># 94 "/usr/include/c++/4.8.2/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 ::gets; > 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; >} ># 150 "/usr/include/c++/4.8.2/cstdio" 3 >namespace __gnu_cxx >{ ># 168 "/usr/include/c++/4.8.2/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++/4.8.2/ext/string_conversions.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cerrno" 1 3 ># 39 "/usr/include/c++/4.8.2/cerrno" 3 > ># 40 "/usr/include/c++/4.8.2/cerrno" 3 > ># 1 "/usr/include/errno.h" 1 3 4 ># 31 "/usr/include/errno.h" 3 4 >extern "C" { > > > ># 1 "/usr/include/bits/errno.h" 1 3 4 ># 24 "/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 ># 5 "/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 ># 25 "/usr/include/bits/errno.h" 2 3 4 ># 50 "/usr/include/bits/errno.h" 3 4 >extern int *__errno_location (void) throw () __attribute__ ((__const__)); ># 36 "/usr/include/errno.h" 2 3 4 ># 54 "/usr/include/errno.h" 3 4 >extern char *program_invocation_name, *program_invocation_short_name; > > > >} ># 68 "/usr/include/errno.h" 3 4 >typedef int error_t; ># 42 "/usr/include/c++/4.8.2/cerrno" 2 3 ># 45 "/usr/include/c++/4.8.2/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; > (*__errno_location ()) = 0; > const _TRet __tmp = __convf(__str, &__endptr, __base...); > > if (__endptr == __str) > std::__throw_invalid_argument(__name); > else if ((*__errno_location ()) == 34 > || (std::__are_same<_Ret, int>::__value > && (__tmp < __numeric_traits<int>::__min > || __tmp > __numeric_traits<int>::__max))) > 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); > } > > >} ># 2816 "/usr/include/c++/4.8.2/bits/basic_string.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > 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); > } > > > >} > > > > > > > >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 > { }; > > > > > > 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 > { }; > > > >} ># 53 "/usr/include/c++/4.8.2/string" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/basic_string.tcc" 1 3 ># 40 "/usr/include/c++/4.8.2/bits/basic_string.tcc" 3 > ># 41 "/usr/include/c++/4.8.2/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>:: > _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; > > template<typename _CharT, typename _Traits, typename _Alloc> > const _CharT > basic_string<_CharT, _Traits, _Alloc>:: > _Rep::_S_terminal = _CharT(); > > template<typename _CharT, typename _Traits, typename _Alloc> > const typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>::npos; > > > > template<typename _CharT, typename _Traits, typename _Alloc> > typename basic_string<_CharT, _Traits, _Alloc>::size_type > basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ > (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / > sizeof(size_type)]; > > > > > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InIterator> > _CharT* > basic_string<_CharT, _Traits, _Alloc>:: > _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, > input_iterator_tag) > { > > if (__beg == __end && __a == _Alloc()) > return _S_empty_rep()._M_refdata(); > > > _CharT __buf[128]; > size_type __len = 0; > while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) > { > __buf[__len++] = *__beg; > ++__beg; > } > _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); > _M_copy(__r->_M_refdata(), __buf, __len); > try > { > while (__beg != __end) > { > if (__len == __r->_M_capacity) > { > > _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); > _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); > __r->_M_destroy(__a); > __r = __another; > } > __r->_M_refdata()[__len++] = *__beg; > ++__beg; > } > } > catch(...) > { > __r->_M_destroy(__a); > throw; > } > __r->_M_set_length_and_sharable(__len); > return __r->_M_refdata(); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > template <typename _InIterator> > _CharT* > basic_string<_CharT, _Traits, _Alloc>:: > _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, > forward_iterator_tag) > { > > if (__beg == __end && __a == _Alloc()) > return _S_empty_rep()._M_refdata(); > > > if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) > __throw_logic_error(("basic_string::_S_construct null not valid")); > > const size_type __dnew = static_cast<size_type>(std::distance(__beg, > __end)); > > _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); > try > { _S_copy_chars(__r->_M_refdata(), __beg, __end); } > catch(...) > { > __r->_M_destroy(__a); > throw; > } > __r->_M_set_length_and_sharable(__dnew); > return __r->_M_refdata(); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > _CharT* > basic_string<_CharT, _Traits, _Alloc>:: > _S_construct(size_type __n, _CharT __c, const _Alloc& __a) > { > > if (__n == 0 && __a == _Alloc()) > return _S_empty_rep()._M_refdata(); > > > _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); > if (__n) > _M_assign(__r->_M_refdata(), __n, __c); > > __r->_M_set_length_and_sharable(__n); > return __r->_M_refdata(); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const basic_string& __str) > : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), > __str.get_allocator()), > __str.get_allocator()) > { } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const _Alloc& __a) > : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) > { } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const basic_string& __str, size_type __pos, size_type __n) > : _M_dataplus(_S_construct(__str._M_data() > + __str._M_check(__pos, > "basic_string::basic_string"), > __str._M_data() + __str._M_limit(__pos, __n) > + __pos, _Alloc()), _Alloc()) > { } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const basic_string& __str, size_type __pos, > size_type __n, const _Alloc& __a) > : _M_dataplus(_S_construct(__str._M_data() > + __str._M_check(__pos, > "basic_string::basic_string"), > __str._M_data() + __str._M_limit(__pos, __n) > + __pos, __a), __a) > { } > > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) > : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) > { } > > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(const _CharT* __s, const _Alloc& __a) > : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : > __s + npos, __a), __a) > { } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(size_type __n, _CharT __c, const _Alloc& __a) > : _M_dataplus(_S_construct(__n, __c, __a), __a) > { } > > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InputIterator> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) > : _M_dataplus(_S_construct(__beg, __end, __a), __a) > { } > > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>:: > basic_string(initializer_list<_CharT> __l, const _Alloc& __a) > : _M_dataplus(_S_construct(__l.begin(), __l.end(), __a), __a) > { } > > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > assign(const basic_string& __str) > { > if (_M_rep() != __str._M_rep()) > { > > const allocator_type __a = this->get_allocator(); > _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); > _M_rep()->_M_dispose(__a); > _M_data(__tmp); > } > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > assign(const _CharT* __s, size_type __n) > { > ; > _M_check_length(this->size(), __n, "basic_string::assign"); > if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) > return _M_replace_safe(size_type(0), this->size(), __s, __n); > else > { > > const size_type __pos = __s - _M_data(); > if (__pos >= __n) > _M_copy(_M_data(), __s, __n); > else if (__pos) > _M_move(_M_data(), __s, __n); > _M_rep()->_M_set_length_and_sharable(__n); > return *this; > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > append(size_type __n, _CharT __c) > { > if (__n) > { > _M_check_length(size_type(0), __n, "basic_string::append"); > const size_type __len = __n + this->size(); > if (__len > this->capacity() || _M_rep()->_M_is_shared()) > this->reserve(__len); > _M_assign(_M_data() + this->size(), __n, __c); > _M_rep()->_M_set_length_and_sharable(__len); > } > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > append(const _CharT* __s, size_type __n) > { > ; > if (__n) > { > _M_check_length(size_type(0), __n, "basic_string::append"); > const size_type __len = __n + this->size(); > if (__len > this->capacity() || _M_rep()->_M_is_shared()) > { > if (_M_disjunct(__s)) > this->reserve(__len); > else > { > const size_type __off = __s - _M_data(); > this->reserve(__len); > __s = _M_data() + __off; > } > } > _M_copy(_M_data() + this->size(), __s, __n); > _M_rep()->_M_set_length_and_sharable(__len); > } > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > append(const basic_string& __str) > { > const size_type __size = __str.size(); > if (__size) > { > const size_type __len = __size + this->size(); > if (__len > this->capacity() || _M_rep()->_M_is_shared()) > this->reserve(__len); > _M_copy(_M_data() + this->size(), __str._M_data(), __size); > _M_rep()->_M_set_length_and_sharable(__len); > } > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > append(const basic_string& __str, size_type __pos, size_type __n) > { > __str._M_check(__pos, "basic_string::append"); > __n = __str._M_limit(__pos, __n); > if (__n) > { > const size_type __len = __n + this->size(); > if (__len > this->capacity() || _M_rep()->_M_is_shared()) > this->reserve(__len); > _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); > _M_rep()->_M_set_length_and_sharable(__len); > } > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > insert(size_type __pos, const _CharT* __s, size_type __n) > { > ; > _M_check(__pos, "basic_string::insert"); > _M_check_length(size_type(0), __n, "basic_string::insert"); > if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) > return _M_replace_safe(__pos, size_type(0), __s, __n); > else > { > > const size_type __off = __s - _M_data(); > _M_mutate(__pos, 0, __n); > __s = _M_data() + __off; > _CharT* __p = _M_data() + __pos; > if (__s + __n <= __p) > _M_copy(__p, __s, __n); > else if (__s >= __p) > _M_copy(__p, __s + __n, __n); > else > { > const size_type __nleft = __p - __s; > _M_copy(__p, __s, __nleft); > _M_copy(__p + __nleft, __p + __n, __n - __nleft); > } > return *this; > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > typename basic_string<_CharT, _Traits, _Alloc>::iterator > basic_string<_CharT, _Traits, _Alloc>:: > erase(iterator __first, iterator __last) > { > > ; > > > > > const size_type __size = __last - __first; > if (__size) > { > const size_type __pos = __first - _M_ibegin(); > _M_mutate(__pos, __size, size_type(0)); > _M_rep()->_M_set_leaked(); > return iterator(_M_data() + __pos); > } > else > return __first; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > replace(size_type __pos, size_type __n1, const _CharT* __s, > size_type __n2) > { > ; > _M_check(__pos, "basic_string::replace"); > __n1 = _M_limit(__pos, __n1); > _M_check_length(__n1, __n2, "basic_string::replace"); > bool __left; > if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) > return _M_replace_safe(__pos, __n1, __s, __n2); > else if ((__left = __s + __n2 <= _M_data() + __pos) > || _M_data() + __pos + __n1 <= __s) > { > > size_type __off = __s - _M_data(); > __left ? __off : (__off += __n2 - __n1); > _M_mutate(__pos, __n1, __n2); > _M_copy(_M_data() + __pos, _M_data() + __off, __n2); > return *this; > } > else > { > > const basic_string __tmp(__s, __n2); > return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>::_Rep:: > _M_destroy(const _Alloc& __a) throw () > { > const size_type __size = sizeof(_Rep_base) + > (this->_M_capacity + 1) * sizeof(_CharT); > _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_leak_hard() > { > > if (_M_rep() == &_S_empty_rep()) > return; > > if (_M_rep()->_M_is_shared()) > _M_mutate(0, 0, 0); > _M_rep()->_M_set_leaked(); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>:: > _M_mutate(size_type __pos, size_type __len1, size_type __len2) > { > const size_type __old_size = this->size(); > const size_type __new_size = __old_size + __len2 - __len1; > const size_type __how_much = __old_size - __pos - __len1; > > if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) > { > > const allocator_type __a = get_allocator(); > _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); > > if (__pos) > _M_copy(__r->_M_refdata(), _M_data(), __pos); > if (__how_much) > _M_copy(__r->_M_refdata() + __pos + __len2, > _M_data() + __pos + __len1, __how_much); > > _M_rep()->_M_dispose(__a); > _M_data(__r->_M_refdata()); > } > else if (__how_much && __len1 != __len2) > { > > _M_move(_M_data() + __pos + __len2, > _M_data() + __pos + __len1, __how_much); > } > _M_rep()->_M_set_length_and_sharable(__new_size); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>:: > reserve(size_type __res) > { > if (__res != this->capacity() || _M_rep()->_M_is_shared()) > { > > if (__res < this->size()) > __res = this->size(); > const allocator_type __a = get_allocator(); > _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); > _M_rep()->_M_dispose(__a); > _M_data(__tmp); > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>:: > swap(basic_string& __s) > { > if (_M_rep()->_M_is_leaked()) > _M_rep()->_M_set_sharable(); > if (__s._M_rep()->_M_is_leaked()) > __s._M_rep()->_M_set_sharable(); > if (this->get_allocator() == __s.get_allocator()) > { > _CharT* __tmp = _M_data(); > _M_data(__s._M_data()); > __s._M_data(__tmp); > } > > else > { > const basic_string __tmp1(_M_ibegin(), _M_iend(), > __s.get_allocator()); > const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), > this->get_allocator()); > *this = __tmp2; > __s = __tmp1; > } > } > > template<typename _CharT, typename _Traits, typename _Alloc> > typename basic_string<_CharT, _Traits, _Alloc>::_Rep* > basic_string<_CharT, _Traits, _Alloc>::_Rep:: > _S_create(size_type __capacity, size_type __old_capacity, > const _Alloc& __alloc) > { > > > if (__capacity > _S_max_size) > __throw_length_error(("basic_string::_S_create")); ># 577 "/usr/include/c++/4.8.2/bits/basic_string.tcc" 3 > const size_type __pagesize = 4096; > const size_type __malloc_header_size = 4 * sizeof(void*); > > > > > > > > if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) > __capacity = 2 * __old_capacity; > > > > > size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); > > const size_type __adj_size = __size + __malloc_header_size; > if (__adj_size > __pagesize && __capacity > __old_capacity) > { > const size_type __extra = __pagesize - __adj_size % __pagesize; > __capacity += __extra / sizeof(_CharT); > > if (__capacity > _S_max_size) > __capacity = _S_max_size; > __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); > } > > > > void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); > _Rep *__p = new (__place) _Rep; > __p->_M_capacity = __capacity; > > > > > > > > __p->_M_set_sharable(); > return __p; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > _CharT* > basic_string<_CharT, _Traits, _Alloc>::_Rep:: > _M_clone(const _Alloc& __alloc, size_type __res) > { > > const size_type __requested_cap = this->_M_length + __res; > _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, > __alloc); > if (this->_M_length) > _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); > > __r->_M_set_length_and_sharable(this->_M_length); > return __r->_M_refdata(); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > void > basic_string<_CharT, _Traits, _Alloc>:: > resize(size_type __n, _CharT __c) > { > const size_type __size = this->size(); > _M_check_length(__size, __n, "basic_string::resize"); > if (__size < __n) > this->append(__n - __size, __c); > else if (__n < __size) > this->erase(__n); > > } > > template<typename _CharT, typename _Traits, typename _Alloc> > template<typename _InputIterator> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, > _InputIterator __k2, __false_type) > { > const basic_string __s(__k1, __k2); > const size_type __n1 = __i2 - __i1; > _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); > return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), > __s.size()); > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, > _CharT __c) > { > _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); > _M_mutate(__pos1, __n1, __n2); > if (__n2) > _M_assign(_M_data() + __pos1, __n2, __c); > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > basic_string<_CharT, _Traits, _Alloc>& > basic_string<_CharT, _Traits, _Alloc>:: > _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, > size_type __n2) > { > _M_mutate(__pos1, __n1, __n2); > if (__n2) > _M_copy(_M_data() + __pos1, __s, __n2); > return *this; > } > > template<typename _CharT, typename _Traits, typename _Alloc> > 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>:: > copy(_CharT* __s, size_type __n, size_type __pos) const > { > _M_check(__pos, "basic_string::copy"); > __n = _M_limit(__pos, __n); > ; > if (__n) > _M_copy(__s, _M_data() + __pos, __n); > > return __n; > } > > 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 > { > ; > const size_type __size = this->size(); > const _CharT* __data = _M_data(); > > if (__n == 0) > return __pos <= __size ? __pos : npos; > > if (__n <= __size) > { > for (; __pos <= __size - __n; ++__pos) > if (traits_type::eq(__data[__pos], __s[0]) > && traits_type::compare(__data + __pos + 1, > __s + 1, __n - 1) == 0) > 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(_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 > { > ; > 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 > { > ; > 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 > { > ; > 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 > { > ; > 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 > { > ; > 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 > { > ; > 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; > } > > > > > 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&); > > > > >} ># 54 "/usr/include/c++/4.8.2/string" 2 3 ># 40 "/usr/include/c++/4.8.2/stdexcept" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/4.8.2/stdexcept" 3 > class logic_error : public exception > { > string _M_msg; > > public: > > explicit > logic_error(const string& __arg); > > virtual ~logic_error() noexcept; > > > > virtual const char* > what() const noexcept; > }; > > > > class domain_error : public logic_error > { > public: > explicit domain_error(const string& __arg); > virtual ~domain_error() noexcept; > }; > > > class invalid_argument : public logic_error > { > public: > explicit invalid_argument(const string& __arg); > virtual ~invalid_argument() noexcept; > }; > > > > class length_error : public logic_error > { > public: > explicit length_error(const string& __arg); > virtual ~length_error() noexcept; > }; > > > > class out_of_range : public logic_error > { > public: > explicit out_of_range(const string& __arg); > virtual ~out_of_range() noexcept; > }; > > > > > > > class runtime_error : public exception > { > string _M_msg; > > public: > > explicit > runtime_error(const string& __arg); > > virtual ~runtime_error() noexcept; > > > > virtual const char* > what() const noexcept; > }; > > > class range_error : public runtime_error > { > public: > explicit range_error(const string& __arg); > virtual ~range_error() noexcept; > }; > > > class overflow_error : public runtime_error > { > public: > explicit overflow_error(const string& __arg); > virtual ~overflow_error() noexcept; > }; > > > class underflow_error : public runtime_error > { > public: > explicit underflow_error(const string& __arg); > virtual ~underflow_error() noexcept; > }; > > > > >} ># 39 "/usr/include/c++/4.8.2/array" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Tp, std::size_t _Nm> > struct __array_traits > { > typedef _Tp _Type[_Nm]; > > static constexpr _Tp& > _S_ref(const _Type& __t, std::size_t __n) noexcept > { return const_cast<_Tp&>(__t[__n]); } > }; > > template<typename _Tp> > struct __array_traits<_Tp, 0> > { > struct _Type { }; > > static constexpr _Tp& > _S_ref(const _Type&, std::size_t) noexcept > { return *static_cast<_Tp*>(nullptr); } > }; ># 80 "/usr/include/c++/4.8.2/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(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) > { 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) > { 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(("array::at")); > 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(("array::at")), > _AT_Type::_S_ref(_M_elems, 0)); > } > > reference > front() > { return *begin(); } > > constexpr const_reference > front() const > { return _AT_Type::_S_ref(_M_elems, 0); } > > reference > back() > { return _Nm ? *(end() - 1) : *end(); } > > constexpr const_reference > back() const > { > return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) > : _AT_Type::_S_ref(_M_elems, 0); > } > > pointer > data() noexcept > { return std::__addressof(_AT_Type::_S_ref(_M_elems, 0)); } > > const_pointer > data() const noexcept > { return std::__addressof(_AT_Type::_S_ref(_M_elems, 0)); } > }; > > > 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 void > swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) > noexcept(noexcept(__one.swap(__two))) > { __one.swap(__two); } > > template<std::size_t _Int, typename _Tp, std::size_t _Nm> > constexpr _Tp& > get(array<_Tp, _Nm>& __arr) noexcept > { > static_assert(_Int < _Nm, "index is out of 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, "index is out of bounds"); > return std::move(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, "index is out of bounds"); > return std::__array_traits<_Tp, _Nm>:: > _S_ref(__arr._M_elems, _Int); > } > > >} > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > template<typename _Tp> > class 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> > class 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; > }; > > >} ># 40 "/usr/include/c++/4.8.2/tuple" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/uses_allocator.h" 1 3 ># 34 "/usr/include/c++/4.8.2/bits/uses_allocator.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > struct allocator_arg_t { }; > > constexpr allocator_arg_t allocator_arg = allocator_arg_t(); > >template<typename _Tp> class __has_allocator_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::allocator_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_allocator_type : integral_constant<bool, __has_allocator_type_helper <typename remove_cv<_Tp>::type>::value> { }; > > template<typename _Tp, typename _Alloc, > bool = __has_allocator_type<_Tp>::value> > struct __uses_allocator_helper > : public false_type { }; > > template<typename _Tp, typename _Alloc> > struct __uses_allocator_helper<_Tp, _Alloc, true> > : public integral_constant<bool, is_convertible<_Alloc, > typename _Tp::allocator_type>::value> > { }; > > > template<typename _Tp, typename _Alloc> > struct uses_allocator > : public integral_constant<bool, > __uses_allocator_helper<_Tp, _Alloc>::value> > { }; > > template<typename _Tp, typename _Alloc, typename... _Args> > struct __uses_allocator_arg > : is_constructible<_Tp, _Alloc, _Args...> > { static_assert( uses_allocator<_Tp, _Alloc>::value, "uses allocator" ); }; > > struct __uses_alloc_base { }; > struct __uses_alloc0 : __uses_alloc_base > { struct _Anything { _Anything(...) { } } _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 _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, _Alloc, _Args...>::value, > __uses_alloc1<_Alloc>, > __uses_alloc2<_Alloc>>::type > { }; > > template<typename _Tp, typename _Alloc, typename... _Args> > struct __uses_alloc<false, _Tp, _Alloc, _Args...> > : __uses_alloc0 { }; > > template<typename _Tp, typename _Alloc, typename... _Args> > struct __uses_alloc_impl > : __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...> > { }; > > template<typename _Tp, typename _Alloc, typename... _Args> > __uses_alloc_impl<_Tp, _Alloc, _Args...> > __use_alloc(const _Alloc& __a) > { > __uses_alloc_impl<_Tp, _Alloc, _Args...> __ret; > __ret._M_a = &__a; > return __ret; > } > > >} ># 41 "/usr/include/c++/4.8.2/tuple" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > template<typename _Tp> > struct __add_c_ref > { typedef const _Tp& type; }; > > template<typename _Tp> > struct __add_c_ref<_Tp&> > { typedef _Tp& type; }; > > > template<typename _Tp> > struct __add_ref > { typedef _Tp& type; }; > > template<typename _Tp> > struct __add_ref<_Tp&> > { typedef _Tp& type; }; > > > template<typename _Tp> > struct __add_r_ref > { typedef _Tp&& type; }; > > template<typename _Tp> > struct __add_r_ref<_Tp&> > { typedef _Tp& type; }; > > template<std::size_t _Idx, typename _Head, bool _IsEmptyNotFinal> > 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; > }; ># 185 "/usr/include/c++/4.8.2/tuple" 3 > template<std::size_t _Idx, typename... _Elements> > struct _Tuple_impl; > > > > > > template<std::size_t _Idx> > struct _Tuple_impl<_Idx> > { > template<std::size_t, typename...> friend class _Tuple_impl; > > _Tuple_impl() = default; > > template<typename _Alloc> > _Tuple_impl(allocator_arg_t, const _Alloc&) { } > > template<typename _Alloc> > _Tuple_impl(allocator_arg_t, const _Alloc&, const _Tuple_impl&) { } > > template<typename _Alloc> > _Tuple_impl(allocator_arg_t, const _Alloc&, _Tuple_impl&&) { } > > protected: > void _M_swap(_Tuple_impl&) noexcept { } > }; > > 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, typename... _Tail> > struct _Tuple_impl<_Idx, _Head, _Tail...> > : public _Tuple_impl<_Idx + 1, _Tail...>, > private _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> > { > template<std::size_t, typename...> friend class _Tuple_impl; > > typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; > typedef _Head_base<_Idx, _Head, __empty_not_final<_Head>::value> _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; > > 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))) { } > > _Tuple_impl& > operator=(const _Tuple_impl& __in) > { > _M_head(*this) = _M_head(__in); > _M_tail(*this) = _M_tail(__in); > return *this; > } > > _Tuple_impl& > operator=(_Tuple_impl&& __in) > noexcept(__and_<is_nothrow_move_assignable<_Head>, > is_nothrow_move_assignable<_Inherited>>::value) > { > _M_head(*this) = std::forward<_Head>(_M_head(__in)); > _M_tail(*this) = std::move(_M_tail(__in)); > return *this; > } > > template<typename... _UElements> > _Tuple_impl& > operator=(const _Tuple_impl<_Idx, _UElements...>& __in) > { > _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); > _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in); > return *this; > } > > template<typename _UHead, typename... _UTails> > _Tuple_impl& > operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) > { > _M_head(*this) = std::forward<_UHead> > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); > _M_tail(*this) = std::move > (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)); > return *this; > } > > protected: > void > _M_swap(_Tuple_impl& __in) > noexcept(noexcept(swap(std::declval<_Head&>(), > std::declval<_Head&>())) > && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) > { > using std::swap; > swap(_M_head(*this), _M_head(__in)); > _Inherited::_M_swap(_M_tail(__in)); > } > }; > > > template<typename... _Elements> > class tuple : public _Tuple_impl<0, _Elements...> > { > typedef _Tuple_impl<0, _Elements...> _Inherited; > > public: > constexpr tuple() > : _Inherited() { } > > explicit > constexpr tuple(const _Elements&... __elements) > : _Inherited(__elements...) { } > > template<typename... _UElements, typename = typename > enable_if<__and_<is_convertible<_UElements, > _Elements>...>::value>::type> > explicit > constexpr tuple(_UElements&&... __elements) > : _Inherited(std::forward<_UElements>(__elements)...) { } > > constexpr tuple(const tuple&) = default; > > constexpr tuple(tuple&&) = default; > > template<typename... _UElements, typename = typename > enable_if<__and_<is_convertible<const _UElements&, > _Elements>...>::value>::type> > constexpr tuple(const tuple<_UElements...>& __in) > : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > template<typename... _UElements, typename = typename > enable_if<__and_<is_convertible<_UElements, > _Elements>...>::value>::type> > 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> > tuple(allocator_arg_t __tag, const _Alloc& __a, > const _Elements&... __elements) > : _Inherited(__tag, __a, __elements...) { } > > template<typename _Alloc, typename... _UElements, typename = typename > enable_if<sizeof...(_UElements) > == sizeof...(_Elements)>::type> > tuple(allocator_arg_t __tag, const _Alloc& __a, > _UElements&&... __elements) > : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) > { } > > template<typename _Alloc> > tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) > : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } > > template<typename _Alloc> > tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) > : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } > > template<typename _Alloc, typename... _UElements, typename = typename > enable_if<sizeof...(_UElements) > == sizeof...(_Elements)>::type> > tuple(allocator_arg_t __tag, const _Alloc& __a, > const tuple<_UElements...>& __in) > : _Inherited(__tag, __a, > static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) > { } > > template<typename _Alloc, typename... _UElements, typename = typename > enable_if<sizeof...(_UElements) > == sizeof...(_Elements)>::type> > tuple(allocator_arg_t __tag, const _Alloc& __a, > tuple<_UElements...>&& __in) > : _Inherited(__tag, __a, > static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) > { } > > tuple& > operator=(const tuple& __in) > { > static_cast<_Inherited&>(*this) = __in; > return *this; > } > > tuple& > operator=(tuple&& __in) > noexcept(is_nothrow_move_assignable<_Inherited>::value) > { > static_cast<_Inherited&>(*this) = std::move(__in); > return *this; > } > > template<typename... _UElements, typename = typename > enable_if<sizeof...(_UElements) > == sizeof...(_Elements)>::type> > tuple& > operator=(const tuple<_UElements...>& __in) > { > static_cast<_Inherited&>(*this) = __in; > return *this; > } > > template<typename... _UElements, typename = typename > enable_if<sizeof...(_UElements) > == sizeof...(_Elements)>::type> > tuple& > operator=(tuple<_UElements...>&& __in) > { > static_cast<_Inherited&>(*this) = std::move(__in); > return *this; > } > > void > swap(tuple& __in) > noexcept(noexcept(__in._M_swap(__in))) > { _Inherited::_M_swap(__in); } > }; > > > template<> > class tuple<> > { > public: > void swap(tuple&) noexcept { } > }; > > > > template<typename _T1, typename _T2> > class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> > { > typedef _Tuple_impl<0, _T1, _T2> _Inherited; > > public: > constexpr tuple() > : _Inherited() { } > > explicit > constexpr tuple(const _T1& __a1, const _T2& __a2) > : _Inherited(__a1, __a2) { } > > template<typename _U1, typename _U2, typename = typename > enable_if<__and_<is_convertible<_U1, _T1>, > is_convertible<_U2, _T2>>::value>::type> > 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 = typename > enable_if<__and_<is_convertible<const _U1&, _T1>, > is_convertible<const _U2&, _T2>>::value>::type> > constexpr tuple(const tuple<_U1, _U2>& __in) > : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } > > template<typename _U1, typename _U2, typename = typename > enable_if<__and_<is_convertible<_U1, _T1>, > is_convertible<_U2, _T2>>::value>::type> > constexpr tuple(tuple<_U1, _U2>&& __in) > : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } > > template<typename _U1, typename _U2, typename = typename > enable_if<__and_<is_convertible<const _U1&, _T1>, > is_convertible<const _U2&, _T2>>::value>::type> > constexpr tuple(const pair<_U1, _U2>& __in) > : _Inherited(__in.first, __in.second) { } > > template<typename _U1, typename _U2, typename = typename > enable_if<__and_<is_convertible<_U1, _T1>, > is_convertible<_U2, _T2>>::value>::type> > 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> > 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> > 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> > 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> > 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> > 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> > 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=(const tuple& __in) > { > static_cast<_Inherited&>(*this) = __in; > return *this; > } > > tuple& > operator=(tuple&& __in) > noexcept(is_nothrow_move_assignable<_Inherited>::value) > { > static_cast<_Inherited&>(*this) = std::move(__in); > return *this; > } > > template<typename _U1, typename _U2> > tuple& > operator=(const tuple<_U1, _U2>& __in) > { > static_cast<_Inherited&>(*this) = __in; > return *this; > } > > template<typename _U1, typename _U2> > tuple& > operator=(tuple<_U1, _U2>&& __in) > { > static_cast<_Inherited&>(*this) = std::move(__in); > return *this; > } > > template<typename _U1, typename _U2> > tuple& > operator=(const pair<_U1, _U2>& __in) > { > this->_M_head(*this) = __in.first; > this->_M_tail(*this)._M_head(*this) = __in.second; > return *this; > } > > template<typename _U1, typename _U2> > tuple& > operator=(pair<_U1, _U2>&& __in) > { > 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(noexcept(__in._M_swap(__in))) > { _Inherited::_M_swap(__in); } > }; > > > > template<std::size_t __i, typename _Tp> > struct tuple_element; > > > > > > 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<std::size_t __i, typename _Tp> > struct tuple_element<__i, const _Tp> > { > typedef typename > add_const<typename tuple_element<__i, _Tp>::type>::type type; > }; > > template<std::size_t __i, typename _Tp> > struct tuple_element<__i, volatile _Tp> > { > typedef typename > add_volatile<typename tuple_element<__i, _Tp>::type>::type type; > }; > > template<std::size_t __i, typename _Tp> > struct tuple_element<__i, const volatile _Tp> > { > typedef typename > add_cv<typename tuple_element<__i, _Tp>::type>::type type; > }; > > > template<typename _Tp> > struct tuple_size; > > template<typename _Tp> > struct tuple_size<const _Tp> > : public integral_constant< > typename remove_cv<decltype(tuple_size<_Tp>::value)>::type, > tuple_size<_Tp>::value> { }; > > template<typename _Tp> > struct tuple_size<volatile _Tp> > : public integral_constant< > typename remove_cv<decltype(tuple_size<_Tp>::value)>::type, > tuple_size<_Tp>::value> { }; > > template<typename _Tp> > struct tuple_size<const volatile _Tp> > : public integral_constant< > typename remove_cv<decltype(tuple_size<_Tp>::value)>::type, > tuple_size<_Tp>::value> { }; > > > template<typename... _Elements> > struct tuple_size<tuple<_Elements...>> > : public integral_constant<std::size_t, sizeof...(_Elements)> { }; > > template<std::size_t __i, typename _Head, typename... _Tail> > constexpr typename __add_ref<_Head>::type > __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 typename __add_c_ref<_Head>::type > __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 typename __add_ref< > typename tuple_element<__i, tuple<_Elements...>>::type > >::type > get(tuple<_Elements...>& __t) noexcept > { return std::__get_helper<__i>(__t); } > > template<std::size_t __i, typename... _Elements> > constexpr typename __add_c_ref< > typename tuple_element<__i, tuple<_Elements...>>::type > >::type > get(const tuple<_Elements...>& __t) noexcept > { return std::__get_helper<__i>(__t); } > > template<std::size_t __i, typename... _Elements> > constexpr typename __add_r_ref< > typename tuple_element<__i, tuple<_Elements...>>::type > >::type > get(tuple<_Elements...>&& __t) noexcept > { return std::forward<typename tuple_element<__i, > tuple<_Elements...>>::type&&>(get<__i>(__t)); } > > > template<std::size_t __check_equal_size, std::size_t __i, std::size_t __j, > typename _Tp, typename _Up> > struct __tuple_compare; > > template<std::size_t __i, std::size_t __j, typename _Tp, typename _Up> > struct __tuple_compare<0, __i, __j, _Tp, _Up> > { > static constexpr bool > __eq(const _Tp& __t, const _Up& __u) > { > return (get<__i>(__t) == get<__i>(__u) && > __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__eq(__t, __u)); > } > > static constexpr bool > __less(const _Tp& __t, const _Up& __u) > { > return ((get<__i>(__t) < get<__i>(__u)) > || !(get<__i>(__u) < get<__i>(__t)) && > __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__less(__t, __u)); > } > }; > > template<std::size_t __i, typename _Tp, typename _Up> > struct __tuple_compare<0, __i, __i, _Tp, _Up> > { > 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) > { > typedef tuple<_TElements...> _Tp; > typedef tuple<_UElements...> _Up; > return bool(__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value, > 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u)); > } > > template<typename... _TElements, typename... _UElements> > constexpr bool > operator<(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { > typedef tuple<_TElements...> _Tp; > typedef tuple<_UElements...> _Up; > return bool(__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value, > 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u)); > } > > template<typename... _TElements, typename... _UElements> > inline constexpr bool > operator!=(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return !(__t == __u); } > > template<typename... _TElements, typename... _UElements> > inline constexpr bool > operator>(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return __u < __t; } > > template<typename... _TElements, typename... _UElements> > inline constexpr bool > operator<=(const tuple<_TElements...>& __t, > const tuple<_UElements...>& __u) > { return !(__u < __t); } > > template<typename... _TElements, typename... _UElements> > inline 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> > tuple<_Elements&&...> > forward_as_tuple(_Elements&&... __args) noexcept > { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } > > template<typename> > struct __is_tuple_like_impl : false_type > { }; > > template<typename... _Tps> > struct __is_tuple_like_impl<tuple<_Tps...>> : true_type > { }; > > template<typename _T1, typename _T2> > struct __is_tuple_like_impl<pair<_T1, _T2>> : true_type > { }; > > template<typename _Tp, std::size_t _Nm> > struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type > { }; > > > template<typename _Tp> > struct __is_tuple_like > : public __is_tuple_like_impl<typename std::remove_cv > <typename std::remove_reference<_Tp>::type>::type>::type > { }; > > > > template<std::size_t... _Indexes> > struct _Index_tuple > { > typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next; > }; > > > template<std::size_t _Num> > struct _Build_index_tuple > { > typedef typename _Build_index_tuple<_Num - 1>::__type::__next __type; > }; > > template<> > struct _Build_index_tuple<0> > { > typedef _Index_tuple<> __type; > }; > > template<std::size_t, typename, typename, std::size_t> > struct __make_tuple_impl; > > template<std::size_t _Idx, typename _Tuple, typename... _Tp, > std::size_t _Nm> > struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> > { > typedef typename __make_tuple_impl<_Idx + 1, tuple<_Tp..., > typename std::tuple_element<_Idx, _Tuple>::type>, _Tuple, _Nm>::__type > __type; > }; > > 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 > : public __make_tuple_impl<0, tuple<>, _Tuple, > std::tuple_size<_Tuple>::value> > { }; > > > template<typename _Tuple> > struct __make_tuple > : public __do_make_tuple<typename std::remove_cv > <typename std::remove_reference<_Tuple>::type>::type> > { }; > > > 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> > inline tuple<_Elements&...> > tie(_Elements&... __args) noexcept > { return tuple<_Elements&...>(__args...); } > > > template<typename... _Elements> > inline void > swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) > noexcept(noexcept(__x.swap(__y))) > { __x.swap(__y); } > > > > struct _Swallow_assign > { > template<class _Tp> > const _Swallow_assign& > operator=(const _Tp&) const > { return *this; } > }; > > const _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))...) > { } > > > > >} ># 64 "/usr/include/c++/4.8.2/bits/stl_map.h" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 94 "/usr/include/c++/4.8.2/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: > > typedef typename _Alloc::value_type _Alloc_value_type; > > > > > > 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 _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; > > public: > > > typedef typename _Pair_alloc_type::pointer pointer; > typedef typename _Pair_alloc_type::const_pointer const_pointer; > typedef typename _Pair_alloc_type::reference reference; > typedef typename _Pair_alloc_type::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; > > > > > > > > map() > : _M_t() { } > > > > > > > explicit > map(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) { } ># 180 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > map(const map& __x) > : _M_t(__x._M_t) { } ># 191 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > map(map&& __x) > noexcept(is_nothrow_copy_constructible<_Compare>::value) > : _M_t(std::move(__x._M_t)) { } ># 206 "/usr/include/c++/4.8.2/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_unique(__l.begin(), __l.end()); } ># 223 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > template<typename _InputIterator> > map(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_unique(__first, __last); } ># 240 "/usr/include/c++/4.8.2/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_unique(__first, __last); } ># 263 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > map& > operator=(const map& __x) > { > _M_t = __x._M_t; > return *this; > } ># 278 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > map& > operator=(map&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 299 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > map& > operator=(initializer_list<value_type> __l) > { > this->clear(); > this->insert(__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(); } ># 455 "/usr/include/c++/4.8.2/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; > } ># 500 "/usr/include/c++/4.8.2/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; > } ># 538 "/usr/include/c++/4.8.2/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)...); } ># 568 "/usr/include/c++/4.8.2/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)...); > } ># 593 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_t._M_insert_unique(__x); } > > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > std::pair<iterator, bool> > insert(_Pair&& __x) > { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } ># 614 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > void > insert(std::initializer_list<value_type> __list) > { insert(__list.begin(), __list.end()); } ># 642 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > iterator > > insert(const_iterator __position, const value_type& __x) > > > > { return _M_t._M_insert_unique_(__position, __x); } > > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(const_iterator __position, _Pair&& __x) > { return _M_t._M_insert_unique_(__position, > std::forward<_Pair>(__x)); } ># 668 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_unique(__first, __last); } ># 689 "/usr/include/c++/4.8.2/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); } ># 725 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 745 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 777 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > void > swap(map& __x) > { _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()); } ># 820 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } ># 835 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } ># 847 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } ># 862 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } ># 877 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > > > > > > 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); } ># 916 "/usr/include/c++/4.8.2/bits/stl_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } ># 935 "/usr/include/c++/4.8.2/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 _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>&); > }; ># 960 "/usr/include/c++/4.8.2/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; } ># 977 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 62 "/usr/include/c++/4.8.2/map" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 1 3 ># 64 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 92 "/usr/include/c++/4.8.2/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: > > typedef typename _Alloc::value_type _Alloc_value_type; > > > > > > 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 _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; > > public: > > > typedef typename _Pair_alloc_type::pointer pointer; > typedef typename _Pair_alloc_type::const_pointer const_pointer; > typedef typename _Pair_alloc_type::reference reference; > typedef typename _Pair_alloc_type::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; > > > > > > > multimap() > : _M_t() { } > > > > > > > explicit > multimap(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Pair_alloc_type(__a)) { } ># 177 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > multimap(const multimap& __x) > : _M_t(__x._M_t) { } ># 188 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > multimap(multimap&& __x) > noexcept(is_nothrow_copy_constructible<_Compare>::value) > : _M_t(std::move(__x._M_t)) { } ># 202 "/usr/include/c++/4.8.2/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_equal(__l.begin(), __l.end()); } ># 218 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > template<typename _InputIterator> > multimap(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_equal(__first, __last); } ># 234 "/usr/include/c++/4.8.2/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_equal(__first, __last); } ># 257 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > multimap& > operator=(const multimap& __x) > { > _M_t = __x._M_t; > return *this; > } ># 272 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > multimap& > operator=(multimap&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 293 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > multimap& > operator=(initializer_list<value_type> __l) > { > this->clear(); > this->insert(__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(); } ># 452 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } ># 479 "/usr/include/c++/4.8.2/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)...); > } ># 500 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > iterator > insert(const value_type& __x) > { return _M_t._M_insert_equal(__x); } > > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(_Pair&& __x) > { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } ># 533 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > iterator > > insert(const_iterator __position, const value_type& __x) > > > > { return _M_t._M_insert_equal_(__position, __x); } > > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(const_iterator __position, _Pair&& __x) > { return _M_t._M_insert_equal_(__position, > std::forward<_Pair>(__x)); } ># 560 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_equal(__first, __last); } ># 573 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } ># 594 "/usr/include/c++/4.8.2/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); } ># 630 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 651 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 686 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > void > swap(multimap& __x) > { _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()); } ># 729 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > iterator > find(const key_type& __x) > { return _M_t.find(__x); } ># 744 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > const_iterator > find(const key_type& __x) const > { return _M_t.find(__x); } > > > > > > > size_type > count(const key_type& __x) const > { return _M_t.count(__x); } ># 768 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > iterator > lower_bound(const key_type& __x) > { return _M_t.lower_bound(__x); } ># 783 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > const_iterator > lower_bound(const key_type& __x) const > { return _M_t.lower_bound(__x); } > > > > > > > > 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); } ># 820 "/usr/include/c++/4.8.2/bits/stl_multimap.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_t.equal_range(__x); } ># 837 "/usr/include/c++/4.8.2/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 _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>&); > }; ># 862 "/usr/include/c++/4.8.2/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; } ># 879 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 63 "/usr/include/c++/4.8.2/map" 2 3 ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/usr/include/c++/4.8.2/deque" 1 3 ># 58 "/usr/include/c++/4.8.2/deque" 3 > ># 59 "/usr/include/c++/4.8.2/deque" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/bits/stl_deque.h" 1 3 ># 66 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 88 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > inline size_t > __deque_buf_size(size_t __size) > { return (__size < 512 > ? size_t(512 / __size) : size_t(1)); } ># 105 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > template<typename _Tp, typename _Ref, typename _Ptr> > struct _Deque_iterator > { > typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; > typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; > > static size_t _S_buffer_size() > { 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 _Tp** _Map_pointer; > typedef _Deque_iterator _Self; > > _Tp* _M_cur; > _Tp* _M_first; > _Tp* _M_last; > _Map_pointer _M_node; > > _Deque_iterator(_Tp* __x, _Map_pointer __y) > : _M_cur(__x), _M_first(*__y), > _M_last(*__y + _S_buffer_size()), _M_node(__y) { } > > _Deque_iterator() > : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { } > > _Deque_iterator(const iterator& __x) > : _M_cur(__x._M_cur), _M_first(__x._M_first), > _M_last(__x._M_last), _M_node(__x._M_node) { } > > reference > operator*() const > { return *_M_cur; } > > pointer > operator->() const > { return _M_cur; } > > _Self& > operator++() > { > ++_M_cur; > if (_M_cur == _M_last) > { > _M_set_node(_M_node + 1); > _M_cur = _M_first; > } > return *this; > } > > _Self > operator++(int) > { > _Self __tmp = *this; > ++*this; > return __tmp; > } > > _Self& > operator--() > { > if (_M_cur == _M_first) > { > _M_set_node(_M_node - 1); > _M_cur = _M_last; > } > --_M_cur; > return *this; > } > > _Self > operator--(int) > { > _Self __tmp = *this; > --*this; > return __tmp; > } > > _Self& > operator+=(difference_type __n) > { > 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 > { > _Self __tmp = *this; > return __tmp += __n; > } > > _Self& > operator-=(difference_type __n) > { return *this += -__n; } > > _Self > operator-(difference_type __n) const > { > _Self __tmp = *this; > return __tmp -= __n; > } > > reference > operator[](difference_type __n) const > { return *(*this + __n); } > > > > > > > void > _M_set_node(_Map_pointer __new_node) > { > _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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { 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) > { > 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) > { > 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) > { 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); } ># 438 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc> > class _Deque_base > { > public: > typedef _Alloc allocator_type; > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Tp_allocator()); } > > typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; > typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; > > _Deque_base() > : _M_impl() > { _M_initialize_map(0); } > > _Deque_base(size_t __num_elements) > : _M_impl() > { _M_initialize_map(__num_elements); } > > _Deque_base(const allocator_type& __a, size_t __num_elements) > : _M_impl(__a) > { _M_initialize_map(__num_elements); } > > _Deque_base(const allocator_type& __a) > : _M_impl(__a) > { } > > > _Deque_base(_Deque_base&& __x) > : _M_impl(std::move(__x._M_get_Tp_allocator())) > { > _M_initialize_map(0); > if (__x._M_impl._M_map) > { > 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_map, __x._M_impl._M_map); > std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); > } > } > > > ~_Deque_base(); > > protected: > > > > typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type; > > typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; > > struct _Deque_impl > : public _Tp_alloc_type > { > _Tp** _M_map; > size_t _M_map_size; > iterator _M_start; > iterator _M_finish; > > _Deque_impl() > : _Tp_alloc_type(), _M_map(0), _M_map_size(0), > _M_start(), _M_finish() > { } > > _Deque_impl(const _Tp_alloc_type& __a) > : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), > _M_start(), _M_finish() > { } > > > _Deque_impl(_Tp_alloc_type&& __a) > : _Tp_alloc_type(std::move(__a)), _M_map(0), _M_map_size(0), > _M_start(), _M_finish() > { } > > }; > > _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()); } > > _Tp* > _M_allocate_node() > { > return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); > } > > void > _M_deallocate_node(_Tp* __p) > { > _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); > } > > _Tp** > _M_allocate_map(size_t __n) > { return _M_get_map_allocator().allocate(__n); } > > void > _M_deallocate_map(_Tp** __p, size_t __n) > { _M_get_map_allocator().deallocate(__p, __n); } > > protected: > void _M_initialize_map(size_t); > void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); > void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); > enum { _S_initial_map_size = 8 }; > > _Deque_impl _M_impl; > }; > > template<typename _Tp, typename _Alloc> > _Deque_base<_Tp, _Alloc>:: > ~_Deque_base() > { > 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); > } > } ># 579 "/usr/include/c++/4.8.2/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); > > > > > > > _Tp** __nstart = (this->_M_impl._M_map > + (this->_M_impl._M_map_size - __num_nodes) / 2); > _Tp** __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 = 0; > 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(_Tp** __nstart, _Tp** __nfinish) > { > _Tp** __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(_Tp** __nstart, _Tp** __nfinish) > { > for (_Tp** __n = __nstart; __n < __nfinish; ++__n) > _M_deallocate_node(*__n); > } ># 729 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class deque : protected _Deque_base<_Tp, _Alloc> > { > > typedef typename _Alloc::value_type _Alloc_value_type; > > > > typedef _Deque_base<_Tp, _Alloc> _Base; > typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; > > public: > typedef _Tp value_type; > typedef typename _Tp_alloc_type::pointer pointer; > typedef typename _Tp_alloc_type::const_pointer const_pointer; > typedef typename _Tp_alloc_type::reference reference; > typedef typename _Tp_alloc_type::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: > typedef pointer* _Map_pointer; > > static size_t _S_buffer_size() > { 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) { } ># 801 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > explicit > deque(size_type __n) > : _Base(__n) > { _M_default_initialize(); } ># 814 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque(size_type __n, const value_type& __value, > const allocator_type& __a = allocator_type()) > : _Base(__a, __n) > { _M_fill_initialize(__value); } ># 841 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque(const deque& __x) > : _Base(__x._M_get_Tp_allocator(), __x.size()) > { std::__uninitialized_copy_a(__x.begin(), __x.end(), > this->_M_impl._M_start, > _M_get_Tp_allocator()); } ># 855 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque(deque&& __x) > : _Base(std::move(__x)) { } ># 869 "/usr/include/c++/4.8.2/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()); > } ># 894 "/usr/include/c++/4.8.2/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()); } ># 917 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > ~deque() noexcept > { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } ># 927 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque& > operator=(const deque& __x); ># 938 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque& > operator=(deque&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 959 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > deque& > operator=(initializer_list<value_type> __l) > { > this->assign(__l.begin(), __l.end()); > return *this; > } ># 977 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 994 "/usr/include/c++/4.8.2/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()); } ># 1021 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > assign(initializer_list<value_type> __l) > { this->assign(__l.begin(), __l.end()); } > > > > 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 _M_get_Tp_allocator().max_size(); } ># 1160 "/usr/include/c++/4.8.2/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)); > } ># 1182 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > resize(size_type __new_size, const value_type& __x) > { > const size_type __len = size(); > if (__new_size > __len) > 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)); > } ># 1218 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > shrink_to_fit() > { _M_shrink_to_fit(); } > > > > > > > bool > empty() const noexcept > { return this->_M_impl._M_finish == this->_M_impl._M_start; } ># 1243 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > reference > operator[](size_type __n) > { return this->_M_impl._M_start[difference_type(__n)]; } ># 1258 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > const_reference > operator[](size_type __n) const > { 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(("deque::_M_range_check")); > } > > public: ># 1283 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > reference > at(size_type __n) > { > _M_range_check(__n); > return (*this)[__n]; > } ># 1301 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > const_reference > at(size_type __n) const > { > _M_range_check(__n); > return (*this)[__n]; > } > > > > > > reference > front() > { return *begin(); } > > > > > > const_reference > front() const > { return *begin(); } > > > > > > reference > back() > { > iterator __tmp = end(); > --__tmp; > return *__tmp; > } > > > > > > const_reference > back() const > { > const_iterator __tmp = end(); > --__tmp; > return *__tmp; > } ># 1358 "/usr/include/c++/4.8.2/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) > { > this->_M_impl.construct(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); ># 1389 "/usr/include/c++/4.8.2/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) > { > this->_M_impl.construct(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); ># 1420 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > pop_front() > { > if (this->_M_impl._M_start._M_cur > != this->_M_impl._M_start._M_last - 1) > { > this->_M_impl.destroy(this->_M_impl._M_start._M_cur); > ++this->_M_impl._M_start._M_cur; > } > else > _M_pop_front_aux(); > } ># 1441 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > pop_back() > { > if (this->_M_impl._M_finish._M_cur > != this->_M_impl._M_finish._M_first) > { > --this->_M_impl._M_finish._M_cur; > this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); > } > else > _M_pop_back_aux(); > } ># 1464 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > template<typename... _Args> > iterator > emplace(iterator __position, _Args&&... __args); ># 1478 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > iterator > insert(iterator __position, const value_type& __x); ># 1491 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > iterator > insert(iterator __position, value_type&& __x) > { return emplace(__position, std::move(__x)); } ># 1504 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > insert(iterator __p, initializer_list<value_type> __l) > { this->insert(__p, __l.begin(), __l.end()); } ># 1518 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > insert(iterator __position, size_type __n, const value_type& __x) > { _M_fill_insert(__position, __n, __x); } ># 1533 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > void > insert(iterator __position, _InputIterator __first, > _InputIterator __last) > { _M_insert_dispatch(__position, __first, __last, __false_type()); } ># 1564 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > iterator > erase(iterator __position); ># 1583 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > iterator > erase(iterator __first, iterator __last); ># 1595 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > swap(deque& __x) > { > 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_map, __x._M_impl._M_map); > std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); > > > > std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_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(static_cast<size_type>(__n)); > _M_fill_initialize(__x); > } > > > template<typename _InputIterator> > void > _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, > __false_type) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_range_initialize(__first, __last, _IterCategory()); > } ># 1657 "/usr/include/c++/4.8.2/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); ># 1679 "/usr/include/c++/4.8.2/bits/stl_deque.h" 3 > void > _M_fill_initialize(const value_type& __value); > > > > void > _M_default_initialize(); ># 1695 "/usr/include/c++/4.8.2/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) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_assign_aux(__first, __last, _IterCategory()); > } > > > 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()); > insert(end(), __mid, __last); > } > 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); > insert(end(), __n - size(), __val); > } > else > { > _M_erase_at_end(begin() + difference_type(__n)); > std::fill(begin(), end(), __val); > } > } ># 1759 "/usr/include/c++/4.8.2/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(); ># 1778 "/usr/include/c++/4.8.2/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) > { > typedef typename std::iterator_traits<_InputIterator>:: > iterator_category _IterCategory; > _M_range_insert_aux(__pos, __first, __last, _IterCategory()); > } > > > 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; > } > > > > 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); ># 1923 "/usr/include/c++/4.8.2/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); > > }; ># 1955 "/usr/include/c++/4.8.2/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()); } ># 1973 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > > > >} ># 65 "/usr/include/c++/4.8.2/deque" 2 3 > ># 1 "/usr/include/c++/4.8.2/bits/deque.tcc" 1 3 ># 59 "/usr/include/c++/4.8.2/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) > { > const size_type __len = size(); > if (&__x != this) > { > 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); > insert(this->_M_impl._M_finish, __mid, __x.end()); > } > } > 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) > { > this->_M_impl.construct(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) > { > this->_M_impl.construct(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> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > insert(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, __x); > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > emplace(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, std::forward<_Args>(__args)...); > } > > > template <typename _Tp, typename _Alloc> > typename deque<_Tp, _Alloc>::iterator > deque<_Tp, _Alloc>:: > 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>:: > 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, ++__first) > *__cur = *__first; > if (__first == __last) > _M_erase_at_end(__cur); > else > insert(end(), __first, __last); > } > > 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(__n); > > _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) > > > > > > { > _M_reserve_map_at_back(); > *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); > try > { > > this->_M_impl.construct(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) > > > > > > { > _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; > > this->_M_impl.construct(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; > this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); > } > > > > > > > template <typename _Tp, typename _Alloc> > void deque<_Tp, _Alloc>:: > _M_pop_front_aux() > { > this->_M_impl.destroy(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; > } > > > >} ># 67 "/usr/include/c++/4.8.2/deque" 2 3 ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/usr/include/c++/4.8.2/set" 1 3 ># 58 "/usr/include/c++/4.8.2/set" 3 > ># 59 "/usr/include/c++/4.8.2/set" 3 > > ># 1 "/usr/include/c++/4.8.2/bits/stl_set.h" 1 3 ># 64 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 88 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > template<typename _Key, typename _Compare = std::less<_Key>, > typename _Alloc = std::allocator<_Key> > > class set > { > > typedef typename _Alloc::value_type _Alloc_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 _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; > > public: > > > typedef typename _Key_alloc_type::pointer pointer; > typedef typename _Key_alloc_type::const_pointer const_pointer; > typedef typename _Key_alloc_type::reference reference; > typedef typename _Key_alloc_type::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; > > > > > > > set() > : _M_t() { } > > > > > > > explicit > set(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) { } ># 162 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > template<typename _InputIterator> > set(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_unique(__first, __last); } ># 179 "/usr/include/c++/4.8.2/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_unique(__first, __last); } ># 193 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > set(const set& __x) > : _M_t(__x._M_t) { } ># 204 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > set(set&& __x) > noexcept(is_nothrow_copy_constructible<_Compare>::value) > : _M_t(std::move(__x._M_t)) { } ># 218 "/usr/include/c++/4.8.2/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_unique(__l.begin(), __l.end()); } ># 232 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > set& > operator=(const set& __x) > { > _M_t = __x._M_t; > return *this; > } ># 247 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > set& > operator=(set&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 268 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > set& > operator=(initializer_list<value_type> __l) > { > this->clear(); > this->insert(__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(); } ># 392 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > void > swap(set& __x) > { _M_t.swap(__x._M_t); } ># 411 "/usr/include/c++/4.8.2/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)...); } ># 437 "/usr/include/c++/4.8.2/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)...); > } ># 459 "/usr/include/c++/4.8.2/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); > } ># 496 "/usr/include/c++/4.8.2/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)); } ># 515 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_unique(__first, __last); } ># 528 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } ># 549 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } ># 580 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 601 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 629 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > void > clear() noexcept > { _M_t.clear(); } ># 643 "/usr/include/c++/4.8.2/bits/stl_set.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } ># 661 "/usr/include/c++/4.8.2/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); } ># 682 "/usr/include/c++/4.8.2/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); } ># 698 "/usr/include/c++/4.8.2/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); } ># 723 "/usr/include/c++/4.8.2/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 _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>&); > }; ># 752 "/usr/include/c++/4.8.2/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; } ># 769 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 62 "/usr/include/c++/4.8.2/set" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 1 3 ># 64 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 90 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > template <typename _Key, typename _Compare = std::less<_Key>, > typename _Alloc = std::allocator<_Key> > > class multiset > { > > typedef typename _Alloc::value_type _Alloc_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 _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; > > public: > typedef typename _Key_alloc_type::pointer pointer; > typedef typename _Key_alloc_type::const_pointer const_pointer; > typedef typename _Key_alloc_type::reference reference; > typedef typename _Key_alloc_type::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; > > > > > > multiset() > : _M_t() { } > > > > > > > explicit > multiset(const _Compare& __comp, > const allocator_type& __a = allocator_type()) > : _M_t(__comp, _Key_alloc_type(__a)) { } ># 159 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > template<typename _InputIterator> > multiset(_InputIterator __first, _InputIterator __last) > : _M_t() > { _M_t._M_insert_equal(__first, __last); } ># 175 "/usr/include/c++/4.8.2/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_equal(__first, __last); } ># 189 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > multiset(const multiset& __x) > : _M_t(__x._M_t) { } ># 200 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > multiset(multiset&& __x) > noexcept(is_nothrow_copy_constructible<_Compare>::value) > : _M_t(std::move(__x._M_t)) { } ># 214 "/usr/include/c++/4.8.2/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_equal(__l.begin(), __l.end()); } ># 228 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > multiset& > operator=(const multiset& __x) > { > _M_t = __x._M_t; > return *this; > } ># 244 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > multiset& > operator=(multiset&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 265 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > multiset& > operator=(initializer_list<value_type> __l) > { > this->clear(); > this->insert(__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(); } ># 389 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > void > swap(multiset& __x) > { _M_t.swap(__x._M_t); } ># 407 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } ># 433 "/usr/include/c++/4.8.2/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)...); > } ># 453 "/usr/include/c++/4.8.2/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)); } ># 483 "/usr/include/c++/4.8.2/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)); } ># 501 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_t._M_insert_equal(__first, __last); } ># 514 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } ># 535 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __position) > { return _M_t.erase(__position); } ># 566 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > size_type > erase(const key_type& __x) > { return _M_t.erase(__x); } ># 587 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > __attribute ((__abi_tag__ ("cxx11"))) > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_t.erase(__first, __last); } ># 615 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > void > clear() noexcept > { _M_t.clear(); } ># 626 "/usr/include/c++/4.8.2/bits/stl_multiset.h" 3 > size_type > count(const key_type& __x) const > { return _M_t.count(__x); } ># 644 "/usr/include/c++/4.8.2/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); } ># 665 "/usr/include/c++/4.8.2/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); } ># 681 "/usr/include/c++/4.8.2/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); } ># 706 "/usr/include/c++/4.8.2/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 _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>&); > }; ># 737 "/usr/include/c++/4.8.2/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; } ># 754 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 63 "/usr/include/c++/4.8.2/set" 2 3 ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/usr/include/c++/4.8.2/list" 1 3 ># 58 "/usr/include/c++/4.8.2/list" 3 > ># 59 "/usr/include/c++/4.8.2/list" 3 > > > > ># 1 "/usr/include/c++/4.8.2/bits/stl_list.h" 1 3 ># 64 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > namespace __detail > { > ># 77 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > 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; > }; > > > } > > > > > template<typename _Tp> > struct _List_node : public __detail::_List_node_base > { > > _Tp _M_data; > > > template<typename... _Args> > _List_node(_Args&&... __args) > : __detail::_List_node_base(), _M_data(std::forward<_Args>(__args)...) > { } > > }; > > > > > > > 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() > : _M_node() { } > > explicit > _List_iterator(__detail::_List_node_base* __x) > : _M_node(__x) { } > > > reference > operator*() const > { return static_cast<_Node*>(_M_node)->_M_data; } > > pointer > operator->() const > { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } > > _Self& > operator++() > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) > { > _Self __tmp = *this; > _M_node = _M_node->_M_next; > return __tmp; > } > > _Self& > operator--() > { > _M_node = _M_node->_M_prev; > return *this; > } > > _Self > operator--(int) > { > _Self __tmp = *this; > _M_node = _M_node->_M_prev; > return __tmp; > } > > bool > operator==(const _Self& __x) const > { return _M_node == __x._M_node; } > > bool > operator!=(const _Self& __x) const > { return _M_node != __x._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() > : _M_node() { } > > explicit > _List_const_iterator(const __detail::_List_node_base* __x) > : _M_node(__x) { } > > _List_const_iterator(const iterator& __x) > : _M_node(__x._M_node) { } > > > > reference > operator*() const > { return static_cast<_Node*>(_M_node)->_M_data; } > > pointer > operator->() const > { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } > > _Self& > operator++() > { > _M_node = _M_node->_M_next; > return *this; > } > > _Self > operator++(int) > { > _Self __tmp = *this; > _M_node = _M_node->_M_next; > return __tmp; > } > > _Self& > operator--() > { > _M_node = _M_node->_M_prev; > return *this; > } > > _Self > operator--(int) > { > _Self __tmp = *this; > _M_node = _M_node->_M_prev; > return __tmp; > } > > bool > operator==(const _Self& __x) const > { return _M_node == __x._M_node; } > > bool > operator!=(const _Self& __x) const > { return _M_node != __x._M_node; } > > > const __detail::_List_node_base* _M_node; > }; > > template<typename _Val> > inline bool > operator==(const _List_iterator<_Val>& __x, > const _List_const_iterator<_Val>& __y) > { return __x._M_node == __y._M_node; } > > template<typename _Val> > inline bool > operator!=(const _List_iterator<_Val>& __x, > const _List_const_iterator<_Val>& __y) > { return __x._M_node != __y._M_node; } > > > > template<typename _Tp, typename _Alloc> > class _List_base > { > protected: ># 305 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > typedef typename _Alloc::template rebind<_List_node<_Tp> >::other > _Node_alloc_type; > > typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; > > struct _List_impl > : public _Node_alloc_type > { > __detail::_List_node_base _M_node; > > _List_impl() > : _Node_alloc_type(), _M_node() > { } > > _List_impl(const _Node_alloc_type& __a) > : _Node_alloc_type(__a), _M_node() > { } > > > _List_impl(_Node_alloc_type&& __a) > : _Node_alloc_type(std::move(__a)), _M_node() > { } > > }; > > _List_impl _M_impl; > > _List_node<_Tp>* > _M_get_node() > { return _M_impl._Node_alloc_type::allocate(1); } > > void > _M_put_node(_List_node<_Tp>* __p) > { _M_impl._Node_alloc_type::deallocate(__p, 1); } > > public: > typedef _Alloc allocator_type; > > _Node_alloc_type& > _M_get_Node_allocator() noexcept > { return *static_cast<_Node_alloc_type*>(&_M_impl); } > > const _Node_alloc_type& > _M_get_Node_allocator() const noexcept > { return *static_cast<const _Node_alloc_type*>(&_M_impl); } > > _Tp_alloc_type > _M_get_Tp_allocator() const noexcept > { return _Tp_alloc_type(_M_get_Node_allocator()); } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_get_Node_allocator()); } > > _List_base() > : _M_impl() > { _M_init(); } > > _List_base(const _Node_alloc_type& __a) > : _M_impl(__a) > { _M_init(); } > > > _List_base(_List_base&& __x) > : _M_impl(std::move(__x._M_get_Node_allocator())) > { > _M_init(); > __detail::_List_node_base::swap(_M_impl._M_node, __x._M_impl._M_node); > } > > > > ~_List_base() noexcept > { _M_clear(); } > > void > _M_clear(); > > void > _M_init() > { > this->_M_impl._M_node._M_next = &this->_M_impl._M_node; > this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; > } > }; ># 437 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename _Tp, typename _Alloc = std::allocator<_Tp> > > class list : protected _List_base<_Tp, _Alloc> > { > > typedef typename _Alloc::value_type _Alloc_value_type; > > > > typedef _List_base<_Tp, _Alloc> _Base; > typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; > typedef typename _Base::_Node_alloc_type _Node_alloc_type; > > public: > typedef _Tp value_type; > typedef typename _Tp_alloc_type::pointer pointer; > typedef typename _Tp_alloc_type::const_pointer const_pointer; > typedef typename _Tp_alloc_type::reference reference; > typedef typename _Tp_alloc_type::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_Tp_allocator; > using _Base::_M_get_Node_allocator; ># 498 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename... _Args> > _Node* > _M_create_node(_Args&&... __args) > { > _Node* __p = this->_M_get_node(); > try > { > _M_get_Node_allocator().construct(__p, > std::forward<_Args>(__args)...); > } > catch(...) > { > _M_put_node(__p); > throw; > } > return __p; > } > > > public: > > > > > > list() > : _Base() { } > > > > > > explicit > list(const allocator_type& __a) > : _Base(_Node_alloc_type(__a)) { } ># 542 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > explicit > list(size_type __n) > : _Base() > { _M_default_initialize(__n); } ># 555 "/usr/include/c++/4.8.2/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); } ># 582 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > list(const list& __x) > : _Base(__x._M_get_Node_allocator()) > { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } ># 594 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > list(list&& __x) noexcept > : _Base(std::move(__x)) { } ># 605 "/usr/include/c++/4.8.2/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()); } ># 622 "/usr/include/c++/4.8.2/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()); } ># 655 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > list& > operator=(const list& __x); ># 666 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > list& > operator=(list&& __x) > { > > > this->clear(); > this->swap(__x); > return *this; > } ># 683 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > list& > operator=(initializer_list<value_type> __l) > { > this->assign(__l.begin(), __l.end()); > return *this; > } ># 701 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > assign(size_type __n, const value_type& __val) > { _M_fill_assign(__n, __val); } ># 718 "/usr/include/c++/4.8.2/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()); } ># 742 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > assign(initializer_list<value_type> __l) > { this->assign(__l.begin(), __l.end()); } > > > > allocator_type > get_allocator() const noexcept > { return _Base::get_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 std::distance(begin(), end()); } > > > size_type > max_size() const noexcept > { return _M_get_Node_allocator().max_size(); } ># 891 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > resize(size_type __new_size); ># 904 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > resize(size_type __new_size, const value_type& __x); ># 926 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > reference > front() > { return *begin(); } > > > > > > const_reference > front() const > { return *begin(); } > > > > > > reference > back() > { > iterator __tmp = end(); > --__tmp; > return *__tmp; > } > > > > > > const_reference > back() const > { > const_iterator __tmp = end(); > --__tmp; > return *__tmp; > } ># 973 "/usr/include/c++/4.8.2/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)...); } ># 1000 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > pop_front() > { this->_M_erase(begin()); } ># 1014 "/usr/include/c++/4.8.2/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)...); } ># 1040 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > pop_back() > { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } ># 1057 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename... _Args> > iterator > emplace(iterator __position, _Args&&... __args); ># 1073 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > iterator > insert(iterator __position, const value_type& __x); ># 1088 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > iterator > insert(iterator __position, value_type&& __x) > { return emplace(__position, std::move(__x)); } ># 1105 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > insert(iterator __p, initializer_list<value_type> __l) > { this->insert(__p, __l.begin(), __l.end()); } ># 1122 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > insert(iterator __position, size_type __n, const value_type& __x) > { > list __tmp(__n, __x, get_allocator()); > splice(__position, __tmp); > } ># 1143 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename _InputIterator, > typename = std::_RequireInputIter<_InputIterator>> > > > > void > insert(iterator __position, _InputIterator __first, > _InputIterator __last) > { > list __tmp(__first, __last, get_allocator()); > splice(__position, __tmp); > } ># 1171 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > iterator > erase(iterator __position); ># 1192 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > iterator > erase(iterator __first, iterator __last) > { > while (__first != __last) > __first = erase(__first); > return __last; > } ># 1209 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > swap(list& __x) > { > __detail::_List_node_base::swap(this->_M_impl._M_node, > __x._M_impl._M_node); > > > > std::__alloc_swap<typename _Base::_Node_alloc_type>:: > _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); > } > > > > > > > > void > clear() noexcept > { > _Base::_M_clear(); > _Base::_M_init(); > } ># 1246 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > > splice(iterator __position, list&& __x) > > > > { > if (!__x.empty()) > { > _M_check_equal_allocators(__x); > > this->_M_transfer(__position, __x.begin(), __x.end()); > } > } > > > void > splice(iterator __position, list& __x) > { splice(__position, std::move(__x)); } ># 1276 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > > splice(iterator __position, list&& __x, iterator __i) > > > > { > iterator __j = __i; > ++__j; > if (__position == __i || __position == __j) > return; > > if (this != &__x) > _M_check_equal_allocators(__x); > > this->_M_transfer(__position, __i, __j); > } > > > void > splice(iterator __position, list& __x, iterator __i) > { splice(__position, std::move(__x), __i); } ># 1312 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > > splice(iterator __position, list&& __x, iterator __first, > iterator __last) > > > > > { > if (__first != __last) > { > if (this != &__x) > _M_check_equal_allocators(__x); > > this->_M_transfer(__position, __first, __last); > } > } > > > void > splice(iterator __position, list& __x, iterator __first, iterator __last) > { splice(__position, std::move(__x), __first, __last); } ># 1347 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > remove(const _Tp& __value); ># 1361 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename _Predicate> > void > remove_if(_Predicate); ># 1375 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > unique(); ># 1390 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename _BinaryPredicate> > void > unique(_BinaryPredicate); ># 1404 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > void > merge(list&& __x); > > void > merge(list& __x) > { merge(std::move(__x)); } ># 1429 "/usr/include/c++/4.8.2/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); } ># 1448 "/usr/include/c++/4.8.2/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); ># 1526 "/usr/include/c++/4.8.2/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); } ># 1557 "/usr/include/c++/4.8.2/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); > } > > > > void > _M_erase(iterator __position) > { > __position._M_node->_M_unhook(); > _Node* __n = static_cast<_Node*>(__position._M_node); > > _M_get_Node_allocator().destroy(__n); > > > > _M_put_node(__n); > } > > > void > _M_check_equal_allocators(list& __x) > { > if (std::__alloc_neq<typename _Base::_Node_alloc_type>:: > _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) > __throw_runtime_error(("list::_M_check_equal_allocators")); > } > }; ># 1600 "/usr/include/c++/4.8.2/bits/stl_list.h" 3 > template<typename _Tp, typename _Alloc> > inline bool > operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) > { > 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; > } ># 1629 "/usr/include/c++/4.8.2/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) > { __x.swap(__y); } > > >} ># 64 "/usr/include/c++/4.8.2/list" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/list.tcc" 1 3 ># 59 "/usr/include/c++/4.8.2/bits/list.tcc" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Tp, typename _Alloc> > void > _List_base<_Tp, _Alloc>:: > _M_clear() > { > typedef _List_node<_Tp> _Node; > _Node* __cur = static_cast<_Node*>(_M_impl._M_node._M_next); > while (__cur != &_M_impl._M_node) > { > _Node* __tmp = __cur; > __cur = static_cast<_Node*>(__cur->_M_next); > > _M_get_Node_allocator().destroy(__tmp); > > > > _M_put_node(__tmp); > } > } > > > template<typename _Tp, typename _Alloc> > template<typename... _Args> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > emplace(iterator __position, _Args&&... __args) > { > _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); > __tmp->_M_hook(__position._M_node); > return iterator(__tmp); > } > > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > insert(iterator __position, const value_type& __x) > { > _Node* __tmp = _M_create_node(__x); > __tmp->_M_hook(__position._M_node); > return iterator(__tmp); > } > > template<typename _Tp, typename _Alloc> > typename list<_Tp, _Alloc>::iterator > list<_Tp, _Alloc>:: > erase(iterator __position) > { > iterator __ret = iterator(__position._M_node->_M_next); > _M_erase(__position); > return __ret; > } > > > 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) > { > iterator __i = begin(); > size_type __len = 0; > for (; __i != end() && __len < __new_size; ++__i, ++__len) > ; > if (__len == __new_size) > erase(__i, end()); > else > _M_default_append(__new_size - __len); > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > resize(size_type __new_size, const value_type& __x) > { > iterator __i = begin(); > size_type __len = 0; > for (; __i != end() && __len < __new_size; ++__i, ++__len) > ; > if (__len == __new_size) > erase(__i, end()); > else > insert(end(), __new_size - __len, __x); > } ># 182 "/usr/include/c++/4.8.2/bits/list.tcc" 3 > template<typename _Tp, typename _Alloc> > list<_Tp, _Alloc>& > list<_Tp, _Alloc>:: > operator=(const list& __x) > { > if (this != &__x) > { > iterator __first1 = begin(); > iterator __last1 = end(); > const_iterator __first2 = __x.begin(); > const_iterator __last2 = __x.end(); > for (; __first1 != __last1 && __first2 != __last2; > ++__first1, ++__first2) > *__first1 = *__first2; > if (__first2 == __last2) > erase(__first1, __last1); > else > insert(__last1, __first2, __last2); > } > 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, ++__first2) > *__first1 = *__first2; > if (__first2 == __last2) > erase(__first1, __last1); > else > insert(__last1, __first2, __last2); > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > remove(const value_type& __value) > { > 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); > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > unique() > { > iterator __first = begin(); > iterator __last = end(); > if (__first == __last) > return; > iterator __next = __first; > while (++__next != __last) > { > if (*__first == *__next) > _M_erase(__next); > else > __first = __next; > __next = __first; > } > } > > template<typename _Tp, typename _Alloc> > void > list<_Tp, _Alloc>:: > > merge(list&& __x) > > > > { > > > if (this != &__x) > { > _M_check_equal_allocators(__x); > > iterator __first1 = begin(); > iterator __last1 = end(); > iterator __first2 = __x.begin(); > iterator __last2 = __x.end(); > 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); > } > } > > template<typename _Tp, typename _Alloc> > template <typename _StrictWeakOrdering> > void > list<_Tp, _Alloc>:: > > merge(list&& __x, _StrictWeakOrdering __comp) > > > > { > > > if (this != &__x) > { > _M_check_equal_allocators(__x); > > iterator __first1 = begin(); > iterator __last1 = end(); > iterator __first2 = __x.begin(); > iterator __last2 = __x.end(); > 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); > } > } > > 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[0]; > list * __counter; > > do > { > __carry.splice(__carry.begin(), *this, begin()); > > for(__counter = &__tmp[0]; > __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) ); > } > } > > template<typename _Tp, typename _Alloc> > template <typename _Predicate> > void > list<_Tp, _Alloc>:: > remove_if(_Predicate __pred) > { > iterator __first = begin(); > iterator __last = end(); > while (__first != __last) > { > iterator __next = __first; > ++__next; > if (__pred(*__first)) > _M_erase(__first); > __first = __next; > } > } > > template<typename _Tp, typename _Alloc> > template <typename _BinaryPredicate> > void > list<_Tp, _Alloc>:: > unique(_BinaryPredicate __binary_pred) > { > iterator __first = begin(); > iterator __last = end(); > if (__first == __last) > return; > iterator __next = __first; > while (++__next != __last) > { > if (__binary_pred(*__first, *__next)) > _M_erase(__next); > else > __first = __next; > __next = __first; > } > } > > 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[0]; > list * __counter; > > do > { > __carry.splice(__carry.begin(), *this, begin()); > > for(__counter = &__tmp[0]; > __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)); > } > } > > >} ># 65 "/usr/include/c++/4.8.2/list" 2 3 ># 11 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 > ># 1 "/usr/include/c++/4.8.2/unordered_map" 1 3 ># 32 "/usr/include/c++/4.8.2/unordered_map" 3 > ># 33 "/usr/include/c++/4.8.2/unordered_map" 3 ># 47 "/usr/include/c++/4.8.2/unordered_map" 3 ># 1 "/usr/include/c++/4.8.2/bits/hashtable.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/hashtable.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/hashtable.h" 3 > ># 1 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 1 3 ># 34 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > class _Hashtable; > > > >namespace __detail >{ > > > > > > > > template<typename _Key, typename _Value, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _Traits> > struct _Hashtable_base; > > > > template<class _Iterator> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last, > std::input_iterator_tag) > { return 0; } > > template<class _Iterator> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last, > std::forward_iterator_tag) > { return std::distance(__first, __last); } > > template<class _Iterator> > inline typename std::iterator_traits<_Iterator>::difference_type > __distance_fw(_Iterator __first, _Iterator __last) > { > typedef typename std::iterator_traits<_Iterator>::iterator_category _Tag; > return __distance_fw(__first, __last, _Tag()); > } > > > template <typename _Key, typename _Hash> > struct __is_noexcept_hash : std::integral_constant<bool, > noexcept(declval<const _Hash&>()(declval<const _Key&>()))> > { }; > > struct _Identity > { > template<typename _Tp> > _Tp&& > operator()(_Tp&& __x) const > { return std::forward<_Tp>(__x); } > }; > > struct _Select1st > { > template<typename _Tp> > auto > operator()(_Tp&& __x) const > -> decltype(std::get<0>(std::forward<_Tp>(__x))) > { return std::get<0>(std::forward<_Tp>(__x)); } > }; ># 130 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > template<bool _Cache_hash_code, bool _Constant_iterators, bool _Unique_keys> > struct _Hashtable_traits > { > template<bool _Cond> > using __bool_constant = integral_constant<bool, _Cond>; > > using __hash_cached = __bool_constant<_Cache_hash_code>; > using __constant_iterators = __bool_constant<_Constant_iterators>; > using __unique_keys = __bool_constant<_Unique_keys>; > }; ># 149 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > struct _Hash_node_base > { > _Hash_node_base* _M_nxt; > > _Hash_node_base() : _M_nxt() { } > > _Hash_node_base(_Hash_node_base* __next) : _M_nxt(__next) { } > }; > > > > > template<typename _Value, bool _Cache_hash_code> > struct _Hash_node; > > > > > > > template<typename _Value> > struct _Hash_node<_Value, true> : _Hash_node_base > { > _Value _M_v; > std::size_t _M_hash_code; > > template<typename... _Args> > _Hash_node(_Args&&... __args) > : _M_v(std::forward<_Args>(__args)...), _M_hash_code() { } > > _Hash_node* > _M_next() const { return static_cast<_Hash_node*>(_M_nxt); } > }; > > > > > > > template<typename _Value> > struct _Hash_node<_Value, false> : _Hash_node_base > { > _Value _M_v; > > template<typename... _Args> > _Hash_node(_Args&&... __args) > : _M_v(std::forward<_Args>(__args)...) { } > > _Hash_node* > _M_next() const { return static_cast<_Hash_node*>(_M_nxt); } > }; > > > template<typename _Value, bool _Cache_hash_code> > struct _Node_iterator_base > { > using __node_type = _Hash_node<_Value, _Cache_hash_code>; > > __node_type* _M_cur; > > _Node_iterator_base(__node_type* __p) > : _M_cur(__p) { } > > void > _M_incr() > { _M_cur = _M_cur->_M_next(); } > }; > > template<typename _Value, bool _Cache_hash_code> > inline bool > operator==(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, > const _Node_iterator_base<_Value, _Cache_hash_code >& __y) > { return __x._M_cur == __y._M_cur; } > > template<typename _Value, bool _Cache_hash_code> > inline bool > operator!=(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, > const _Node_iterator_base<_Value, _Cache_hash_code>& __y) > { return __x._M_cur != __y._M_cur; } > > > template<typename _Value, bool __constant_iterators, bool __cache> > struct _Node_iterator > : public _Node_iterator_base<_Value, __cache> > { > private: > using __base_type = _Node_iterator_base<_Value, __cache>; > using __node_type = typename __base_type::__node_type; > > public: > typedef _Value value_type; > typedef std::ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > using pointer = typename std::conditional<__constant_iterators, > const _Value*, _Value*>::type; > > using reference = typename std::conditional<__constant_iterators, > const _Value&, _Value&>::type; > > _Node_iterator() > : __base_type(0) { } > > explicit > _Node_iterator(__node_type* __p) > : __base_type(__p) { } > > reference > operator*() const > { return this->_M_cur->_M_v; } > > pointer > operator->() const > { return std::__addressof(this->_M_cur->_M_v); } > > _Node_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Node_iterator > operator++(int) > { > _Node_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > template<typename _Value, bool __constant_iterators, bool __cache> > struct _Node_const_iterator > : public _Node_iterator_base<_Value, __cache> > { > private: > using __base_type = _Node_iterator_base<_Value, __cache>; > using __node_type = typename __base_type::__node_type; > > public: > typedef _Value value_type; > typedef std::ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > typedef const _Value* pointer; > typedef const _Value& reference; > > _Node_const_iterator() > : __base_type(0) { } > > explicit > _Node_const_iterator(__node_type* __p) > : __base_type(__p) { } > > _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, > __cache>& __x) > : __base_type(__x._M_cur) { } > > reference > operator*() const > { return this->_M_cur->_M_v; } > > pointer > operator->() const > { return std::__addressof(this->_M_cur->_M_v); } > > _Node_const_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Node_const_iterator > operator++(int) > { > _Node_const_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > > > > > struct _Mod_range_hashing > { > typedef std::size_t first_argument_type; > typedef std::size_t second_argument_type; > typedef std::size_t result_type; > > result_type > operator()(first_argument_type __num, second_argument_type __den) const > { return __num % __den; } > }; > > > > > > > struct _Default_ranged_hash { }; > > > > struct _Prime_rehash_policy > { > _Prime_rehash_policy(float __z = 1.0) > : _M_max_load_factor(__z), _M_next_resize(0) { } > > float > max_load_factor() const noexcept > { return _M_max_load_factor; } > > > std::size_t > _M_next_bkt(std::size_t __n) const; > > > std::size_t > _M_bkt_for_elements(std::size_t __n) const > { return __builtin_ceil(__n / (long double)_M_max_load_factor); } > > > > > > std::pair<bool, std::size_t> > _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, > std::size_t __n_ins) const; > > typedef std::size_t _State; > > _State > _M_state() const > { return _M_next_resize; } > > void > _M_reset(_State __state) > { _M_next_resize = __state; } > > enum { _S_n_primes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 }; > > static const std::size_t _S_growth_factor = 2; > > float _M_max_load_factor; > mutable std::size_t _M_next_resize; > }; ># 419 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits, > bool _Unique_keys = _Traits::__unique_keys::value> > struct _Map_base { }; > > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, false> > { > using mapped_type = typename std::tuple_element<1, _Pair>::type; > }; > > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true> > { > private: > using __hashtable_base = __detail::_Hashtable_base<_Key, _Pair, > _Select1st, > _Equal, _H1, _H2, _Hash, > _Traits>; > > using __hashtable = _Hashtable<_Key, _Pair, _Alloc, > _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>; > > using __hash_code = typename __hashtable_base::__hash_code; > using __node_type = typename __hashtable_base::__node_type; > > public: > using key_type = typename __hashtable_base::key_type; > using iterator = typename __hashtable_base::iterator; > using mapped_type = typename std::tuple_element<1, _Pair>::type; > > mapped_type& > operator[](const key_type& __k); > > mapped_type& > operator[](key_type&& __k); > > > > mapped_type& > at(const key_type& __k); > > const mapped_type& > at(const key_type& __k) const; > }; > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true> > ::mapped_type& > _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: > operator[](const key_type& __k) > { > __hashtable* __h = static_cast<__hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __n = __h->_M_bucket_index(__k, __code); > __node_type* __p = __h->_M_find_node(__n, __k, __code); > > if (!__p) > { > __p = __h->_M_allocate_node(std::piecewise_construct, > std::tuple<const key_type&>(__k), > std::tuple<>()); > return __h->_M_insert_unique_node(__n, __code, __p)->second; > } > > return (__p->_M_v).second; > } > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true> > ::mapped_type& > _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: > operator[](key_type&& __k) > { > __hashtable* __h = static_cast<__hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __n = __h->_M_bucket_index(__k, __code); > __node_type* __p = __h->_M_find_node(__n, __k, __code); > > if (!__p) > { > __p = __h->_M_allocate_node(std::piecewise_construct, > std::forward_as_tuple(std::move(__k)), > std::tuple<>()); > return __h->_M_insert_unique_node(__n, __code, __p)->second; > } > > return (__p->_M_v).second; > } > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true> > ::mapped_type& > _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: > at(const key_type& __k) > { > __hashtable* __h = static_cast<__hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __n = __h->_M_bucket_index(__k, __code); > __node_type* __p = __h->_M_find_node(__n, __k, __code); > > if (!__p) > __throw_out_of_range(("_Map_base::at")); > return (__p->_M_v).second; > } > > template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > const typename _Map_base<_Key, _Pair, _Alloc, _Select1st, > _Equal, _H1, _H2, _Hash, _RehashPolicy, > _Traits, true>::mapped_type& > _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: > at(const key_type& __k) const > { > const __hashtable* __h = static_cast<const __hashtable*>(this); > __hash_code __code = __h->_M_hash_code(__k); > std::size_t __n = __h->_M_bucket_index(__k, __code); > __node_type* __p = __h->_M_find_node(__n, __k, __code); > > if (!__p) > __throw_out_of_range(("_Map_base::at")); > return (__p->_M_v).second; > } > > > > > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Insert_base > { > using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > > using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _Traits>; > > using value_type = typename __hashtable_base::value_type; > using iterator = typename __hashtable_base::iterator; > using const_iterator = typename __hashtable_base::const_iterator; > using size_type = typename __hashtable_base::size_type; > > using __unique_keys = typename __hashtable_base::__unique_keys; > using __ireturn_type = typename __hashtable_base::__ireturn_type; > using __iconv_type = typename __hashtable_base::__iconv_type; > > __hashtable& > _M_conjure_hashtable() > { return *(static_cast<__hashtable*>(this)); } > > __ireturn_type > insert(const value_type& __v) > { > __hashtable& __h = _M_conjure_hashtable(); > return __h._M_insert(__v, __unique_keys()); > } > > iterator > insert(const_iterator, const value_type& __v) > { return __iconv_type()(insert(__v)); } > > void > insert(initializer_list<value_type> __l) > { this->insert(__l.begin(), __l.end()); } > > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last); > }; > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > template<typename _InputIterator> > void > _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>:: > insert(_InputIterator __first, _InputIterator __last) > { > using __rehash_type = typename __hashtable::__rehash_type; > using __rehash_state = typename __hashtable::__rehash_state; > using pair_type = std::pair<bool, std::size_t>; > > size_type __n_elt = __detail::__distance_fw(__first, __last); > > __hashtable& __h = _M_conjure_hashtable(); > __rehash_type& __rehash = __h._M_rehash_policy; > const __rehash_state& __saved_state = __rehash._M_state(); > pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, > __h._M_element_count, > __n_elt); > > if (__do_rehash.first) > __h._M_rehash(__do_rehash.second, __saved_state); > > for (; __first != __last; ++__first) > __h._M_insert(*__first, __unique_keys()); > } > > > > > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits, > bool _Constant_iterators = _Traits::__constant_iterators::value, > bool _Unique_keys = _Traits::__unique_keys::value> > struct _Insert; > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits, true, true> > : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits> > { > using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > using value_type = typename __base_type::value_type; > using iterator = typename __base_type::iterator; > using const_iterator = typename __base_type::const_iterator; > > using __unique_keys = typename __base_type::__unique_keys; > using __hashtable = typename __base_type::__hashtable; > > using __base_type::insert; > > std::pair<iterator, bool> > insert(value_type&& __v) > { > __hashtable& __h = this->_M_conjure_hashtable(); > return __h._M_insert(std::move(__v), __unique_keys()); > } > > iterator > insert(const_iterator, value_type&& __v) > { return insert(std::move(__v)).first; } > }; > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits, true, false> > : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits> > { > using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > using value_type = typename __base_type::value_type; > using iterator = typename __base_type::iterator; > using const_iterator = typename __base_type::const_iterator; > > using __unique_keys = typename __base_type::__unique_keys; > using __hashtable = typename __base_type::__hashtable; > > using __base_type::insert; > > iterator > insert(value_type&& __v) > { > __hashtable& __h = this->_M_conjure_hashtable(); > return __h._M_insert(std::move(__v), __unique_keys()); > } > > iterator > insert(const_iterator, value_type&& __v) > { return insert(std::move(__v)); } > }; > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits, bool _Unique_keys> > struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits, false, _Unique_keys> > : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits> > { > using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > using value_type = typename __base_type::value_type; > using iterator = typename __base_type::iterator; > using const_iterator = typename __base_type::const_iterator; > > using __unique_keys = typename __base_type::__unique_keys; > using __hashtable = typename __base_type::__hashtable; > using __ireturn_type = typename __base_type::__ireturn_type; > using __iconv_type = typename __base_type::__iconv_type; > > using __base_type::insert; > > template<typename _Pair> > using __is_cons = std::is_constructible<value_type, _Pair&&>; > > template<typename _Pair> > using _IFcons = std::enable_if<__is_cons<_Pair>::value>; > > template<typename _Pair> > using _IFconsp = typename _IFcons<_Pair>::type; > > template<typename _Pair, typename = _IFconsp<_Pair>> > __ireturn_type > insert(_Pair&& __v) > { > __hashtable& __h = this->_M_conjure_hashtable(); > return __h._M_emplace(__unique_keys(), std::forward<_Pair>(__v)); > } > > template<typename _Pair, typename = _IFconsp<_Pair>> > iterator > insert(const_iterator, _Pair&& __v) > { return __iconv_type()(insert(std::forward<_Pair>(__v))); } > }; > > > > > > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Rehash_base; > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _Traits> > struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _Prime_rehash_policy, _Traits> > { > using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _Prime_rehash_policy, _Traits>; > > float > max_load_factor() const noexcept > { > const __hashtable* __this = static_cast<const __hashtable*>(this); > return __this->__rehash_policy().max_load_factor(); > } > > void > max_load_factor(float __z) > { > __hashtable* __this = static_cast<__hashtable*>(this); > __this->__rehash_policy(_Prime_rehash_policy(__z)); > } > > void > reserve(std::size_t __n) > { > __hashtable* __this = static_cast<__hashtable*>(this); > __this->rehash(__builtin_ceil(__n / max_load_factor())); > } > }; > > > > > > > > template<int _Nm, typename _Tp, > bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)> > struct _Hashtable_ebo_helper; > > > template<int _Nm, typename _Tp> > struct _Hashtable_ebo_helper<_Nm, _Tp, true> > : private _Tp > { > _Hashtable_ebo_helper() = default; > > _Hashtable_ebo_helper(const _Tp& __tp) : _Tp(__tp) > { } > > static const _Tp& > _S_cget(const _Hashtable_ebo_helper& __eboh) > { return static_cast<const _Tp&>(__eboh); } > > static _Tp& > _S_get(_Hashtable_ebo_helper& __eboh) > { return static_cast<_Tp&>(__eboh); } > }; > > > template<int _Nm, typename _Tp> > struct _Hashtable_ebo_helper<_Nm, _Tp, false> > { > _Hashtable_ebo_helper() = default; > > _Hashtable_ebo_helper(const _Tp& __tp) : _M_tp(__tp) > { } > > static const _Tp& > _S_cget(const _Hashtable_ebo_helper& __eboh) > { return __eboh._M_tp; } > > static _Tp& > _S_get(_Hashtable_ebo_helper& __eboh) > { return __eboh._M_tp; } > > private: > _Tp _M_tp; > }; > > > > > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, > bool __cache_hash_code> > struct _Local_iterator_base; ># 904 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, > bool __cache_hash_code> > struct _Hash_code_base; > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash> > struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> > : private _Hashtable_ebo_helper<0, _ExtractKey>, > private _Hashtable_ebo_helper<1, _Hash> > { > private: > using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; > using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; > > protected: > typedef void* __hash_code; > typedef _Hash_node<_Value, false> __node_type; > > > _Hash_code_base() = default; > > _Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&, > const _Hash& __h) > : __ebo_extract_key(__ex), __ebo_hash(__h) { } > > __hash_code > _M_hash_code(const _Key& __key) const > { return 0; } > > std::size_t > _M_bucket_index(const _Key& __k, __hash_code, std::size_t __n) const > { return _M_ranged_hash()(__k, __n); } > > std::size_t > _M_bucket_index(const __node_type* __p, std::size_t __n) const > { return _M_ranged_hash()(_M_extract()(__p->_M_v), __n); } > > void > _M_store_code(__node_type*, __hash_code) const > { } > > void > _M_copy_code(__node_type*, const __node_type*) const > { } > > void > _M_swap(_Hash_code_base& __x) > { > std::swap(_M_extract(), __x._M_extract()); > std::swap(_M_ranged_hash(), __x._M_ranged_hash()); > } > > const _ExtractKey& > _M_extract() const { return __ebo_extract_key::_S_cget(*this); } > > _ExtractKey& > _M_extract() { return __ebo_extract_key::_S_get(*this); } > > const _Hash& > _M_ranged_hash() const { return __ebo_hash::_S_cget(*this); } > > _Hash& > _M_ranged_hash() { return __ebo_hash::_S_get(*this); } > }; > > > > > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash> > struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; > > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2> > struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, > _Default_ranged_hash, false> > : private _Hashtable_ebo_helper<0, _ExtractKey>, > private _Hashtable_ebo_helper<1, _H1>, > private _Hashtable_ebo_helper<2, _H2> > { > private: > using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; > using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; > using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; > > public: > typedef _H1 hasher; > > hasher > hash_function() const > { return _M_h1(); } > > protected: > typedef std::size_t __hash_code; > typedef _Hash_node<_Value, false> __node_type; > > > _Hash_code_base() = default; > > _Hash_code_base(const _ExtractKey& __ex, > const _H1& __h1, const _H2& __h2, > const _Default_ranged_hash&) > : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } > > __hash_code > _M_hash_code(const _Key& __k) const > { return _M_h1()(__k); } > > std::size_t > _M_bucket_index(const _Key&, __hash_code __c, std::size_t __n) const > { return _M_h2()(__c, __n); } > > std::size_t > _M_bucket_index(const __node_type* __p, > std::size_t __n) const > { return _M_h2()(_M_h1()(_M_extract()(__p->_M_v)), __n); } > > void > _M_store_code(__node_type*, __hash_code) const > { } > > void > _M_copy_code(__node_type*, const __node_type*) const > { } > > void > _M_swap(_Hash_code_base& __x) > { > std::swap(_M_extract(), __x._M_extract()); > std::swap(_M_h1(), __x._M_h1()); > std::swap(_M_h2(), __x._M_h2()); > } > > const _ExtractKey& > _M_extract() const { return __ebo_extract_key::_S_cget(*this); } > > _ExtractKey& > _M_extract() { return __ebo_extract_key::_S_get(*this); } > > const _H1& > _M_h1() const { return __ebo_h1::_S_cget(*this); } > > _H1& > _M_h1() { return __ebo_h1::_S_get(*this); } > > const _H2& > _M_h2() const { return __ebo_h2::_S_cget(*this); } > > _H2& > _M_h2() { return __ebo_h2::_S_get(*this); } > }; > > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2> > struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, > _Default_ranged_hash, true> > : private _Hashtable_ebo_helper<0, _ExtractKey>, > private _Hashtable_ebo_helper<1, _H1>, > private _Hashtable_ebo_helper<2, _H2> > { > private: > > friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, > _Default_ranged_hash, true>; > > using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; > using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; > using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; > > public: > typedef _H1 hasher; > > hasher > hash_function() const > { return _M_h1(); } > > protected: > typedef std::size_t __hash_code; > typedef _Hash_node<_Value, true> __node_type; > > _Hash_code_base(const _ExtractKey& __ex, > const _H1& __h1, const _H2& __h2, > const _Default_ranged_hash&) > : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } > > __hash_code > _M_hash_code(const _Key& __k) const > { return _M_h1()(__k); } > > std::size_t > _M_bucket_index(const _Key&, __hash_code __c, > std::size_t __n) const > { return _M_h2()(__c, __n); } > > std::size_t > _M_bucket_index(const __node_type* __p, std::size_t __n) const > { return _M_h2()(__p->_M_hash_code, __n); } > > void > _M_store_code(__node_type* __n, __hash_code __c) const > { __n->_M_hash_code = __c; } > > void > _M_copy_code(__node_type* __to, const __node_type* __from) const > { __to->_M_hash_code = __from->_M_hash_code; } > > void > _M_swap(_Hash_code_base& __x) > { > std::swap(_M_extract(), __x._M_extract()); > std::swap(_M_h1(), __x._M_h1()); > std::swap(_M_h2(), __x._M_h2()); > } > > const _ExtractKey& > _M_extract() const { return __ebo_extract_key::_S_cget(*this); } > > _ExtractKey& > _M_extract() { return __ebo_extract_key::_S_get(*this); } > > const _H1& > _M_h1() const { return __ebo_h1::_S_cget(*this); } > > _H1& > _M_h1() { return __ebo_h1::_S_get(*this); } > > const _H2& > _M_h2() const { return __ebo_h2::_S_cget(*this); } > > _H2& > _M_h2() { return __ebo_h2::_S_get(*this); } > }; > > > > > > template <typename _Key, typename _Value, typename _ExtractKey, > typename _Equal, typename _HashCodeType, > bool __cache_hash_code> > struct _Equal_helper; > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _Equal, typename _HashCodeType> > struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, true> > { > static bool > _S_equals(const _Equal& __eq, const _ExtractKey& __extract, > const _Key& __k, _HashCodeType __c, _Hash_node<_Value, true>* __n) > { return __c == __n->_M_hash_code && __eq(__k, __extract(__n->_M_v)); } > }; > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _Equal, typename _HashCodeType> > struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, false> > { > static bool > _S_equals(const _Equal& __eq, const _ExtractKey& __extract, > const _Key& __k, _HashCodeType, _Hash_node<_Value, false>* __n) > { return __eq(__k, __extract(__n->_M_v)); } > }; > > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash> > struct _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, true> > : private _Hashtable_ebo_helper<0, _H2> > { > protected: > using __base_type = _Hashtable_ebo_helper<0, _H2>; > using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, true>; > > public: > _Local_iterator_base() = default; > _Local_iterator_base(const __hash_code_base& __base, > _Hash_node<_Value, true>* __p, > std::size_t __bkt, std::size_t __bkt_count) > : __base_type(__base._M_h2()), > _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } > > void > _M_incr() > { > _M_cur = _M_cur->_M_next(); > if (_M_cur) > { > std::size_t __bkt > = __base_type::_S_get(*this)(_M_cur->_M_hash_code, > _M_bucket_count); > if (__bkt != _M_bucket) > _M_cur = nullptr; > } > } > > _Hash_node<_Value, true>* _M_cur; > std::size_t _M_bucket; > std::size_t _M_bucket_count; > }; > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash> > struct _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, false> > : private _Hash_code_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, false> > { > protected: > using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, false>; > > public: > _Local_iterator_base() = default; > _Local_iterator_base(const __hash_code_base& __base, > _Hash_node<_Value, false>* __p, > std::size_t __bkt, std::size_t __bkt_count) > : __hash_code_base(__base), > _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } > > void > _M_incr() > { > _M_cur = _M_cur->_M_next(); > if (_M_cur) > { > std::size_t __bkt = this->_M_bucket_index(_M_cur, _M_bucket_count); > if (__bkt != _M_bucket) > _M_cur = nullptr; > } > } > > _Hash_node<_Value, false>* _M_cur; > std::size_t _M_bucket; > std::size_t _M_bucket_count; > }; > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, bool __cache> > inline bool > operator==(const _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>& __x, > const _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>& __y) > { return __x._M_cur == __y._M_cur; } > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, bool __cache> > inline bool > operator!=(const _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>& __x, > const _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>& __y) > { return __x._M_cur != __y._M_cur; } > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, > bool __constant_iterators, bool __cache> > struct _Local_iterator > : public _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache> > { > private: > using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>; > using __hash_code_base = typename __base_type::__hash_code_base; > public: > typedef _Value value_type; > typedef typename std::conditional<__constant_iterators, > const _Value*, _Value*>::type > pointer; > typedef typename std::conditional<__constant_iterators, > const _Value&, _Value&>::type > reference; > typedef std::ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > _Local_iterator() = default; > > _Local_iterator(const __hash_code_base& __base, > _Hash_node<_Value, __cache>* __p, > std::size_t __bkt, std::size_t __bkt_count) > : __base_type(__base, __p, __bkt, __bkt_count) > { } > > reference > operator*() const > { return this->_M_cur->_M_v; } > > pointer > operator->() const > { return std::__addressof(this->_M_cur->_M_v); } > > _Local_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Local_iterator > operator++(int) > { > _Local_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; > > > template<typename _Key, typename _Value, typename _ExtractKey, > typename _H1, typename _H2, typename _Hash, > bool __constant_iterators, bool __cache> > struct _Local_const_iterator > : public _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache> > { > private: > using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, __cache>; > using __hash_code_base = typename __base_type::__hash_code_base; > > public: > typedef _Value value_type; > typedef const _Value* pointer; > typedef const _Value& reference; > typedef std::ptrdiff_t difference_type; > typedef std::forward_iterator_tag iterator_category; > > _Local_const_iterator() = default; > > _Local_const_iterator(const __hash_code_base& __base, > _Hash_node<_Value, __cache>* __p, > std::size_t __bkt, std::size_t __bkt_count) > : __base_type(__base, __p, __bkt, __bkt_count) > { } > > _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, > __constant_iterators, > __cache>& __x) > : __base_type(__x) > { } > > reference > operator*() const > { return this->_M_cur->_M_v; } > > pointer > operator->() const > { return std::__addressof(this->_M_cur->_M_v); } > > _Local_const_iterator& > operator++() > { > this->_M_incr(); > return *this; > } > > _Local_const_iterator > operator++(int) > { > _Local_const_iterator __tmp(*this); > this->_M_incr(); > return __tmp; > } > }; ># 1399 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > template<typename _Key, typename _Value, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _Traits> > struct _Hashtable_base > : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, > _Traits::__hash_cached::value>, > private _Hashtable_ebo_helper<0, _Equal> > { > public: > typedef _Key key_type; > typedef _Value value_type; > typedef _Equal key_equal; > typedef std::size_t size_type; > typedef std::ptrdiff_t difference_type; > > using __traits_type = _Traits; > using __hash_cached = typename __traits_type::__hash_cached; > using __constant_iterators = typename __traits_type::__constant_iterators; > using __unique_keys = typename __traits_type::__unique_keys; > > using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, > _H1, _H2, _Hash, > __hash_cached::value>; > > using __hash_code = typename __hash_code_base::__hash_code; > using __node_type = typename __hash_code_base::__node_type; > > using iterator = __detail::_Node_iterator<value_type, > __constant_iterators::value, > __hash_cached::value>; > > using const_iterator = __detail::_Node_const_iterator<value_type, > __constant_iterators::value, > __hash_cached::value>; > > using local_iterator = __detail::_Local_iterator<key_type, value_type, > _ExtractKey, _H1, _H2, _Hash, > __constant_iterators::value, > __hash_cached::value>; > > using const_local_iterator = __detail::_Local_const_iterator<key_type, > value_type, > _ExtractKey, _H1, _H2, _Hash, > __constant_iterators::value, > __hash_cached::value>; > > using __ireturn_type = typename std::conditional<__unique_keys::value, > std::pair<iterator, bool>, > iterator>::type; > > using __iconv_type = typename std::conditional<__unique_keys::value, > _Select1st, _Identity > >::type; > private: > using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; > using _EqualHelper = _Equal_helper<_Key, _Value, _ExtractKey, _Equal, > __hash_code, __hash_cached::value>; > > protected: > using __node_base = __detail::_Hash_node_base; > using __bucket_type = __node_base*; > > _Hashtable_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, > const _Hash& __hash, const _Equal& __eq) > : __hash_code_base(__ex, __h1, __h2, __hash), _EqualEBO(__eq) > { } > > bool > _M_equals(const _Key& __k, __hash_code __c, __node_type* __n) const > { > return _EqualHelper::_S_equals(_M_eq(), this->_M_extract(), > __k, __c, __n); > } > > void > _M_swap(_Hashtable_base& __x) > { > __hash_code_base::_M_swap(__x); > std::swap(_M_eq(), __x._M_eq()); > } > > const _Equal& > _M_eq() const { return _EqualEBO::_S_cget(*this); } > > _Equal& > _M_eq() { return _EqualEBO::_S_get(*this); } > }; > > > > > > > struct _Equality_base > { > protected: > template<typename _Uiterator> > static bool > _S_is_permutation(_Uiterator, _Uiterator, _Uiterator); > }; > > > template<typename _Uiterator> > bool > _Equality_base:: > _S_is_permutation(_Uiterator __first1, _Uiterator __last1, > _Uiterator __first2) > { > for (; __first1 != __last1; ++__first1, ++__first2) > if (!(*__first1 == *__first2)) > break; > > if (__first1 == __last1) > return true; > > _Uiterator __last2 = __first2; > std::advance(__last2, std::distance(__first1, __last1)); > > for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1) > { > _Uiterator __tmp = __first1; > while (__tmp != __it1 && !bool(*__tmp == *__it1)) > ++__tmp; > > > if (__tmp != __it1) > continue; > > std::ptrdiff_t __n2 = 0; > for (__tmp = __first2; __tmp != __last2; ++__tmp) > if (*__tmp == *__it1) > ++__n2; > > if (!__n2) > return false; > > std::ptrdiff_t __n1 = 0; > for (__tmp = __it1; __tmp != __last1; ++__tmp) > if (*__tmp == *__it1) > ++__n1; > > if (__n1 != __n2) > return false; > } > return true; > } ># 1554 "/usr/include/c++/4.8.2/bits/hashtable_policy.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits, > bool _Unique_keys = _Traits::__unique_keys::value> > struct _Equality; > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true> > { > using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>; > > bool > _M_equal(const __hashtable&) const; > }; > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > bool > _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: > _M_equal(const __hashtable& __other) const > { > const __hashtable* __this = static_cast<const __hashtable*>(this); > > if (__this->size() != __other.size()) > return false; > > for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) > { > const auto __ity = __other.find(_ExtractKey()(*__itx)); > if (__ity == __other.end() || !bool(*__ity == *__itx)) > return false; > } > return true; > } > > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, false> > : public _Equality_base > { > using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>; > > bool > _M_equal(const __hashtable&) const; > }; > > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > bool > _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits, false>:: > _M_equal(const __hashtable& __other) const > { > const __hashtable* __this = static_cast<const __hashtable*>(this); > > if (__this->size() != __other.size()) > return false; > > for (auto __itx = __this->begin(); __itx != __this->end();) > { > const auto __xrange = __this->equal_range(_ExtractKey()(*__itx)); > const auto __yrange = __other.equal_range(_ExtractKey()(*__itx)); > > if (std::distance(__xrange.first, __xrange.second) > != std::distance(__yrange.first, __yrange.second)) > return false; > > if (!_S_is_permutation(__xrange.first, __xrange.second, > __yrange.first)) > return false; > > __itx = __xrange.second; > } > return true; > } > > > > > > template<typename _NodeAlloc> > struct _Before_begin : public _NodeAlloc > { > _Hash_node_base _M_node; > > _Before_begin(const _Before_begin&) = default; > _Before_begin(_Before_begin&&) = default; > > template<typename _Alloc> > _Before_begin(_Alloc&& __a) > : _NodeAlloc(std::forward<_Alloc>(__a)) > { } > }; > > > >} >} ># 36 "/usr/include/c++/4.8.2/bits/hashtable.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _Tp, typename _Hash> > using __cache_default > = __not_<__and_< > __is_fast_hash<_Hash>, > > > is_default_constructible<_Hash>, > is_copy_assignable<_Hash>, > > __detail::__is_noexcept_hash<_Tp, _Hash>>>; ># 170 "/usr/include/c++/4.8.2/bits/hashtable.h" 3 > template<typename _Key, typename _Value, typename _Alloc, > typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, > typename _RehashPolicy, typename _Traits> > class _Hashtable > : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, > _H1, _H2, _Hash, _Traits>, > public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>, > public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>, > public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>, > public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits> > { > public: > typedef _Key key_type; > typedef _Value value_type; > typedef _Alloc allocator_type; > typedef _Equal key_equal; > > > > typedef typename _Alloc::pointer pointer; > typedef typename _Alloc::const_pointer const_pointer; > typedef typename _Alloc::reference reference; > typedef typename _Alloc::const_reference const_reference; > > private: > using __rehash_type = _RehashPolicy; > using __rehash_state = typename __rehash_type::_State; > > using __traits_type = _Traits; > using __hash_cached = typename __traits_type::__hash_cached; > using __constant_iterators = typename __traits_type::__constant_iterators; > using __unique_keys = typename __traits_type::__unique_keys; > > using __key_extract = typename std::conditional< > __constant_iterators::value, > __detail::_Identity, > __detail::_Select1st>::type; > > using __hashtable_base = __detail:: > _Hashtable_base<_Key, _Value, _ExtractKey, > _Equal, _H1, _H2, _Hash, _Traits>; > > using __hash_code_base = typename __hashtable_base::__hash_code_base; > using __hash_code = typename __hashtable_base::__hash_code; > using __node_type = typename __hashtable_base::__node_type; > using __node_base = typename __hashtable_base::__node_base; > using __bucket_type = typename __hashtable_base::__bucket_type; > using __ireturn_type = typename __hashtable_base::__ireturn_type; > using __iconv_type = typename __hashtable_base::__iconv_type; > > using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > > using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, > _ExtractKey, _Equal, > _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > > using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, > _RehashPolicy, _Traits>; > > > using __hash_noexcept = __detail::__is_noexcept_hash<_Key, _H1>; > > template<typename _Cond> > using __if_hash_cached = __or_<__not_<__hash_cached>, _Cond>; > > template<typename _Cond> > using __if_hash_not_cached = __or_<__hash_cached, _Cond>; > > > > > > > static_assert(__if_hash_not_cached<__hash_noexcept>::value, > "Cache the hash code" > " or qualify your hash functor with noexcept"); > > > > > > > static_assert(__if_hash_cached<is_default_constructible<_H2>>::value, > "Functor used to map hash code to bucket index" > " must be default constructible"); > > > > > static_assert(__if_hash_not_cached< > is_default_constructible< > > > __detail::_Hashtable_ebo_helper<0, __hash_code_base>>>::value, > "Cache the hash code or make functors involved in hash code" > " and bucket index computation default constructible"); > > > > > static_assert(__if_hash_not_cached< > is_copy_assignable<__hash_code_base>>::value, > "Cache the hash code or make functors involved in hash code" > " and bucket index computation copy assignable"); > > public: > template<typename _Keya, typename _Valuea, typename _Alloca, > typename _ExtractKeya, typename _Equala, > typename _H1a, typename _H2a, typename _Hasha, > typename _RehashPolicya, typename _Traitsa, > bool _Unique_keysa> > friend struct __detail::_Map_base; > > template<typename _Keya, typename _Valuea, typename _Alloca, > typename _ExtractKeya, typename _Equala, > typename _H1a, typename _H2a, typename _Hasha, > typename _RehashPolicya, typename _Traitsa> > friend struct __detail::_Insert_base; > > template<typename _Keya, typename _Valuea, typename _Alloca, > typename _ExtractKeya, typename _Equala, > typename _H1a, typename _H2a, typename _Hasha, > typename _RehashPolicya, typename _Traitsa, > bool _Constant_iteratorsa, bool _Unique_keysa> > friend struct __detail::_Insert; > > using size_type = typename __hashtable_base::size_type; > using difference_type = typename __hashtable_base::difference_type; > > using iterator = typename __hashtable_base::iterator; > using const_iterator = typename __hashtable_base::const_iterator; > > using local_iterator = typename __hashtable_base::local_iterator; > using const_local_iterator = typename __hashtable_base:: > const_local_iterator; > > private: > typedef typename _Alloc::template rebind<__node_type>::other > _Node_allocator_type; > typedef typename _Alloc::template rebind<__bucket_type>::other > _Bucket_allocator_type; > > using __before_begin = __detail::_Before_begin<_Node_allocator_type>; > > __bucket_type* _M_buckets; > size_type _M_bucket_count; > __before_begin _M_bbegin; > size_type _M_element_count; > _RehashPolicy _M_rehash_policy; > > _Node_allocator_type& > _M_node_allocator() > { return _M_bbegin; } > > const _Node_allocator_type& > _M_node_allocator() const > { return _M_bbegin; } > > __node_base& > _M_before_begin() > { return _M_bbegin._M_node; } > > const __node_base& > _M_before_begin() const > { return _M_bbegin._M_node; } > > template<typename... _Args> > __node_type* > _M_allocate_node(_Args&&... __args); > > void > _M_deallocate_node(__node_type* __n); > > > void > _M_deallocate_nodes(__node_type* __n); > > __bucket_type* > _M_allocate_buckets(size_type __n); > > void > _M_deallocate_buckets(__bucket_type*, size_type __n); > > > > __node_type* > _M_bucket_begin(size_type __bkt) const; > > __node_type* > _M_begin() const > { return static_cast<__node_type*>(_M_before_begin()._M_nxt); } > > public: > > _Hashtable(size_type __bucket_hint, > const _H1&, const _H2&, const _Hash&, > const _Equal&, const _ExtractKey&, > const allocator_type&); > > template<typename _InputIterator> > _Hashtable(_InputIterator __first, _InputIterator __last, > size_type __bucket_hint, > const _H1&, const _H2&, const _Hash&, > const _Equal&, const _ExtractKey&, > const allocator_type&); > > _Hashtable(const _Hashtable&); > > _Hashtable(_Hashtable&&); > > > explicit > _Hashtable(size_type __n = 10, > const _H1& __hf = _H1(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _Hashtable(__n, __hf, __detail::_Mod_range_hashing(), > __detail::_Default_ranged_hash(), __eql, > __key_extract(), __a) > { } > > template<typename _InputIterator> > _Hashtable(_InputIterator __f, _InputIterator __l, > size_type __n = 0, > const _H1& __hf = _H1(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _Hashtable(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), > __detail::_Default_ranged_hash(), __eql, > __key_extract(), __a) > { } > > _Hashtable(initializer_list<value_type> __l, > size_type __n = 0, > const _H1& __hf = _H1(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _Hashtable(__l.begin(), __l.end(), __n, __hf, > __detail::_Mod_range_hashing(), > __detail::_Default_ranged_hash(), __eql, > __key_extract(), __a) > { } > > _Hashtable& > operator=(const _Hashtable& __ht) > { > _Hashtable __tmp(__ht); > this->swap(__tmp); > return *this; > } > > _Hashtable& > operator=(_Hashtable&& __ht) > { > > > this->clear(); > this->swap(__ht); > return *this; > } > > _Hashtable& > operator=(initializer_list<value_type> __l) > { > this->clear(); > this->insert(__l.begin(), __l.end()); > return *this; > } > > ~_Hashtable() noexcept; > > void swap(_Hashtable&); > > > iterator > begin() noexcept > { return iterator(_M_begin()); } > > const_iterator > begin() const noexcept > { return const_iterator(_M_begin()); } > > iterator > end() noexcept > { return iterator(nullptr); } > > const_iterator > end() const noexcept > { return const_iterator(nullptr); } > > const_iterator > cbegin() const noexcept > { return const_iterator(_M_begin()); } > > const_iterator > cend() const noexcept > { return const_iterator(nullptr); } > > size_type > size() const noexcept > { return _M_element_count; } > > bool > empty() const noexcept > { return size() == 0; } > > allocator_type > get_allocator() const noexcept > { return allocator_type(_M_node_allocator()); } > > size_type > max_size() const noexcept > { return _M_node_allocator().max_size(); } > > > key_equal > key_eq() const > { return this->_M_eq(); } > > > > > size_type > bucket_count() const noexcept > { return _M_bucket_count; } > > size_type > max_bucket_count() const noexcept > { return max_size(); } > > size_type > bucket_size(size_type __n) const > { return std::distance(begin(__n), end(__n)); } > > size_type > bucket(const key_type& __k) const > { return _M_bucket_index(__k, this->_M_hash_code(__k)); } > > local_iterator > begin(size_type __n) > { > return local_iterator(*this, _M_bucket_begin(__n), > __n, _M_bucket_count); > } > > local_iterator > end(size_type __n) > { return local_iterator(*this, nullptr, __n, _M_bucket_count); } > > const_local_iterator > begin(size_type __n) const > { > return const_local_iterator(*this, _M_bucket_begin(__n), > __n, _M_bucket_count); > } > > const_local_iterator > end(size_type __n) const > { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } > > > const_local_iterator > cbegin(size_type __n) const > { > return const_local_iterator(*this, _M_bucket_begin(__n), > __n, _M_bucket_count); > } > > const_local_iterator > cend(size_type __n) const > { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } > > float > load_factor() const noexcept > { > return static_cast<float>(size()) / static_cast<float>(bucket_count()); > } > > > > > > > const _RehashPolicy& > __rehash_policy() const > { return _M_rehash_policy; } > > void > __rehash_policy(const _RehashPolicy&); > > > iterator > find(const key_type& __k); > > const_iterator > find(const key_type& __k) const; > > size_type > count(const key_type& __k) const; > > std::pair<iterator, iterator> > equal_range(const key_type& __k); > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __k) const; > > protected: > > size_type > _M_bucket_index(__node_type* __n) const > { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } > > size_type > _M_bucket_index(const key_type& __k, __hash_code __c) const > { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); } > > > > __node_base* > _M_find_before_node(size_type, const key_type&, __hash_code) const; > > __node_type* > _M_find_node(size_type __bkt, const key_type& __key, > __hash_code __c) const > { > __node_base* __before_n = _M_find_before_node(__bkt, __key, __c); > if (__before_n) > return static_cast<__node_type*>(__before_n->_M_nxt); > return nullptr; > } > > > void > _M_insert_bucket_begin(size_type, __node_type*); > > > void > _M_remove_bucket_begin(size_type __bkt, __node_type* __next_n, > size_type __next_bkt); > > > __node_base* > _M_get_previous_node(size_type __bkt, __node_base* __n); > > > > > iterator > _M_insert_unique_node(size_type __bkt, __hash_code __code, > __node_type* __n); > > > > iterator > _M_insert_multi_node(__hash_code __code, __node_type* __n); > > template<typename... _Args> > std::pair<iterator, bool> > _M_emplace(std::true_type, _Args&&... __args); > > template<typename... _Args> > iterator > _M_emplace(std::false_type, _Args&&... __args); > > template<typename _Arg> > std::pair<iterator, bool> > _M_insert(_Arg&&, std::true_type); > > template<typename _Arg> > iterator > _M_insert(_Arg&&, std::false_type); > > size_type > _M_erase(std::true_type, const key_type&); > > size_type > _M_erase(std::false_type, const key_type&); > > iterator > _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n); > > public: > > template<typename... _Args> > __ireturn_type > emplace(_Args&&... __args) > { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); } > > template<typename... _Args> > iterator > emplace_hint(const_iterator, _Args&&... __args) > { return __iconv_type()(emplace(std::forward<_Args>(__args)...)); } > > > > > iterator > erase(const_iterator); > > > iterator > erase(iterator __it) > { return erase(const_iterator(__it)); } > > size_type > erase(const key_type& __k) > { return _M_erase(__unique_keys(), __k); } > > iterator > erase(const_iterator, const_iterator); > > void > clear() noexcept; > > > void rehash(size_type __n); > > > > > private: > > void _M_rehash_aux(size_type __n, std::true_type); > > > void _M_rehash_aux(size_type __n, std::false_type); > > > > void _M_rehash(size_type __n, const __rehash_state& __state); > }; > > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename... _Args> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>::__node_type* > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_allocate_node(_Args&&... __args) > { > __node_type* __n = _M_node_allocator().allocate(1); > try > { > _M_node_allocator().construct(__n, std::forward<_Args>(__args)...); > return __n; > } > catch(...) > { > _M_node_allocator().deallocate(__n, 1); > throw; > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_deallocate_node(__node_type* __n) > { > _M_node_allocator().destroy(__n); > _M_node_allocator().deallocate(__n, 1); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_deallocate_nodes(__node_type* __n) > { > while (__n) > { > __node_type* __tmp = __n; > __n = __n->_M_next(); > _M_deallocate_node(__tmp); > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>::__bucket_type* > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_allocate_buckets(size_type __n) > { > _Bucket_allocator_type __alloc(_M_node_allocator()); > > __bucket_type* __p = __alloc.allocate(__n); > __builtin_memset(__p, 0, __n * sizeof(__bucket_type)); > return __p; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_deallocate_buckets(__bucket_type* __p, size_type __n) > { > _Bucket_allocator_type __alloc(_M_node_allocator()); > __alloc.deallocate(__p, __n); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, _RehashPolicy, > _Traits>::__node_type* > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_bucket_begin(size_type __bkt) const > { > __node_base* __n = _M_buckets[__bkt]; > return __n ? static_cast<__node_type*>(__n->_M_nxt) : nullptr; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _Hashtable(size_type __bucket_hint, > const _H1& __h1, const _H2& __h2, const _Hash& __h, > const _Equal& __eq, const _ExtractKey& __exk, > const allocator_type& __a) > : __hashtable_base(__exk, __h1, __h2, __h, __eq), > __map_base(), > __rehash_base(), > _M_bucket_count(0), > _M_bbegin(__a), > _M_element_count(0), > _M_rehash_policy() > { > _M_bucket_count = _M_rehash_policy._M_next_bkt(__bucket_hint); > _M_buckets = _M_allocate_buckets(_M_bucket_count); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename _InputIterator> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _Hashtable(_InputIterator __f, _InputIterator __l, > size_type __bucket_hint, > const _H1& __h1, const _H2& __h2, const _Hash& __h, > const _Equal& __eq, const _ExtractKey& __exk, > const allocator_type& __a) > : __hashtable_base(__exk, __h1, __h2, __h, __eq), > __map_base(), > __rehash_base(), > _M_bucket_count(0), > _M_bbegin(__a), > _M_element_count(0), > _M_rehash_policy() > { > auto __nb_elems = __detail::__distance_fw(__f, __l); > _M_bucket_count = > _M_rehash_policy._M_next_bkt( > std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), > __bucket_hint)); > > _M_buckets = _M_allocate_buckets(_M_bucket_count); > try > { > for (; __f != __l; ++__f) > this->insert(*__f); > } > catch(...) > { > clear(); > _M_deallocate_buckets(_M_buckets, _M_bucket_count); > throw; > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _Hashtable(const _Hashtable& __ht) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > _M_bucket_count(__ht._M_bucket_count), > _M_bbegin(__ht._M_bbegin), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > _M_buckets = _M_allocate_buckets(_M_bucket_count); > try > { > if (!__ht._M_before_begin()._M_nxt) > return; > > > > const __node_type* __ht_n = __ht._M_begin(); > __node_type* __this_n = _M_allocate_node(__ht_n->_M_v); > this->_M_copy_code(__this_n, __ht_n); > _M_before_begin()._M_nxt = __this_n; > _M_buckets[_M_bucket_index(__this_n)] = &_M_before_begin(); > > > __node_base* __prev_n = __this_n; > for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) > { > __this_n = _M_allocate_node(__ht_n->_M_v); > __prev_n->_M_nxt = __this_n; > this->_M_copy_code(__this_n, __ht_n); > size_type __bkt = _M_bucket_index(__this_n); > if (!_M_buckets[__bkt]) > _M_buckets[__bkt] = __prev_n; > __prev_n = __this_n; > } > } > catch(...) > { > clear(); > _M_deallocate_buckets(_M_buckets, _M_bucket_count); > throw; > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _Hashtable(_Hashtable&& __ht) > : __hashtable_base(__ht), > __map_base(__ht), > __rehash_base(__ht), > _M_buckets(__ht._M_buckets), > _M_bucket_count(__ht._M_bucket_count), > _M_bbegin(std::move(__ht._M_bbegin)), > _M_element_count(__ht._M_element_count), > _M_rehash_policy(__ht._M_rehash_policy) > { > > if (_M_begin()) > _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin(); > __ht._M_rehash_policy = _RehashPolicy(); > __ht._M_bucket_count = __ht._M_rehash_policy._M_next_bkt(0); > __ht._M_buckets = __ht._M_allocate_buckets(__ht._M_bucket_count); > __ht._M_before_begin()._M_nxt = nullptr; > __ht._M_element_count = 0; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > ~_Hashtable() noexcept > { > clear(); > _M_deallocate_buckets(_M_buckets, _M_bucket_count); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > swap(_Hashtable& __x) > { > > > > this->_M_swap(__x); > > > > std::__alloc_swap<_Node_allocator_type>::_S_do_it(_M_node_allocator(), > __x._M_node_allocator()); > > std::swap(_M_rehash_policy, __x._M_rehash_policy); > std::swap(_M_buckets, __x._M_buckets); > std::swap(_M_bucket_count, __x._M_bucket_count); > std::swap(_M_before_begin()._M_nxt, __x._M_before_begin()._M_nxt); > std::swap(_M_element_count, __x._M_element_count); > > > > if (_M_begin()) > _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin(); > if (__x._M_begin()) > __x._M_buckets[__x._M_bucket_index(__x._M_begin())] > = &(__x._M_before_begin()); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > __rehash_policy(const _RehashPolicy& __pol) > { > size_type __n_bkt = __pol._M_bkt_for_elements(_M_element_count); > __n_bkt = __pol._M_next_bkt(__n_bkt); > if (__n_bkt != _M_bucket_count) > _M_rehash(__n_bkt, _M_rehash_policy._M_state()); > _M_rehash_policy = __pol; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > find(const key_type& __k) > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __n = _M_bucket_index(__k, __code); > __node_type* __p = _M_find_node(__n, __k, __code); > return __p ? iterator(__p) : this->end(); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::const_iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > find(const key_type& __k) const > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __n = _M_bucket_index(__k, __code); > __node_type* __p = _M_find_node(__n, __k, __code); > return __p ? const_iterator(__p) : this->end(); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::size_type > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > count(const key_type& __k) const > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __n = _M_bucket_index(__k, __code); > __node_type* __p = _M_bucket_begin(__n); > if (!__p) > return 0; > > std::size_t __result = 0; > for (;; __p = __p->_M_next()) > { > if (this->_M_equals(__k, __code, __p)) > ++__result; > else if (__result) > > > > break; > if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) > break; > } > return __result; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > std::pair<typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::iterator, > typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::iterator> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > equal_range(const key_type& __k) > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __n = _M_bucket_index(__k, __code); > __node_type* __p = _M_find_node(__n, __k, __code); > > if (__p) > { > __node_type* __p1 = __p->_M_next(); > while (__p1 && _M_bucket_index(__p1) == __n > && this->_M_equals(__k, __code, __p1)) > __p1 = __p1->_M_next(); > > return std::make_pair(iterator(__p), iterator(__p1)); > } > else > return std::make_pair(this->end(), this->end()); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > std::pair<typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::const_iterator, > typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::const_iterator> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > equal_range(const key_type& __k) const > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __n = _M_bucket_index(__k, __code); > __node_type* __p = _M_find_node(__n, __k, __code); > > if (__p) > { > __node_type* __p1 = __p->_M_next(); > while (__p1 && _M_bucket_index(__p1) == __n > && this->_M_equals(__k, __code, __p1)) > __p1 = __p1->_M_next(); > > return std::make_pair(const_iterator(__p), const_iterator(__p1)); > } > else > return std::make_pair(this->end(), this->end()); > } > > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, _RehashPolicy, > _Traits>::__node_base* > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_find_before_node(size_type __n, const key_type& __k, > __hash_code __code) const > { > __node_base* __prev_p = _M_buckets[__n]; > if (!__prev_p) > return nullptr; > __node_type* __p = static_cast<__node_type*>(__prev_p->_M_nxt); > for (;; __p = __p->_M_next()) > { > if (this->_M_equals(__k, __code, __p)) > return __prev_p; > if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) > break; > __prev_p = __p; > } > return nullptr; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_insert_bucket_begin(size_type __bkt, __node_type* __node) > { > if (_M_buckets[__bkt]) > { > > > __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; > _M_buckets[__bkt]->_M_nxt = __node; > } > else > { > > > > __node->_M_nxt = _M_before_begin()._M_nxt; > _M_before_begin()._M_nxt = __node; > if (__node->_M_nxt) > > > _M_buckets[_M_bucket_index(__node->_M_next())] = __node; > _M_buckets[__bkt] = &_M_before_begin(); > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_remove_bucket_begin(size_type __bkt, __node_type* __next, > size_type __next_bkt) > { > if (!__next || __next_bkt != __bkt) > { > > > if (__next) > _M_buckets[__next_bkt] = _M_buckets[__bkt]; > > > if (&_M_before_begin() == _M_buckets[__bkt]) > _M_before_begin()._M_nxt = __next; > _M_buckets[__bkt] = nullptr; > } > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, > _Equal, _H1, _H2, _Hash, _RehashPolicy, > _Traits>::__node_base* > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_get_previous_node(size_type __bkt, __node_base* __n) > { > __node_base* __prev_n = _M_buckets[__bkt]; > while (__prev_n->_M_nxt != __n) > __prev_n = __prev_n->_M_nxt; > return __prev_n; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename... _Args> > std::pair<typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::iterator, bool> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_emplace(std::true_type, _Args&&... __args) > { > > __node_type* __node = _M_allocate_node(std::forward<_Args>(__args)...); > const key_type& __k = this->_M_extract()(__node->_M_v); > __hash_code __code; > try > { > __code = this->_M_hash_code(__k); > } > catch(...) > { > _M_deallocate_node(__node); > throw; > } > > size_type __bkt = _M_bucket_index(__k, __code); > if (__node_type* __p = _M_find_node(__bkt, __k, __code)) > { > > _M_deallocate_node(__node); > return std::make_pair(iterator(__p), false); > } > > > return std::make_pair(_M_insert_unique_node(__bkt, __code, __node), > true); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename... _Args> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_emplace(std::false_type, _Args&&... __args) > { > > __node_type* __node = _M_allocate_node(std::forward<_Args>(__args)...); > > __hash_code __code; > try > { > __code = this->_M_hash_code(this->_M_extract()(__node->_M_v)); > } > catch(...) > { > _M_deallocate_node(__node); > throw; > } > > return _M_insert_multi_node(__code, __node); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_insert_unique_node(size_type __bkt, __hash_code __code, > __node_type* __node) > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > std::pair<bool, std::size_t> __do_rehash > = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); > > try > { > if (__do_rehash.first) > { > _M_rehash(__do_rehash.second, __saved_state); > __bkt = _M_bucket_index(this->_M_extract()(__node->_M_v), __code); > } > > this->_M_store_code(__node, __code); > > > _M_insert_bucket_begin(__bkt, __node); > ++_M_element_count; > return iterator(__node); > } > catch(...) > { > _M_deallocate_node(__node); > throw; > } > } > > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_insert_multi_node(__hash_code __code, __node_type* __node) > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > std::pair<bool, std::size_t> __do_rehash > = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); > > try > { > if (__do_rehash.first) > _M_rehash(__do_rehash.second, __saved_state); > > this->_M_store_code(__node, __code); > const key_type& __k = this->_M_extract()(__node->_M_v); > size_type __bkt = _M_bucket_index(__k, __code); > > > __node_base* __prev = _M_find_before_node(__bkt, __k, __code); > if (__prev) > { > > __node->_M_nxt = __prev->_M_nxt; > __prev->_M_nxt = __node; > } > else > > > > > _M_insert_bucket_begin(__bkt, __node); > ++_M_element_count; > return iterator(__node); > } > catch(...) > { > _M_deallocate_node(__node); > throw; > } > } > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename _Arg> > std::pair<typename _Hashtable<_Key, _Value, _Alloc, > _ExtractKey, _Equal, _H1, > _H2, _Hash, _RehashPolicy, > _Traits>::iterator, bool> > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_insert(_Arg&& __v, std::true_type) > { > const key_type& __k = this->_M_extract()(__v); > __hash_code __code = this->_M_hash_code(__k); > size_type __bkt = _M_bucket_index(__k, __code); > > __node_type* __n = _M_find_node(__bkt, __k, __code); > if (__n) > return std::make_pair(iterator(__n), false); > > __n = _M_allocate_node(std::forward<_Arg>(__v)); > return std::make_pair(_M_insert_unique_node(__bkt, __code, __n), true); > } > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > template<typename _Arg> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_insert(_Arg&& __v, std::false_type) > { > > > __hash_code __code = this->_M_hash_code(this->_M_extract()(__v)); > > > __node_type* __node = _M_allocate_node(std::forward<_Arg>(__v)); > > return _M_insert_multi_node(__code, __node); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > erase(const_iterator __it) > { > __node_type* __n = __it._M_cur; > std::size_t __bkt = _M_bucket_index(__n); > > > > > __node_base* __prev_n = _M_get_previous_node(__bkt, __n); > return _M_erase(__bkt, __prev_n, __n); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n) > { > if (__prev_n == _M_buckets[__bkt]) > _M_remove_bucket_begin(__bkt, __n->_M_next(), > __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); > else if (__n->_M_nxt) > { > size_type __next_bkt = _M_bucket_index(__n->_M_next()); > if (__next_bkt != __bkt) > _M_buckets[__next_bkt] = __prev_n; > } > > __prev_n->_M_nxt = __n->_M_nxt; > iterator __result(__n->_M_next()); > _M_deallocate_node(__n); > --_M_element_count; > > return __result; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::size_type > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_erase(std::true_type, const key_type& __k) > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __bkt = _M_bucket_index(__k, __code); > > > __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); > if (!__prev_n) > return 0; > > > __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); > _M_erase(__bkt, __prev_n, __n); > return 1; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::size_type > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_erase(std::false_type, const key_type& __k) > { > __hash_code __code = this->_M_hash_code(__k); > std::size_t __bkt = _M_bucket_index(__k, __code); > > > __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); > if (!__prev_n) > return 0; > > > > > > > > __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); > __node_type* __n_last = __n; > std::size_t __n_last_bkt = __bkt; > do > { > __n_last = __n_last->_M_next(); > if (!__n_last) > break; > __n_last_bkt = _M_bucket_index(__n_last); > } > while (__n_last_bkt == __bkt && this->_M_equals(__k, __code, __n_last)); > > > size_type __result = 0; > do > { > __node_type* __p = __n->_M_next(); > _M_deallocate_node(__n); > __n = __p; > ++__result; > --_M_element_count; > } > while (__n != __n_last); > > if (__prev_n == _M_buckets[__bkt]) > _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); > else if (__n_last && __n_last_bkt != __bkt) > _M_buckets[__n_last_bkt] = __prev_n; > __prev_n->_M_nxt = __n_last; > return __result; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > typename _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, > _Traits>::iterator > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > erase(const_iterator __first, const_iterator __last) > { > __node_type* __n = __first._M_cur; > __node_type* __last_n = __last._M_cur; > if (__n == __last_n) > return iterator(__n); > > std::size_t __bkt = _M_bucket_index(__n); > > __node_base* __prev_n = _M_get_previous_node(__bkt, __n); > bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); > std::size_t __n_bkt = __bkt; > for (;;) > { > do > { > __node_type* __tmp = __n; > __n = __n->_M_next(); > _M_deallocate_node(__tmp); > --_M_element_count; > if (!__n) > break; > __n_bkt = _M_bucket_index(__n); > } > while (__n != __last_n && __n_bkt == __bkt); > if (__is_bucket_begin) > _M_remove_bucket_begin(__bkt, __n, __n_bkt); > if (__n == __last_n) > break; > __is_bucket_begin = true; > __bkt = __n_bkt; > } > > if (__n && (__n_bkt != __bkt || __is_bucket_begin)) > _M_buckets[__n_bkt] = __prev_n; > __prev_n->_M_nxt = __n; > return iterator(__n); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > clear() noexcept > { > _M_deallocate_nodes(_M_begin()); > __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); > _M_element_count = 0; > _M_before_begin()._M_nxt = nullptr; > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > rehash(size_type __n) > { > const __rehash_state& __saved_state = _M_rehash_policy._M_state(); > std::size_t __buckets > = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), > __n); > __buckets = _M_rehash_policy._M_next_bkt(__buckets); > > if (__buckets != _M_bucket_count) > _M_rehash(__buckets, __saved_state); > else > > _M_rehash_policy._M_reset(__saved_state); > } > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_rehash(size_type __n, const __rehash_state& __state) > { > try > { > _M_rehash_aux(__n, __unique_keys()); > } > catch(...) > { > > > _M_rehash_policy._M_reset(__state); > throw; > } > } > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_rehash_aux(size_type __n, std::true_type) > { > __bucket_type* __new_buckets = _M_allocate_buckets(__n); > __node_type* __p = _M_begin(); > _M_before_begin()._M_nxt = nullptr; > std::size_t __bbegin_bkt = 0; > while (__p) > { > __node_type* __next = __p->_M_next(); > std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); > if (!__new_buckets[__bkt]) > { > __p->_M_nxt = _M_before_begin()._M_nxt; > _M_before_begin()._M_nxt = __p; > __new_buckets[__bkt] = &_M_before_begin(); > if (__p->_M_nxt) > __new_buckets[__bbegin_bkt] = __p; > __bbegin_bkt = __bkt; > } > else > { > __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; > __new_buckets[__bkt]->_M_nxt = __p; > } > __p = __next; > } > _M_deallocate_buckets(_M_buckets, _M_bucket_count); > _M_bucket_count = __n; > _M_buckets = __new_buckets; > } > > > > template<typename _Key, typename _Value, > typename _Alloc, typename _ExtractKey, typename _Equal, > typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, > typename _Traits> > void > _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, > _H1, _H2, _Hash, _RehashPolicy, _Traits>:: > _M_rehash_aux(size_type __n, std::false_type) > { > __bucket_type* __new_buckets = _M_allocate_buckets(__n); > > __node_type* __p = _M_begin(); > _M_before_begin()._M_nxt = nullptr; > std::size_t __bbegin_bkt = 0; > std::size_t __prev_bkt = 0; > __node_type* __prev_p = nullptr; > bool __check_bucket = false; > > while (__p) > { > __node_type* __next = __p->_M_next(); > std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); > > if (__prev_p && __prev_bkt == __bkt) > { > > > > __p->_M_nxt = __prev_p->_M_nxt; > __prev_p->_M_nxt = __p; > > > > > > > __check_bucket = true; > } > else > { > if (__check_bucket) > { > > > if (__prev_p->_M_nxt) > { > std::size_t __next_bkt > = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), > __n); > if (__next_bkt != __prev_bkt) > __new_buckets[__next_bkt] = __prev_p; > } > __check_bucket = false; > } > > if (!__new_buckets[__bkt]) > { > __p->_M_nxt = _M_before_begin()._M_nxt; > _M_before_begin()._M_nxt = __p; > __new_buckets[__bkt] = &_M_before_begin(); > if (__p->_M_nxt) > __new_buckets[__bbegin_bkt] = __p; > __bbegin_bkt = __bkt; > } > else > { > __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; > __new_buckets[__bkt]->_M_nxt = __p; > } > } > __prev_p = __p; > __prev_bkt = __bkt; > __p = __next; > } > > if (__check_bucket && __prev_p->_M_nxt) > { > std::size_t __next_bkt > = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), __n); > if (__next_bkt != __prev_bkt) > __new_buckets[__next_bkt] = __prev_p; > } > > _M_deallocate_buckets(_M_buckets, _M_bucket_count); > _M_bucket_count = __n; > _M_buckets = __new_buckets; > } > > >} ># 48 "/usr/include/c++/4.8.2/unordered_map" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/unordered_map.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<bool _Cache> > using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; > > template<typename _Key, > typename _Tp, > typename _Hash = hash<_Key>, > typename _Pred = std::equal_to<_Key>, > typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, > typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> > using __umap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>, > _Alloc, __detail::_Select1st, > _Pred, _Hash, > __detail::_Mod_range_hashing, > __detail::_Default_ranged_hash, > __detail::_Prime_rehash_policy, _Tr>; > > > template<bool _Cache> > using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; > > template<typename _Key, > typename _Tp, > typename _Hash = hash<_Key>, > typename _Pred = std::equal_to<_Key>, > typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, > typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> > using __ummap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>, > _Alloc, __detail::_Select1st, > _Pred, _Hash, > __detail::_Mod_range_hashing, > __detail::_Default_ranged_hash, > __detail::_Prime_rehash_policy, _Tr>; ># 93 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<class _Key, class _Tp, > class _Hash = hash<_Key>, > class _Pred = std::equal_to<_Key>, > class _Alloc = std::allocator<std::pair<const _Key, _Tp> > > > class unordered_map : __check_copy_constructible<_Alloc> > { > typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; > _Hashtable _M_h; > > public: > > > > typedef typename _Hashtable::key_type key_type; > typedef typename _Hashtable::value_type value_type; > typedef typename _Hashtable::mapped_type mapped_type; > typedef typename _Hashtable::hasher hasher; > typedef typename _Hashtable::key_equal key_equal; > typedef typename _Hashtable::allocator_type allocator_type; > > > > > typedef typename allocator_type::pointer pointer; > typedef typename allocator_type::const_pointer const_pointer; > typedef typename allocator_type::reference reference; > typedef typename allocator_type::const_reference const_reference; > typedef typename _Hashtable::iterator iterator; > typedef typename _Hashtable::const_iterator const_iterator; > typedef typename _Hashtable::local_iterator local_iterator; > typedef typename _Hashtable::const_local_iterator const_local_iterator; > typedef typename _Hashtable::size_type size_type; > typedef typename _Hashtable::difference_type difference_type; ># 137 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > explicit > unordered_map(size_type __n = 10, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 158 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename _InputIterator> > unordered_map(_InputIterator __f, _InputIterator __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__f, __l, __n, __hf, __eql, __a) > { } > > > unordered_map(const unordered_map&) = default; > > > unordered_map(unordered_map&&) = default; ># 184 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > unordered_map(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > > unordered_map& > operator=(const unordered_map&) = default; > > > unordered_map& > operator=(unordered_map&&) = default; ># 211 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > unordered_map& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } > > > > > > > > iterator > begin() noexcept > { return _M_h.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_h.end(); } > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 308 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 338 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 361 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_h.insert(__x); } > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > std::pair<iterator, bool> > insert(_Pair&& __x) > { return _M_h.insert(std::forward<_Pair>(__x)); } ># 395 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(const_iterator __hint, _Pair&& __x) > { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } ># 416 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 428 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } ># 446 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __it) > { return _M_h.erase(__it); } ># 468 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 486 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 509 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > swap(unordered_map& __x) > { _M_h.swap(__x._M_h); } > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 541 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 559 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 572 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } ># 594 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > mapped_type& > operator[](const key_type& __k) > { return _M_h[__k]; } > > mapped_type& > operator[](key_type&& __k) > { return _M_h[std::move(__k)]; } ># 611 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > mapped_type& > at(const key_type& __k) > { return _M_h.at(__k); } > > const mapped_type& > at(const key_type& __k) const > { return _M_h.at(__k); } > > > > > > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } > > > > > > > > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } ># 667 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 682 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } ># 693 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 730 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 741 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, > const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); > }; ># 774 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<class _Key, class _Tp, > class _Hash = hash<_Key>, > class _Pred = std::equal_to<_Key>, > class _Alloc = std::allocator<std::pair<const _Key, _Tp> > > > class unordered_multimap : __check_copy_constructible<_Alloc> > { > typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; > _Hashtable _M_h; > > public: > > > > typedef typename _Hashtable::key_type key_type; > typedef typename _Hashtable::value_type value_type; > typedef typename _Hashtable::mapped_type mapped_type; > typedef typename _Hashtable::hasher hasher; > typedef typename _Hashtable::key_equal key_equal; > typedef typename _Hashtable::allocator_type allocator_type; > > > > > typedef typename allocator_type::pointer pointer; > typedef typename allocator_type::const_pointer const_pointer; > typedef typename allocator_type::reference reference; > typedef typename allocator_type::const_reference const_reference; > typedef typename _Hashtable::iterator iterator; > typedef typename _Hashtable::const_iterator const_iterator; > typedef typename _Hashtable::local_iterator local_iterator; > typedef typename _Hashtable::const_local_iterator const_local_iterator; > typedef typename _Hashtable::size_type size_type; > typedef typename _Hashtable::difference_type difference_type; ># 818 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > explicit > unordered_multimap(size_type __n = 10, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 839 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename _InputIterator> > unordered_multimap(_InputIterator __f, _InputIterator __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__f, __l, __n, __hf, __eql, __a) > { } > > > unordered_multimap(const unordered_multimap&) = default; > > > unordered_multimap(unordered_multimap&&) = default; ># 865 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > unordered_multimap(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > > unordered_multimap& > operator=(const unordered_multimap&) = default; > > > unordered_multimap& > operator=(unordered_multimap&&) = default; ># 892 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > unordered_multimap& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } > > > > > > > > iterator > begin() noexcept > { return _M_h.begin(); } > > > > > > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > > > > > > const_iterator > end() const noexcept > { return _M_h.end(); } > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 985 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 1011 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 1026 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > insert(const value_type& __x) > { return _M_h.insert(__x); } > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(_Pair&& __x) > { return _M_h.insert(std::forward<_Pair>(__x)); } ># 1058 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > template<typename _Pair, typename = typename > std::enable_if<std::is_constructible<value_type, > _Pair&&>::value>::type> > iterator > insert(const_iterator __hint, _Pair&& __x) > { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } ># 1079 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 1092 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } ># 1110 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __it) > { return _M_h.erase(__it); } ># 1131 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 1150 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 1174 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > swap(unordered_multimap& __x) > { _M_h.swap(__x._M_h); } > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 1206 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } > > > > > > > > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 1231 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } > > > > > > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } > > > > > > > > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } ># 1287 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 1302 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } ># 1313 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 1350 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 1361 "/usr/include/c++/4.8.2/bits/unordered_map.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_multimap<_Key1, _Tp1, > _Hash1, _Pred1, _Alloc1>&, > const unordered_multimap<_Key1, _Tp1, > _Hash1, _Pred1, _Alloc1>&); > }; > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { __x.swap(__y); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { __x.swap(__y); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, > const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > >} ># 49 "/usr/include/c++/4.8.2/unordered_map" 2 3 ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/usr/include/c++/4.8.2/unordered_set" 1 3 ># 32 "/usr/include/c++/4.8.2/unordered_set" 3 > ># 33 "/usr/include/c++/4.8.2/unordered_set" 3 ># 48 "/usr/include/c++/4.8.2/unordered_set" 3 ># 1 "/usr/include/c++/4.8.2/bits/unordered_set.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<bool _Cache> > using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>; > > template<typename _Value, > typename _Hash = hash<_Value>, > typename _Pred = std::equal_to<_Value>, > typename _Alloc = std::allocator<_Value>, > typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>> > using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc, > __detail::_Identity, _Pred, _Hash, > __detail::_Mod_range_hashing, > __detail::_Default_ranged_hash, > __detail::_Prime_rehash_policy, _Tr>; > > > template<bool _Cache> > using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>; > > template<typename _Value, > typename _Hash = hash<_Value>, > typename _Pred = std::equal_to<_Value>, > typename _Alloc = std::allocator<_Value>, > typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>> > using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc, > __detail::_Identity, > _Pred, _Hash, > __detail::_Mod_range_hashing, > __detail::_Default_ranged_hash, > __detail::_Prime_rehash_policy, _Tr>; ># 89 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<class _Value, > class _Hash = hash<_Value>, > class _Pred = std::equal_to<_Value>, > class _Alloc = std::allocator<_Value> > > class unordered_set : __check_copy_constructible<_Alloc> > { > typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; > _Hashtable _M_h; > > public: > > > > typedef typename _Hashtable::key_type key_type; > typedef typename _Hashtable::value_type value_type; > typedef typename _Hashtable::hasher hasher; > typedef typename _Hashtable::key_equal key_equal; > typedef typename _Hashtable::allocator_type allocator_type; > > > > > typedef typename allocator_type::pointer pointer; > typedef typename allocator_type::const_pointer const_pointer; > typedef typename allocator_type::reference reference; > typedef typename allocator_type::const_reference const_reference; > typedef typename _Hashtable::iterator iterator; > typedef typename _Hashtable::const_iterator const_iterator; > typedef typename _Hashtable::local_iterator local_iterator; > typedef typename _Hashtable::const_local_iterator const_local_iterator; > typedef typename _Hashtable::size_type size_type; > typedef typename _Hashtable::difference_type difference_type; ># 131 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > explicit > unordered_set(size_type __n = 10, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 152 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename _InputIterator> > unordered_set(_InputIterator __f, _InputIterator __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__f, __l, __n, __hf, __eql, __a) > { } > > > unordered_set(const unordered_set&) = default; > > > unordered_set(unordered_set&&) = default; ># 178 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > unordered_set(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > > unordered_set& > operator=(const unordered_set&) = default; > > > unordered_set& > operator=(unordered_set&&) = default; ># 205 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > unordered_set& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } ># 242 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > begin() noexcept > { return _M_h.begin(); } > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > const_iterator > end() const noexcept > { return _M_h.end(); } > > > > > > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 298 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename... _Args> > std::pair<iterator, bool> > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 324 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 343 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > std::pair<iterator, bool> > insert(const value_type& __x) > { return _M_h.insert(__x); } > > std::pair<iterator, bool> > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } ># 372 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } ># 390 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 402 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } ># 420 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __it) > { return _M_h.erase(__it); } ># 442 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 460 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } > > > > > > > > void > clear() noexcept > { _M_h.clear(); } ># 483 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > swap(unordered_set& __x) > { _M_h.swap(__x._M_h); } > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 515 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } ># 533 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 546 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } > > > > > > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } ># 592 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } > > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 612 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } > > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 653 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 664 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Value1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, > const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&); > }; ># 694 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<class _Value, > class _Hash = hash<_Value>, > class _Pred = std::equal_to<_Value>, > class _Alloc = std::allocator<_Value> > > class unordered_multiset : __check_copy_constructible<_Alloc> > { > typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; > _Hashtable _M_h; > > public: > > > > typedef typename _Hashtable::key_type key_type; > typedef typename _Hashtable::value_type value_type; > typedef typename _Hashtable::hasher hasher; > typedef typename _Hashtable::key_equal key_equal; > typedef typename _Hashtable::allocator_type allocator_type; > > > > > typedef typename allocator_type::pointer pointer; > typedef typename allocator_type::const_pointer const_pointer; > typedef typename allocator_type::reference reference; > typedef typename allocator_type::const_reference const_reference; > typedef typename _Hashtable::iterator iterator; > typedef typename _Hashtable::const_iterator const_iterator; > typedef typename _Hashtable::local_iterator local_iterator; > typedef typename _Hashtable::const_local_iterator const_local_iterator; > typedef typename _Hashtable::size_type size_type; > typedef typename _Hashtable::difference_type difference_type; ># 736 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > explicit > unordered_multiset(size_type __n = 10, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__n, __hf, __eql, __a) > { } ># 757 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename _InputIterator> > unordered_multiset(_InputIterator __f, _InputIterator __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__f, __l, __n, __hf, __eql, __a) > { } > > > unordered_multiset(const unordered_multiset&) = default; > > > unordered_multiset(unordered_multiset&&) = default; ># 783 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > unordered_multiset(initializer_list<value_type> __l, > size_type __n = 0, > const hasher& __hf = hasher(), > const key_equal& __eql = key_equal(), > const allocator_type& __a = allocator_type()) > : _M_h(__l, __n, __hf, __eql, __a) > { } > > > unordered_multiset& > operator=(const unordered_multiset&) = default; > > > unordered_multiset& > operator=(unordered_multiset&& __x) = default; ># 810 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > unordered_multiset& > operator=(initializer_list<value_type> __l) > { > _M_h = __l; > return *this; > } > > > > allocator_type > get_allocator() const noexcept > { return _M_h.get_allocator(); } > > > > > bool > empty() const noexcept > { return _M_h.empty(); } > > > size_type > size() const noexcept > { return _M_h.size(); } > > > size_type > max_size() const noexcept > { return _M_h.max_size(); } ># 847 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > begin() noexcept > { return _M_h.begin(); } > > const_iterator > begin() const noexcept > { return _M_h.begin(); } > > > > > > > > iterator > end() noexcept > { return _M_h.end(); } > > const_iterator > end() const noexcept > { return _M_h.end(); } > > > > > > > const_iterator > cbegin() const noexcept > { return _M_h.begin(); } > > > > > > const_iterator > cend() const noexcept > { return _M_h.end(); } ># 895 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace(_Args&&... __args) > { return _M_h.emplace(std::forward<_Args>(__args)...); } ># 917 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename... _Args> > iterator > emplace_hint(const_iterator __pos, _Args&&... __args) > { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ># 930 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > insert(const value_type& __x) > { return _M_h.insert(__x); } > > iterator > insert(value_type&& __x) > { return _M_h.insert(std::move(__x)); } ># 956 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > insert(const_iterator __hint, const value_type& __x) > { return _M_h.insert(__hint, __x); } > > iterator > insert(const_iterator __hint, value_type&& __x) > { return _M_h.insert(__hint, std::move(__x)); } ># 973 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > template<typename _InputIterator> > void > insert(_InputIterator __first, _InputIterator __last) > { _M_h.insert(__first, __last); } ># 985 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > insert(initializer_list<value_type> __l) > { _M_h.insert(__l); } ># 1004 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > erase(const_iterator __position) > { return _M_h.erase(__position); } > > > iterator > erase(iterator __it) > { return _M_h.erase(__it); } ># 1027 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > size_type > erase(const key_type& __x) > { return _M_h.erase(__x); } ># 1047 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > erase(const_iterator __first, const_iterator __last) > { return _M_h.erase(__first, __last); } ># 1058 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > clear() noexcept > { _M_h.clear(); } ># 1071 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > swap(unordered_multiset& __x) > { _M_h.swap(__x._M_h); } > > > > > > hasher > hash_function() const > { return _M_h.hash_function(); } > > > > key_equal > key_eq() const > { return _M_h.key_eq(); } ># 1103 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > iterator > find(const key_type& __x) > { return _M_h.find(__x); } > > const_iterator > find(const key_type& __x) const > { return _M_h.find(__x); } > > > > > > > > size_type > count(const key_type& __x) const > { return _M_h.count(__x); } ># 1128 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > std::pair<iterator, iterator> > equal_range(const key_type& __x) > { return _M_h.equal_range(__x); } > > std::pair<const_iterator, const_iterator> > equal_range(const key_type& __x) const > { return _M_h.equal_range(__x); } > > > > > > size_type > bucket_count() const noexcept > { return _M_h.bucket_count(); } > > > size_type > max_bucket_count() const noexcept > { return _M_h.max_bucket_count(); } > > > > > > > size_type > bucket_size(size_type __n) const > { return _M_h.bucket_size(__n); } > > > > > > > size_type > bucket(const key_type& __key) const > { return _M_h.bucket(__key); } ># 1174 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > local_iterator > begin(size_type __n) > { return _M_h.begin(__n); } > > const_local_iterator > begin(size_type __n) const > { return _M_h.begin(__n); } > > const_local_iterator > cbegin(size_type __n) const > { return _M_h.cbegin(__n); } ># 1194 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > local_iterator > end(size_type __n) > { return _M_h.end(__n); } > > const_local_iterator > end(size_type __n) const > { return _M_h.end(__n); } > > const_local_iterator > cend(size_type __n) const > { return _M_h.cend(__n); } > > > > > > float > load_factor() const noexcept > { return _M_h.load_factor(); } > > > > float > max_load_factor() const noexcept > { return _M_h.max_load_factor(); } > > > > > > void > max_load_factor(float __z) > { _M_h.max_load_factor(__z); } ># 1235 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > rehash(size_type __n) > { _M_h.rehash(__n); } ># 1246 "/usr/include/c++/4.8.2/bits/unordered_set.h" 3 > void > reserve(size_type __n) > { _M_h.reserve(__n); } > > template<typename _Value1, typename _Hash1, typename _Pred1, > typename _Alloc1> > friend bool > operator==(const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, > const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&); > }; > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > { __x.swap(__y); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline void > swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > { __x.swap(__y); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > { return __x._M_h._M_equal(__y._M_h); } > > template<class _Value, class _Hash, class _Pred, class _Alloc> > inline bool > operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, > const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) > { return !(__x == __y); } > > >} ># 49 "/usr/include/c++/4.8.2/unordered_set" 2 3 ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/optional.h" 1 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_type_traits.h" 1 > > ># 1 "/usr/include/c++/4.8.2/functional" 1 3 ># 46 "/usr/include/c++/4.8.2/functional" 3 > ># 47 "/usr/include/c++/4.8.2/functional" 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/typeinfo" 1 3 ># 32 "/usr/include/c++/4.8.2/typeinfo" 3 > ># 33 "/usr/include/c++/4.8.2/typeinfo" 3 > > > > > > >#pragma GCC visibility push(default) > >extern "C++" { > >namespace __cxxabiv1 >{ > class __class_type_info; >} ># 80 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/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 ># 54 "/usr/include/c++/4.8.2/functional" 2 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > template<typename _MemberPointer> > class _Mem_fn; > template<typename _Tp, typename _Class> > _Mem_fn<_Tp _Class::*> > mem_fn(_Tp _Class::*) noexcept; > >template<typename _Tp> class __has_result_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::result_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_result_type : integral_constant<bool, __has_result_type_helper <typename remove_cv<_Tp>::type>::value> { }; > > > template<bool _Has_result_type, typename _Functor> > struct _Maybe_get_result_type > { }; > > template<typename _Functor> > struct _Maybe_get_result_type<true, _Functor> > { typedef typename _Functor::result_type result_type; }; > > > > > > template<typename _Functor> > struct _Weak_result_type_impl > : _Maybe_get_result_type<__has_result_type<_Functor>::value, _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...) const> > { typedef _Res result_type; }; > > template<typename _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(_ArgTypes......) const> > { typedef _Res result_type; }; > > template<typename _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile> > { typedef _Res result_type; }; > > template<typename _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile> > { typedef _Res result_type; }; > > template<typename _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile> > { typedef _Res result_type; }; > > template<typename _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile> > { 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 _Res, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)> > { typedef _Res result_type; }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)> > { typedef _Res result_type; }; > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)> > { typedef _Res result_type; }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const> > { typedef _Res result_type; }; > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const> > { typedef _Res result_type; }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile> > { typedef _Res result_type; }; > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile> > { typedef _Res result_type; }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) > const volatile> > { typedef _Res result_type; }; > > template<typename _Res, typename _Class, typename... _ArgTypes> > struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) > const volatile> > { typedef _Res result_type; }; > > > > > > template<typename _Functor> > struct _Weak_result_type > : _Weak_result_type_impl<typename remove_cv<_Functor>::type> > { }; > > > template<typename _Tp> > struct _Derives_from_unary_function : __sfinae_types > { > private: > template<typename _T1, typename _Res> > static __one __test(const volatile unary_function<_T1, _Res>*); > > > > static __two __test(...); > > public: > static const bool value = sizeof(__test((_Tp*)0)) == 1; > }; > > > template<typename _Tp> > struct _Derives_from_binary_function : __sfinae_types > { > private: > template<typename _T1, typename _T2, typename _Res> > static __one __test(const volatile binary_function<_T1, _T2, _Res>*); > > > > static __two __test(...); > > public: > static const bool value = sizeof(__test((_Tp*)0)) == 1; > }; > > > > > > template<typename _Functor, typename... _Args> > inline > typename enable_if< > (!is_member_pointer<_Functor>::value > && !is_function<_Functor>::value > && !is_function<typename remove_pointer<_Functor>::type>::value), > typename result_of<_Functor&(_Args&&...)>::type > >::type > __invoke(_Functor& __f, _Args&&... __args) > { > return __f(std::forward<_Args>(__args)...); > } > > template<typename _Functor, typename... _Args> > inline > typename enable_if< > (is_member_pointer<_Functor>::value > && !is_function<_Functor>::value > && !is_function<typename remove_pointer<_Functor>::type>::value), > typename result_of<_Functor(_Args&&...)>::type > >::type > __invoke(_Functor& __f, _Args&&... __args) > { > return std::mem_fn(__f)(std::forward<_Args>(__args)...); > } > > > template<typename _Functor, typename... _Args> > inline > typename enable_if< > (is_pointer<_Functor>::value > && is_function<typename remove_pointer<_Functor>::type>::value), > typename result_of<_Functor(_Args&&...)>::type > >::type > __invoke(_Functor __f, _Args&&... __args) > { > return __f(std::forward<_Args>(__args)...); > } > > > > > > > template<bool _Unary, bool _Binary, typename _Tp> > struct _Reference_wrapper_base_impl; > > > template<typename _Tp> > struct _Reference_wrapper_base_impl<false, false, _Tp> > : _Weak_result_type<_Tp> > { }; > > > template<typename _Tp> > struct _Reference_wrapper_base_impl<true, false, _Tp> > : _Weak_result_type<_Tp> > { > typedef typename _Tp::argument_type argument_type; > }; > > > template<typename _Tp> > struct _Reference_wrapper_base_impl<false, true, _Tp> > : _Weak_result_type<_Tp> > { > 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_impl<true, true, _Tp> > : _Weak_result_type<_Tp> > { > typedef typename _Tp::argument_type argument_type; > typedef typename _Tp::first_argument_type first_argument_type; > typedef typename _Tp::second_argument_type second_argument_type; > }; > > template<typename _Tp> class __has_argument_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::argument_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_argument_type : integral_constant<bool, __has_argument_type_helper <typename remove_cv<_Tp>::type>::value> { }; > template<typename _Tp> class __has_first_argument_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::first_argument_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_first_argument_type : integral_constant<bool, __has_first_argument_type_helper <typename remove_cv<_Tp>::type>::value> { }; > template<typename _Tp> class __has_second_argument_type_helper : __sfinae_types { template<typename _Up> struct _Wrap_type { }; template<typename _Up> static __one __test(_Wrap_type<typename _Up::second_argument_type>*); template<typename _Up> static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template<typename _Tp> struct __has_second_argument_type : integral_constant<bool, __has_second_argument_type_helper <typename remove_cv<_Tp>::type>::value> { }; > > > > > > > > template<typename _Tp> > struct _Reference_wrapper_base > : _Reference_wrapper_base_impl< > __has_argument_type<_Tp>::value, > __has_first_argument_type<_Tp>::value > && __has_second_argument_type<_Tp>::value, > _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 _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 _Res, typename _T1> > struct _Reference_wrapper_base<_Res (_T1::*)() const> > : unary_function<const _T1*, _Res> > { }; > > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const> > : binary_function<const _T1*, _T2, _Res> > { }; > > > template<typename _Res, typename _T1> > struct _Reference_wrapper_base<_Res (_T1::*)() volatile> > : unary_function<volatile _T1*, _Res> > { }; > > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile> > : binary_function<volatile _T1*, _T2, _Res> > { }; > > > template<typename _Res, typename _T1> > struct _Reference_wrapper_base<_Res (_T1::*)() const volatile> > : unary_function<const volatile _T1*, _Res> > { }; > > > template<typename _Res, typename _T1, typename _T2> > struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile> > : binary_function<const volatile _T1*, _T2, _Res> > { }; > > > > > > > template<typename _Tp> > class reference_wrapper > : public _Reference_wrapper_base<typename remove_cv<_Tp>::type> > { > _Tp* _M_data; > > public: > typedef _Tp type; > > reference_wrapper(_Tp& __indata) noexcept > : _M_data(std::__addressof(__indata)) > { } > > reference_wrapper(_Tp&&) = delete; > > reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept > : _M_data(__inref._M_data) > { } > > reference_wrapper& > operator=(const reference_wrapper<_Tp>& __inref) noexcept > { > _M_data = __inref._M_data; > return *this; > } > > 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 __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 ref(__t.get()); } > > > template<typename _Tp> > inline reference_wrapper<const _Tp> > cref(reference_wrapper<_Tp> __t) noexcept > { return cref(__t.get()); } > > > > template<typename... _Types> > struct _Pack : integral_constant<size_t, sizeof...(_Types)> > { }; > > template<typename _From, typename _To, bool = _From::value == _To::value> > struct _AllConvertible : false_type > { }; > > template<typename... _From, typename... _To> > struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true> > : __and_<is_convertible<_From, _To>...> > { }; > > template<typename _Tp1, typename _Tp2> > using _NotSame = __not_<is_same<typename std::decay<_Tp1>::type, > typename std::decay<_Tp2>::type>>; > > > > > > > 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 _Res, typename _Class, typename... _ArgTypes> > class _Mem_fn<_Res (_Class::*)(_ArgTypes...)> > : public _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...> > { > typedef _Res (_Class::*_Functor)(_ArgTypes...); > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __object, const volatile _Class *, > _Args&&... __args) const > { > return (std::forward<_Tp>(__object).*__pmf) > (std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const > { return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); } > > > template<typename... _Args> > using _RequireValidArgs > = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > > > template<typename _Tp, typename... _Args> > using _RequireValidArgs2 > = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > > > template<typename _Tp, typename... _Args> > using _RequireValidArgs3 > = _Require<is_base_of<_Class, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > public: > typedef _Res result_type; > > explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(_Class& __object, _Args&&... __args) const > { return (__object.*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(_Class&& __object, _Args&&... __args) const > { > return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...); > } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(_Class* __object, _Args&&... __args) const > { return (__object->*__pmf)(std::forward<_Args>(__args)...); } > > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs2<_Tp, _Args...>> > _Res > operator()(_Tp&& __object, _Args&&... __args) const > { > return _M_call(std::forward<_Tp>(__object), &__object, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs3<_Tp, _Args...>> > _Res > operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const > { return operator()(__ref.get(), std::forward<_Args>(__args)...); } > > private: > _Functor __pmf; > }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const> > : public _Maybe_unary_or_binary_function<_Res, const _Class*, > _ArgTypes...> > { > typedef _Res (_Class::*_Functor)(_ArgTypes...) const; > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __object, const volatile _Class *, > _Args&&... __args) const > { > return (std::forward<_Tp>(__object).*__pmf) > (std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const > { return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args> > using _RequireValidArgs > = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs2 > = _Require<_NotSame<_Class, _Tp>, _NotSame<const _Class*, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs3 > = _Require<is_base_of<_Class, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > public: > typedef _Res result_type; > > explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const _Class& __object, _Args&&... __args) const > { return (__object.*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const _Class&& __object, _Args&&... __args) const > { > return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...); > } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const _Class* __object, _Args&&... __args) const > { return (__object->*__pmf)(std::forward<_Args>(__args)...); } > > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs2<_Tp, _Args...>> > _Res operator()(_Tp&& __object, _Args&&... __args) const > { > return _M_call(std::forward<_Tp>(__object), &__object, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs3<_Tp, _Args...>> > _Res > operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const > { return operator()(__ref.get(), std::forward<_Args>(__args)...); } > > private: > _Functor __pmf; > }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > class _Mem_fn<_Res (_Class::*)(_ArgTypes...) volatile> > : public _Maybe_unary_or_binary_function<_Res, volatile _Class*, > _ArgTypes...> > { > typedef _Res (_Class::*_Functor)(_ArgTypes...) volatile; > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __object, const volatile _Class *, > _Args&&... __args) const > { > return (std::forward<_Tp>(__object).*__pmf) > (std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const > { return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args> > using _RequireValidArgs > = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs2 > = _Require<_NotSame<_Class, _Tp>, _NotSame<volatile _Class*, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs3 > = _Require<is_base_of<_Class, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > public: > typedef _Res result_type; > > explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(volatile _Class& __object, _Args&&... __args) const > { return (__object.*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(volatile _Class&& __object, _Args&&... __args) const > { > return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...); > } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(volatile _Class* __object, _Args&&... __args) const > { return (__object->*__pmf)(std::forward<_Args>(__args)...); } > > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs2<_Tp, _Args...>> > _Res > operator()(_Tp&& __object, _Args&&... __args) const > { > return _M_call(std::forward<_Tp>(__object), &__object, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs3<_Tp, _Args...>> > _Res > operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const > { return operator()(__ref.get(), std::forward<_Args>(__args)...); } > > private: > _Functor __pmf; > }; > > > template<typename _Res, typename _Class, typename... _ArgTypes> > class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const volatile> > : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*, > _ArgTypes...> > { > typedef _Res (_Class::*_Functor)(_ArgTypes...) const volatile; > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __object, const volatile _Class *, > _Args&&... __args) const > { > return (std::forward<_Tp>(__object).*__pmf) > (std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args> > _Res > _M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const > { return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args> > using _RequireValidArgs > = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs2 > = _Require<_NotSame<_Class, _Tp>, > _NotSame<const volatile _Class*, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > template<typename _Tp, typename... _Args> > using _RequireValidArgs3 > = _Require<is_base_of<_Class, _Tp>, > _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>; > > public: > typedef _Res result_type; > > explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const volatile _Class& __object, _Args&&... __args) const > { return (__object.*__pmf)(std::forward<_Args>(__args)...); } > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const volatile _Class&& __object, _Args&&... __args) const > { > return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...); > } > > > template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>> > _Res > operator()(const volatile _Class* __object, _Args&&... __args) const > { return (__object->*__pmf)(std::forward<_Args>(__args)...); } > > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs2<_Tp, _Args...>> > _Res operator()(_Tp&& __object, _Args&&... __args) const > { > return _M_call(std::forward<_Tp>(__object), &__object, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, typename... _Args, > typename _Req = _RequireValidArgs3<_Tp, _Args...>> > _Res > operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const > { return operator()(__ref.get(), std::forward<_Args>(__args)...); } > > private: > _Functor __pmf; > }; > > > template<typename _Tp, bool> > struct _Mem_fn_const_or_non > { > typedef const _Tp& type; > }; > > template<typename _Tp> > struct _Mem_fn_const_or_non<_Tp, false> > { > typedef _Tp& type; > }; > > template<typename _Res, typename _Class> > class _Mem_fn<_Res _Class::*> > { > using __pm_type = _Res _Class::*; > > > > > template<typename _Tp> > auto > _M_call(_Tp&& __object, const _Class *) const noexcept > -> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>()) > { return std::forward<_Tp>(__object).*__pm; } > > template<typename _Tp, typename _Up> > auto > _M_call(_Tp&& __object, _Up * const *) const noexcept > -> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>()) > { return (*std::forward<_Tp>(__object)).*__pm; } > > template<typename _Tp> > auto > _M_call(_Tp&& __ptr, const volatile void*) const > noexcept(noexcept((*__ptr).*std::declval<__pm_type&>())) > -> decltype((*__ptr).*std::declval<__pm_type&>()) > { return (*__ptr).*__pm; } > > public: > explicit > _Mem_fn(_Res _Class::*__pm) noexcept : __pm(__pm) { } > > > _Res& > operator()(_Class& __object) const noexcept > { return __object.*__pm; } > > const _Res& > operator()(const _Class& __object) const noexcept > { return __object.*__pm; } > > _Res&& > operator()(_Class&& __object) const noexcept > { return std::forward<_Class>(__object).*__pm; } > > const _Res&& > operator()(const _Class&& __object) const noexcept > { return std::forward<const _Class>(__object).*__pm; } > > > _Res& > operator()(_Class* __object) const noexcept > { return __object->*__pm; } > > const _Res& > operator()(const _Class* __object) const noexcept > { return __object->*__pm; } > > > template<typename _Tp, typename _Req = _Require<_NotSame<_Class*, _Tp>>> > auto > operator()(_Tp&& __unknown) const > noexcept(noexcept(std::declval<_Mem_fn*>()->_M_call > (std::forward<_Tp>(__unknown), &__unknown))) > -> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown)) > { return _M_call(std::forward<_Tp>(__unknown), &__unknown); } > > template<typename _Tp, typename _Req = _Require<is_base_of<_Class, _Tp>>> > auto > operator()(reference_wrapper<_Tp> __ref) const > noexcept(noexcept(std::declval<_Mem_fn&>()(__ref.get()))) > -> decltype((*this)(__ref.get())) > { return (*this)(__ref.get()); } > > private: > _Res _Class::*__pm; > }; ># 959 "/usr/include/c++/4.8.2/functional" 3 > template<typename _Tp, typename _Class> > inline _Mem_fn<_Tp _Class::*> > mem_fn(_Tp _Class::* __pm) noexcept > { > return _Mem_fn<_Tp _Class::*>(__pm); > } > > > > > > > > template<typename _Tp> > struct is_bind_expression > : public false_type { }; > > > > > > > template<typename _Tp> > struct is_placeholder > : public integral_constant<int, 0> > { }; > > > > > 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> > { }; > > > > > > struct _No_tuple_element; > > > > > > > template<std::size_t __i, typename _Tuple, bool _IsSafe> > struct _Safe_tuple_element_impl > : tuple_element<__i, _Tuple> { }; > > > > > > > template<std::size_t __i, typename _Tuple> > struct _Safe_tuple_element_impl<__i, _Tuple, false> > { > typedef _No_tuple_element type; > }; > > > > > > template<std::size_t __i, typename _Tuple> > struct _Safe_tuple_element > : _Safe_tuple_element_impl<__i, _Tuple, > (__i < tuple_size<_Tuple>::value)> > { }; ># 1100 "/usr/include/c++/4.8.2/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: > typedef _Tp& result_type; > > > > > > template<typename _CVRef, typename _Tuple> > result_type > 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::forward<_Args>(get<_Indexes>(__tuple))...); > } > }; > > > > > > > template<typename _Arg> > class _Mu<_Arg, false, true> > { > public: > template<typename _Signature> class result; > > template<typename _CVMu, typename _CVArg, typename _Tuple> > class result<_CVMu(_CVArg, _Tuple)> > { > > > > typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value > - 1), _Tuple>::type > __base_type; > > public: > typedef typename add_rvalue_reference<__base_type>::type type; > }; > > template<typename _Tuple> > typename result<_Mu(_Arg, _Tuple)>::type > operator()(const volatile _Arg&, _Tuple& __tuple) const volatile > { > return std::forward<typename result<_Mu(_Arg, _Tuple)>::type>( > ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple)); > } > }; > > > > > > > template<typename _Arg> > class _Mu<_Arg, false, false> > { > public: > template<typename _Signature> struct result; > > template<typename _CVMu, typename _CVArg, typename _Tuple> > struct result<_CVMu(_CVArg, _Tuple)> > { > typedef typename add_lvalue_reference<_CVArg>::type type; > }; > > > template<typename _CVArg, typename _Tuple> > _CVArg&& > operator()(_CVArg&& __arg, _Tuple&) const volatile > { return std::forward<_CVArg>(__arg); } > }; > > > > > > > template<typename _Tp> > struct _Maybe_wrap_member_pointer > { > typedef _Tp type; > > static const _Tp& > __do_wrap(const _Tp& __x) > { return __x; } > > static _Tp&& > __do_wrap(_Tp&& __x) > { return static_cast<_Tp&&>(__x); } > }; > > > > > > > template<typename _Tp, typename _Class> > struct _Maybe_wrap_member_pointer<_Tp _Class::*> > { > typedef _Mem_fn<_Tp _Class::*> type; > > static type > __do_wrap(_Tp _Class::* __pm) > { return type(__pm); } > }; > > > > > > template<> > struct _Maybe_wrap_member_pointer<void> > { > typedef void type; > }; > > > template<std::size_t _Ind, typename... _Tp> > inline auto > __volget(volatile tuple<_Tp...>& __tuple) > -> typename tuple_element<_Ind, tuple<_Tp...>>::type 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) > -> typename tuple_element<_Ind, tuple<_Tp...>>::type 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 _Bind __self_type; > 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 _M_f(_Mu<_Bound_args>() > (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 _M_f(_Mu<_Bound_args>() > (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 _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 _M_f(_Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > 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 > = decltype( std::declval<_Functor>()( > _Mu<_Bound_args>()( std::declval<_Bound_args&>(), > std::declval<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 > = decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0), > typename add_const<_Functor>::type>::type>()( > _Mu<_Bound_args>()( std::declval<const _Bound_args&>(), > std::declval<tuple<_Args...>&>() )... ) )> > _Result > operator()(_Args&&... __args) const > { > return this->__call_c<_Result>( > std::forward_as_tuple(std::forward<_Args>(__args)...), > _Bound_indexes()); > } > > > template<typename... _Args, typename _Result > = decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0), > typename add_volatile<_Functor>::type>::type>()( > _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(), > std::declval<tuple<_Args...>&>() )... ) )> > _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 > = decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0), > typename add_cv<_Functor>::type>::type>()( > _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(), > std::declval<tuple<_Args...>&>() )... ) )> > _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 _Bind_result __self_type; > typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type > _Bound_indexes; > > _Functor _M_f; > tuple<_Bound_args...> _M_bound_args; > > > template<typename _Res> > struct __enable_if_void : enable_if<is_void<_Res>::value, int> { }; > template<typename _Res> > struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { }; > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Result > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __disable_if_void<_Res>::type = 0) > { > return _M_f(_Mu<_Bound_args>() > (get<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > void > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __enable_if_void<_Res>::type = 0) > { > _M_f(_Mu<_Bound_args>() > (get<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Result > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __disable_if_void<_Res>::type = 0) const > { > return _M_f(_Mu<_Bound_args>() > (get<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > void > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __enable_if_void<_Res>::type = 0) const > { > _M_f(_Mu<_Bound_args>() > (get<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Result > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __disable_if_void<_Res>::type = 0) volatile > { > return _M_f(_Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > void > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __enable_if_void<_Res>::type = 0) volatile > { > _M_f(_Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > _Result > __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, > typename __disable_if_void<_Res>::type = 0) const volatile > { > return _M_f(_Mu<_Bound_args>() > (__volget<_Indexes>(_M_bound_args), __args)...); > } > > > template<typename _Res, typename... _Args, std::size_t... _Indexes> > void > __call(tuple<_Args...>&& __args, > _Index_tuple<_Indexes...>, > typename __enable_if_void<_Res>::type = 0) const volatile > { > _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 _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 > { > typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type> > __maybe_type; > typedef typename __maybe_type::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; > typedef typename __helper_type::__maybe_type __maybe_type; > typedef typename __helper_type::type __result_type; > return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), > std::forward<_BoundArgs>(__args)...); > } > > template<typename _Result, typename _Func, typename... _BoundArgs> > struct _Bindres_helper > { > typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type> > __maybe_type; > typedef typename __maybe_type::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; > typedef typename __helper_type::__maybe_type __maybe_type; > typedef typename __helper_type::type __result_type; > return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), > std::forward<_BoundArgs>(__args)...); > } > > template<typename _Signature> > struct _Bind_simple; > > template<typename _Callable, typename... _Args> > struct _Bind_simple<_Callable(_Args...)> > { > typedef typename result_of<_Callable(_Args...)>::type result_type; > > template<typename... _Args2, typename = typename > enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type> > explicit > _Bind_simple(const _Callable& __callable, _Args2&&... __args) > : _M_bound(__callable, std::forward<_Args2>(__args)...) > { } > > template<typename... _Args2, typename = typename > enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type> > explicit > _Bind_simple(_Callable&& __callable, _Args2&&... __args) > : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...) > { } > > _Bind_simple(const _Bind_simple&) = default; > _Bind_simple(_Bind_simple&&) = default; > > result_type > operator()() > { > typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices; > return _M_invoke(_Indices()); > } > > private: > > template<std::size_t... _Indices> > typename result_of<_Callable(_Args...)>::type > _M_invoke(_Index_tuple<_Indices...>) > { > > > return std::forward<_Callable>(std::get<0>(_M_bound))( > std::forward<_Args>(std::get<_Indices+1>(_M_bound))...); > } > > std::tuple<_Callable, _Args...> _M_bound; > }; > > template<typename _Func, typename... _BoundArgs> > struct _Bind_simple_helper > { > typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type> > __maybe_type; > typedef typename __maybe_type::type __func_type; > typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)> > __type; > }; > > > > template<typename _Callable, typename... _Args> > typename _Bind_simple_helper<_Callable, _Args...>::__type > __bind_simple(_Callable&& __callable, _Args&&... __args) > { > typedef _Bind_simple_helper<_Callable, _Args...> __helper_type; > typedef typename __helper_type::__maybe_type __maybe_type; > typedef typename __helper_type::__type __result_type; > return __result_type( > __maybe_type::__do_wrap( std::forward<_Callable>(__callable)), > std::forward<_Args>(__args)...); > } > > > > > > > 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 > : integral_constant<bool, (is_pointer<_Tp>::value > || is_member_pointer<_Tp>::value)> > { }; > > 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 _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 _Functor> > inline _Functor& > __callable_functor(_Functor& __f) > { return __f; } > > template<typename _Member, typename _Class> > inline _Mem_fn<_Member _Class::*> > __callable_functor(_Member _Class::* &__p) > { return std::mem_fn(__p); } > > template<typename _Member, typename _Class> > inline _Mem_fn<_Member _Class::*> > __callable_functor(_Member _Class::* const &__p) > { return std::mem_fn(__p); } > > template<typename _Member, typename _Class> > inline _Mem_fn<_Member _Class::*> > __callable_functor(_Member _Class::* volatile &__p) > { return std::mem_fn(__p); } > > template<typename _Member, typename _Class> > inline _Mem_fn<_Member _Class::*> > __callable_functor(_Member _Class::* const volatile &__p) > { return std::mem_fn(__p); } > > template<typename _Signature> > class function; > > > class _Function_base > { > public: > static const std::size_t _M_max_size = sizeof(_Nocopy_types); > static const std::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) > { > const _Functor* __ptr = > __stored_locally? std::__addressof(__source._M_access<_Functor>()) > : __source._M_access<_Functor*>(); > return const_cast<_Functor*>(__ptr); > } > > > > 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<_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* const& __fp) > { return __fp; } > > template<typename _Class, typename _Tp> > static bool > _M_not_empty_function(_Tp _Class::* const& __mp) > { return __mp; } > > 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)); } > }; > > template<typename _Functor> > class _Ref_manager : public _Base_manager<_Functor*> > { > typedef _Function_base::_Base_manager<_Functor*> _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); > return is_const<_Functor>::value; > break; > > default: > _Base::_M_manager(__dest, __source, __op); > } > return false; > } > > static void > _M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f) > { > _Base::_M_init_functor(__functor, std::__addressof(__f.get())); > } > }; > > _Function_base() : _M_manager(0) { } > > ~_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 _Res, typename _Functor, typename... _ArgTypes> > class _Function_handler<_Res(_ArgTypes...), reference_wrapper<_Functor> > > : public _Function_base::_Ref_manager<_Functor> > { > typedef _Function_base::_Ref_manager<_Functor> _Base; > > public: > static _Res > _M_invoke(const _Any_data& __functor, _ArgTypes... __args) > { > return __callable_functor(**_Base::_M_get_pointer(__functor))( > std::forward<_ArgTypes>(__args)...); > } > }; > > template<typename _Functor, typename... _ArgTypes> > class _Function_handler<void(_ArgTypes...), reference_wrapper<_Functor> > > : public _Function_base::_Ref_manager<_Functor> > { > typedef _Function_base::_Ref_manager<_Functor> _Base; > > public: > static void > _M_invoke(const _Any_data& __functor, _ArgTypes... __args) > { > __callable_functor(**_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::mem_fn(_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::mem_fn(_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_convertible<_From, _To>>; > > > > > > > > template<typename _Res, typename... _ArgTypes> > class function<_Res(_ArgTypes...)> > : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, > private _Function_base > { > typedef _Res _Signature_type(_ArgTypes...); > > template<typename _Functor> > using _Invoke = decltype(__callable_functor(std::declval<_Functor&>()) > (std::declval<_ArgTypes>()...) ); > > > > template<typename _Tp> > using _NotSelf = __not_<is_same<_Tp, function>>; > > template<typename _Functor> > using _Callable > = __and_<_NotSelf<_Functor>, > __check_func_return_type<_Invoke<_Functor>, _Res>>; > > 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() { } ># 2224 "/usr/include/c++/4.8.2/functional" 3 > function(const function& __x); ># 2233 "/usr/include/c++/4.8.2/functional" 3 > function(function&& __x) : _Function_base() > { > __x.swap(*this); > } ># 2256 "/usr/include/c++/4.8.2/functional" 3 > template<typename _Functor, > typename = _Requires<_Callable<_Functor>, void>> > function(_Functor); ># 2272 "/usr/include/c++/4.8.2/functional" 3 > function& > operator=(const function& __x) > { > function(__x).swap(*this); > return *this; > } ># 2290 "/usr/include/c++/4.8.2/functional" 3 > function& > operator=(function&& __x) > { > function(std::move(__x)).swap(*this); > return *this; > } ># 2304 "/usr/include/c++/4.8.2/functional" 3 > function& > operator=(nullptr_t) > { > if (_M_manager) > { > _M_manager(_M_functor, _M_functor, __destroy_functor); > _M_manager = 0; > _M_invoker = 0; > } > return *this; > } ># 2332 "/usr/include/c++/4.8.2/functional" 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; > } ># 2358 "/usr/include/c++/4.8.2/functional" 3 > void swap(function& __x) > { > std::swap(_M_functor, __x._M_functor); > std::swap(_M_manager, __x._M_manager); > std::swap(_M_invoker, __x._M_invoker); > } ># 2386 "/usr/include/c++/4.8.2/functional" 3 > explicit operator bool() const noexcept > { return !_M_empty(); } ># 2399 "/usr/include/c++/4.8.2/functional" 3 > _Res operator()(_ArgTypes... __args) const; ># 2412 "/usr/include/c++/4.8.2/functional" 3 > const type_info& target_type() const noexcept; ># 2423 "/usr/include/c++/4.8.2/functional" 3 > template<typename _Functor> _Functor* target() noexcept; > > > template<typename _Functor> const _Functor* target() const noexcept; > > > private: > typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...); > _Invoker_type _M_invoker; > }; > > > 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> > function<_Res(_ArgTypes...)>:: > function(_Functor __f) > : _Function_base() > { > typedef _Function_handler<_Signature_type, _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 > { > if (typeid(_Functor) == target_type() && _M_manager) > { > _Any_data __ptr; > if (_M_manager(__ptr, _M_functor, __get_functor_ptr) > && !is_const<_Functor>::value) > return 0; > else > return __ptr._M_access<_Functor*>(); > } > else > return 0; > } > > 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 0; > } ># 2535 "/usr/include/c++/4.8.2/functional" 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); } ># 2553 "/usr/include/c++/4.8.2/functional" 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); } ># 2571 "/usr/include/c++/4.8.2/functional" 3 > template<typename _Res, typename... _Args> > inline void > swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) > { __x.swap(__y); } > > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_type_traits.h" 2 > > >namespace hsh >{ > > template<bool B, class T = void > > using enable_if_t = typename std::enable_if<B, T>::type; > > template <class T> > struct type_identity { using type = T; }; > > template <class T> > using type_identity_t = typename type_identity<T>::type; > > template<bool B, class T, class F > > using conditional_t = typename std::conditional<B, T, F>::type; > > > template<class T> > using decay_t = typename std::decay<T>::type; > > template <class T> > using add_cv_t = typename std::add_cv<T>::type; > > template< class T > > using add_const_t = typename std::add_const<T>::type; > > template< class T > > using add_volatile_t = typename std::add_volatile<T>::type; > > template<class T> > using add_pointer_t = typename std::add_pointer<T>::type; > > template<class T> > using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type; > > template<class T> > using add_rvalue_reference_t = typename std::add_rvalue_reference<T>::type; > > > template<class T> > using remove_reference_t = typename std::remove_reference<T>::type; > > > template< class T > > using remove_cv_t = typename std::remove_cv<T>::type; > > > template< class T > > using remove_const_t = typename std::remove_const<T>::type; > > > template<class T> > using remove_volatile_t = typename std::remove_volatile<T>::type; > > > template<class T> > struct remove_cvref { using type = hsh::remove_cv_t<hsh::remove_reference_t<T>>; }; > > > template< class T > > using remove_cvref_t = typename remove_cvref<T>::type; > > > template< class T > > using remove_pointer_t = typename std::remove_pointer<T>::type; > > > template< class T > > using remove_extent_t = typename std::remove_extent<T>::type; > > template<class T> > using remove_all_extents_t = typename std::remove_all_extents<T>::type; > > > template< class... > > using void_t = void; > > template< class T > > struct is_null_pointer : std::is_same<std::nullptr_t, hsh::remove_cv_t<T>> {}; > > template <bool B> > using bool_constant = std::integral_constant<bool, B>; > > template <size_t N> > using size_constant = std::integral_constant<size_t, N>; > > > > > > template <typename... Ts> > struct conjunction; > > template <typename T, typename... Ts> > struct conjunction<T, Ts...> : std::conditional<T::value, conjunction<Ts...>, T>::type {}; > > template <typename T> > struct conjunction<T> : T {}; > > template <> > struct conjunction<> : std::true_type {}; > > > > > template <typename... Ts> > struct disjunction; > > template<class T, class... Ts> > struct disjunction<T, Ts...> : std::conditional<bool(T::value), T, disjunction<Ts...>>::type { }; > > template<class T> > struct disjunction<T> : T { }; > > template<> > struct disjunction<> : std::false_type { }; > > > > > template <typename T> > struct negation : bool_constant<!T::value> {}; > > > > template <typename T> > struct is_trivially_destructible : bool_constant<conjunction<bool_constant<__has_trivial_destructor(T)>, std::is_destructible<T>>::value> {}; > > template <typename T> > struct is_trivially_default_constructible > : bool_constant<conjunction<bool_constant<__has_trivial_constructor(T)>, std::is_default_constructible<T>, is_trivially_destructible<T>>::value> {}; > > template <class T> > struct is_copy_or_move_constructible : disjunction<std::is_move_constructible<T>, std::is_copy_constructible<T>> {}; > > template <class T> > struct is_copy_or_move_assignable : disjunction<std::is_move_assignable<T>, std::is_copy_assignable<T>> {}; ># 154 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_type_traits.h" > template <typename T> > struct is_trivially_copyable > : bool_constant<conjunction< > disjunction<bool_constant<__has_trivial_copy(remove_all_extents_t<T>)>, negation<is_copy_or_move_constructible<remove_all_extents_t<T>>>>, > disjunction<bool_constant<__has_trivial_assign(remove_all_extents_t<T>)>, negation<is_copy_or_move_assignable<remove_all_extents_t<T>>>>, > disjunction<is_copy_or_move_constructible<remove_all_extents_t<T>>, is_copy_or_move_assignable<remove_all_extents_t<T>>>, > is_trivially_destructible<remove_all_extents_t<T>>, > negation<std::is_reference<remove_all_extents_t<T>>>>::value>{}; > > template <typename T> > struct is_trivially_copy_constructible > : bool_constant<conjunction<std::is_copy_constructible<T>, bool_constant<__has_trivial_copy(T)>>::value> {}; > > template <typename T> > struct is_trivially_move_constructible : bool_constant<conjunction<std::is_move_constructible<T>, bool_constant<__has_trivial_copy(T)>>::value> {}; > > template <typename T> > struct is_trivially_copy_assignable > : bool_constant<conjunction<std::is_copy_assignable<T>, bool_constant<__has_trivial_assign(T)>>::value> {}; > > template <typename T> > struct is_trivially_move_assignable > : bool_constant<conjunction<std::is_move_assignable<T>, bool_constant<__has_trivial_assign(T)>>::value> {}; > > > > template <typename> > struct is_std_array : std::false_type {}; > > template <typename T, size_t N> > struct is_std_array<std::array<T, N>> : std::true_type {}; > > > template<class> > struct is_unbounded_array : std::false_type {}; > template<class T> > struct is_unbounded_array<T[]> : std::true_type {}; > > > template<class> > struct is_bounded_array : std::false_type {}; > template<class T, std::size_t N> > struct is_bounded_array<T[N]> : std::true_type {}; > > template<typename T> > struct is_reference_wrapper : std::false_type {}; > > template<typename T> > struct is_reference_wrapper<std::reference_wrapper<T>> : std::true_type {}; > > > > > > > > enum class copy_traits { copy = 0, move = 1, none = 2 }; > > > template <copy_traits> > class ctor_base; > > template<> > struct ctor_base<copy_traits::copy> > { > constexpr ctor_base() noexcept = default; > constexpr ctor_base(const ctor_base&) = default; > constexpr ctor_base(ctor_base&&) = default; > ctor_base& operator=(const ctor_base&) noexcept = default; > ctor_base& operator=(ctor_base&&) noexcept = default; > }; > > template<> > struct ctor_base<copy_traits::move> > { > constexpr ctor_base() noexcept = default; > constexpr ctor_base(const ctor_base&) = delete; > constexpr ctor_base(ctor_base&&) = default; > ctor_base& operator=(const ctor_base&) noexcept = default; > ctor_base& operator=(ctor_base&&) noexcept = default; > }; > > template<> > struct ctor_base<copy_traits::none> > { > constexpr ctor_base() noexcept = default; > constexpr ctor_base(const ctor_base&) = delete; > constexpr ctor_base(ctor_base&&) = delete; > ctor_base& operator=(const ctor_base&) noexcept = default; > ctor_base& operator=(ctor_base&&) noexcept = default; > }; > > > template <copy_traits> > class assign_base; > > template<> > struct assign_base<copy_traits::copy> > { > constexpr assign_base() noexcept = default; > constexpr assign_base(const assign_base&) = default; > constexpr assign_base(assign_base&&) = default; > assign_base& operator=(const assign_base&) noexcept = default; > assign_base& operator=(assign_base&&) noexcept = default; > }; > > template<> > struct assign_base<copy_traits::move> > { > constexpr assign_base() noexcept = default; > constexpr assign_base(const assign_base&) = default; > constexpr assign_base(assign_base&&) = default; > assign_base& operator=(const assign_base&) noexcept = delete; > assign_base& operator=(assign_base&&) noexcept = default; > }; > > template<> > struct assign_base<copy_traits::none> > { > constexpr assign_base() noexcept = default; > constexpr assign_base(const assign_base&) = default; > constexpr assign_base(assign_base&&) = default; > assign_base& operator=(const assign_base&) noexcept = delete; > assign_base& operator=(assign_base&&) noexcept = delete; > }; > > template <typename T> > struct ctor_copy_traits { > static constexpr copy_traits traits = > std::is_copy_constructible<T>::value ? copy_traits::copy : std::is_move_constructible<T>::value ? copy_traits::move : copy_traits::none; > }; > > template <typename T> > struct assign_copy_traits { > static constexpr copy_traits traits = > hsh::conjunction<std::is_copy_assignable<T>, std::is_copy_constructible<T>>::value > ? copy_traits::copy : hsh::conjunction<std::is_move_assignable<T>, std::is_move_constructible<T>>::value ? copy_traits::move : copy_traits::none; > }; > > > enum class operation_support_trait { trivial = 0, available = 1, unavailable = 2 }; > > template <typename... Types> > struct copy_constructor_traits > { > static constexpr operation_support_trait traits = conjunction<is_trivially_copy_constructible<Types>...>::value ? > operation_support_trait::trivial : conjunction<std::is_copy_constructible<Types>...>::value ? operation_support_trait::available : operation_support_trait::unavailable; > }; > > template <typename... Types> > struct move_constructor_traits > { > static constexpr operation_support_trait traits = conjunction<is_trivially_move_constructible<Types>...>::value ? > operation_support_trait::trivial : conjunction<std::is_move_constructible<Types>...>::value ? operation_support_trait::available : operation_support_trait::unavailable; > }; > > template <typename... Types> > struct copy_assignment_traits > { > static constexpr operation_support_trait traits = conjunction<is_trivially_copy_assignable<Types>...>::value ? > operation_support_trait::trivial : conjunction<std::is_copy_assignable<Types>...>::value ? operation_support_trait::available : operation_support_trait::unavailable; > }; > > template <typename... Types> > struct move_assignment_traits > { > static constexpr operation_support_trait traits = conjunction<is_trivially_move_assignable<Types>...>::value ? > operation_support_trait::trivial : conjunction<std::is_move_assignable<Types>...>::value ? operation_support_trait::available : operation_support_trait::unavailable; > }; > > template<typename... Types> > struct destructor_traits > { > static constexpr operation_support_trait traits = conjunction<is_trivially_destructible<Types>...>::value ? > operation_support_trait::trivial : conjunction<std::is_destructible<Types>...>::value ? operation_support_trait::available : operation_support_trait::unavailable; > }; > > > struct unused {}; > > namespace detail > { > template <typename T> > constexpr T&& fwd(hsh::remove_reference_t<T>& t) noexcept { return static_cast<T&&>(t); } > > enum class invoke_arg_type { object = 0, ref_wrapper = 1, pointer_type = 2 }; > > template<typename C, typename T> > struct invoke_arg_type_trait > { > static constexpr invoke_arg_type value = std::is_base_of<C, decay_t<T>>::value ? invoke_arg_type::object > : is_reference_wrapper<decay_t<T>>::value ? invoke_arg_type::ref_wrapper : invoke_arg_type::pointer_type; > }; > > template<bool IsFunctionPtr, invoke_arg_type> > struct Invoker {}; > > template<> > struct Invoker<true, invoke_arg_type::object> > { > template <typename R, typename C, typename T, typename... Args> > inline static constexpr auto invoke(R C::*func, T &&obj, Args &&... args) noexcept(noexcept((fwd<T>(obj).*func)(fwd<Args>(args)...))) > -> decltype((fwd<T>(obj).*func)(fwd<Args>(args)...)) > { > return (fwd<T>(obj).*func)(fwd<Args>(args)...); > } > }; > > template<> > struct Invoker<true, invoke_arg_type::ref_wrapper> > { > template <typename R, typename C, typename T, typename... Args> > inline static constexpr auto invoke(R C::*func, T &&obj, Args&&... args) noexcept(noexcept((fwd<T>(obj).get().*func)(fwd<Args>(args)...))) > -> decltype((fwd<T>(obj).get().*func)(fwd<Args>(args)...)) > { > return (obj.get().*func)(fwd<Args>(args)...); > } > }; > > template<> > struct Invoker<true, invoke_arg_type::pointer_type> > { > template <typename R, typename C, typename T, typename... Args> > inline static constexpr auto invoke(R C::*func, T &&obj, Args &&... args) noexcept(noexcept(((*fwd<T>(obj)).*func)(fwd<Args>(args)...))) > -> decltype(((*fwd<T>(obj)).*func)(fwd<Args>(args)...)) > { > return ((*fwd<T>(obj)).*func)(fwd<Args>(args)...); > } > }; > > template<> > struct Invoker<false, invoke_arg_type::object> > { > template <typename R, typename C, typename T> > inline static constexpr auto invoke(R C::*member, T &&obj) noexcept -> decltype(fwd<T>(obj).*member){ > return fwd<T>(obj).*member; > } > }; > > template<> > struct Invoker<false, invoke_arg_type::ref_wrapper> > { > template <typename R, typename C, typename T> > inline static constexpr auto invoke(R C::*member, T &&obj) noexcept -> decltype(fwd<T>(obj).get().*member){ > return obj.get().*member; > } > }; > > template<> > struct Invoker<false, invoke_arg_type::pointer_type> > { > template <typename R, typename C, typename T> > inline static constexpr auto invoke(R C::*member, T &&obj) noexcept -> decltype((*fwd<T>(obj)).*member){ > return (*fwd<T>(obj)).*member; > } > }; > > template <typename R, typename C, typename T, typename... Args, typename Invker = Invoker<std::is_function<R>::value, invoke_arg_type_trait<C, T>::value>> > inline constexpr auto invoke_impl(R C::*f, T &&obj, Args &&... args) noexcept(noexcept(Invker::invoke(f, fwd<T>(obj), fwd<Args>(args)...))) > -> decltype(Invker::invoke(f, fwd<T>(obj), fwd<Args>(args)...)) > { > return Invker::invoke(f, fwd<T>(obj), fwd<Args>(args)...); > } > > template <typename F, typename... Args> > inline constexpr auto invoke_impl(F&& f, Args &&... args) noexcept(noexcept(fwd<F>(f)(fwd<Args>(args)...))) > -> decltype(fwd<F>(f)(fwd<Args>(args)...)) > { > return fwd<F>(f)(fwd<Args>(args)...); > } > > template <class Ret, class F, class ...Args> > struct invokable_r > { > template <class Fn, class ...Args2> > static auto try_call(int) -> decltype(invoke_impl(std::declval<Fn>(), std::declval<Args2>()...)); > > template <class Fn, class ...Args2> > static unused try_call(...); > > using Result = decltype(try_call<F, Args...>(0)); > > static constexpr bool value = conditional_t<negation<std::is_same<Result, unused>>::value, > conditional_t<std::is_void<Ret>::value, std::true_type, std::is_convertible<Result, Ret>>, std::false_type>::value; > }; > > template <class F, class ...Args> > struct invoke_of : public std::enable_if<invokable_r<void, F, Args...>::value, typename invokable_r<void, F, Args...>::Result> {}; > > template <typename F, typename... Args> > struct is_invoke_nothrow : bool_constant<noexcept(invoke_impl(std::declval<decay_t<F>>(), std::declval<Args>()...))> {}; > } > > > template <typename F, typename... Args> > using invoke_result = detail::invoke_of<F, Args...>; > > template <typename F, typename... Args> > using invoke_result_t = typename invoke_result<F, Args...>::type; > > > template <class F, class ...Args> > using is_invocable = detail::invokable_r<void, F, Args...>; > > template <class Ret, class F, class ...Args> > using is_invocable_r = detail::invokable_r<Ret, F, Args...>; > > > > > template <typename F, typename... Args> > struct is_nothrow_invocable : conjunction<is_invocable<F, Args...>, detail::is_invoke_nothrow<F, Args...>> {}; > > template <typename R, typename F, typename... Args> > struct is_nothrow_invocable_r : conjunction<is_invocable_r<R, F, Args...>, detail::is_invoke_nothrow<F, Args...>> {}; > > > template <typename T, std::size_t N> > struct static_array > { > constexpr const T &operator[](std::size_t index) const { return data[index]; } > T data[N == 0 ? 1 : N]; > }; > > > template <size_t I0, size_t ...in> > struct static_min; > > template <size_t I0> > struct static_min<I0> { static constexpr size_t value = I0; }; > > template <size_t I0, size_t I1, size_t ...in> > struct static_min<I0, I1, in...> { > static constexpr size_t value = I0 <= I1 ? static_min<I0, in...>::value : static_min<I1, in...>::value; > }; > > template <size_t I0, size_t ... in> > struct static_max; > > template <size_t I0> > struct static_max<I0> { static constexpr size_t value = I0; }; > > template <size_t I0, size_t I1, size_t ... in> > struct static_max<I0, I1, in...> { > static constexpr size_t value = I0 >= I1 ? static_max<I0, in...>::value : static_max<I1, in...>::value; > }; > > constexpr bool static_conjunction(bool b) noexcept { return b; } > > template <typename... Bs> > constexpr bool static_conjunction(bool b, Bs... bs) noexcept { return b ? static_conjunction(bs...) : false; } > > > > template <size_t N, size_t Align = alignof(void*)> > using aligned_storage_t = typename std::aligned_storage<N, Align>::type; > > > template <class T> > using aligned_storage_for_t = aligned_storage_t<sizeof(T), alignof(T)>; > > > template <std::size_t Len, class... Types> > struct aligned_union > { > static constexpr std::size_t alignment_value = static_max<alignof(Types)...>::value; > using type = aligned_storage_t<static_max<Len, sizeof(Types)...>::value, alignment_value>; > }; > > > template< std::size_t Len, class... Types > > using aligned_union_t = typename aligned_union<Len, Types...>::type; > > > template<class... Types> > using aligned_union_for_t = aligned_union_t<static_max<sizeof(Types)...>::value, Types...>; > > namespace detail > { > namespace swappable > { > using std::swap; > > template <class T, class U = T, bool NotVoid = conjunction<negation<std::is_void<T>>, negation<std::is_void<U>>>::value> > struct swappable_with > { > template <class LHS, class RHS> > static decltype(swap(std::declval<LHS>(), std::declval<RHS>())) test_swap(int); > > template <class, class> > static unused test_swap(long); > > static constexpr bool value = conjunction<negation<std::is_same<decltype(test_swap<T, U>(0)), unused>>, negation<std::is_same<decltype(test_swap<U, T>(0)), unused>>>::value; > }; > > template <class T, class U> > struct swappable_with<T, U, false> : std::false_type {}; > > template <class T, class U = T, bool Swappable = swappable_with<T, U>::value> > struct nothrow_swappable_with > : conjunction<bool_constant<noexcept(swap(std::declval<T>(), std::declval<U>()))>, bool_constant<noexcept(swap(std::declval<U>(), std::declval<T>()))>> {}; > > template <class T, class U> > struct nothrow_swappable_with<T, U, false> : std::false_type {}; > } > } > > > template <class T, class U> > using is_swappable_with = detail::swappable::swappable_with<T, U>; > > > template< class T, class U > > using is_nothrow_swappable_with = detail::swappable::nothrow_swappable_with<T, U>; > > > template <class T> > using is_swappable = detail::swappable::swappable_with<T&>; > > > template <class T> > using is_nothrow_swappable = detail::swappable::nothrow_swappable_with<T&>; > > namespace detail > { > template <class T> > struct hashable > { > template <class X> > static decltype(std::declval<std::hash<X>>()(std::declval<X>())) test_hash(int); > > template <class> > static unused test_hash(long); > > static constexpr bool value = negation<std::is_same<decltype(test_hash<T>(0)), unused>>::value; > }; > > template <class T, bool = hashable<T>::value> > struct no_throw_hashable : bool_constant<noexcept(std::declval<std::hash<T>>()(std::declval<T>()))> {}; > > template<class T> > struct no_throw_hashable<T, false> : std::false_type {}; > } > > template <class T> > using is_hashable = detail::hashable<T>; > > template <class T> > using is_nothrow_hashable = detail::no_throw_hashable<T>; > >} ># 3 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/optional.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/utility.h" 1 > > ># 1 "/usr/include/c++/4.8.2/memory" 1 3 ># 46 "/usr/include/c++/4.8.2/memory" 3 > ># 47 "/usr/include/c++/4.8.2/memory" 3 ># 66 "/usr/include/c++/4.8.2/memory" 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_tempbuf.h" 1 3 ># 62 "/usr/include/c++/4.8.2/bits/stl_tempbuf.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 83 "/usr/include/c++/4.8.2/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++/4.8.2/bits/stl_tempbuf.h" 3 > template<typename _Tp> > inline void > return_temporary_buffer(_Tp* __p) > { ::operator delete(__p, std::nothrow); } > > > > > > > > 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 __first, _ForwardIterator __last); > > ~_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++/4.8.2/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 __first, _ForwardIterator __last) > : _M_original_len(std::distance(__first, __last)), > _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, > __first); > } > catch(...) > { > std::return_temporary_buffer(_M_buffer); > _M_buffer = 0; > _M_len = 0; > throw; > } > } > > >} ># 67 "/usr/include/c++/4.8.2/memory" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_raw_storage_iter.h" 1 3 ># 59 "/usr/include/c++/4.8.2/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<_OutputIterator, _Tp>& > operator++() > { > ++_M_iter; > return *this; > } > > raw_storage_iterator<_OutputIterator, _Tp> > operator++(int) > { > raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; > ++_M_iter; > return __tmp; > } > }; > > >} ># 68 "/usr/include/c++/4.8.2/memory" 2 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/ext/concurrence.h" 1 3 ># 32 "/usr/include/c++/4.8.2/ext/concurrence.h" 3 > ># 33 "/usr/include/c++/4.8.2/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; ># 67 "/usr/include/c++/4.8.2/ext/concurrence.h" 3 > 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() > { > > > > > } ># 147 "/usr/include/c++/4.8.2/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() > { > > > > > } ># 202 "/usr/include/c++/4.8.2/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, (void *) 0, 0, 0 } }; > > > > > __cond(const __cond&); > __cond& operator=(const __cond&); > > public: > __cond() > { > > > > > } ># 280 "/usr/include/c++/4.8.2/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++/4.8.2/memory" 2 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/bits/unique_ptr.h" 1 3 ># 39 "/usr/include/c++/4.8.2/bits/unique_ptr.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > > template<typename> class auto_ptr; > > > > 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(sizeof(_Tp)>0, > "can't delete pointer to incomplete type"); > delete __ptr; > } > }; > > > > > template<typename _Tp> > struct default_delete<_Tp[]> > { > private: > 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: > constexpr default_delete() noexcept = default; > > template<typename _Up, typename = typename > enable_if<!__is_derived_Tp<_Up>::value>::type> > default_delete(const default_delete<_Up[]>&) noexcept { } > > void > operator()(_Tp* __ptr) const > { > static_assert(sizeof(_Tp)>0, > "can't delete pointer to incomplete type"); > delete [] __ptr; > } > > template<typename _Up> > typename enable_if<__is_derived_Tp<_Up>::value>::type > operator()(_Up*) const = delete; > }; > > > template <typename _Tp, typename _Dp = default_delete<_Tp> > > class unique_ptr > { > > class _Pointer > { > template<typename _Up> > static typename _Up::pointer __test(typename _Up::pointer*); > > template<typename _Up> > static _Tp* __test(...); > > typedef typename remove_reference<_Dp>::type _Del; > > public: > typedef decltype(__test<_Del>(0)) type; > }; > > typedef std::tuple<typename _Pointer::type, _Dp> __tuple_type; > __tuple_type _M_t; > > public: > typedef typename _Pointer::type pointer; > typedef _Tp element_type; > typedef _Dp deleter_type; > > > constexpr unique_ptr() noexcept > : _M_t() > { static_assert(!is_pointer<deleter_type>::value, > "constructed with null function pointer deleter"); } > > explicit > unique_ptr(pointer __p) noexcept > : _M_t(__p, deleter_type()) > { static_assert(!is_pointer<deleter_type>::value, > "constructed with null function pointer deleter"); } > > unique_ptr(pointer __p, > typename conditional<is_reference<deleter_type>::value, > deleter_type, const deleter_type&>::type __d) noexcept > : _M_t(__p, __d) { } > > unique_ptr(pointer __p, > typename remove_reference<deleter_type>::type&& __d) noexcept > : _M_t(std::move(__p), std::move(__d)) > { static_assert(!std::is_reference<deleter_type>::value, > "rvalue deleter bound to reference"); } > > constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } > > > unique_ptr(unique_ptr&& __u) noexcept > : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } > > template<typename _Up, typename _Ep, typename = _Require< > is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>, > __not_<is_array<_Up>>, > 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())) > { } > > > template<typename _Up, typename = _Require< > is_convertible<_Up*, _Tp*>, is_same<_Dp, default_delete<_Tp>>>> > unique_ptr(auto_ptr<_Up>&& __u) noexcept; > > > > ~unique_ptr() noexcept > { > auto& __ptr = std::get<0>(_M_t); > if (__ptr != nullptr) > get_deleter()(__ptr); > __ptr = pointer(); > } > > > unique_ptr& > operator=(unique_ptr&& __u) noexcept > { > reset(__u.release()); > get_deleter() = std::forward<deleter_type>(__u.get_deleter()); > return *this; > } > > template<typename _Up, typename _Ep> > typename enable_if< __and_< > is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>, > __not_<is_array<_Up>> > >::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 std::get<0>(_M_t); } > > deleter_type& > get_deleter() noexcept > { return std::get<1>(_M_t); } > > const deleter_type& > get_deleter() const noexcept > { return std::get<1>(_M_t); } > > explicit operator bool() const noexcept > { return get() == pointer() ? false : true; } > > > pointer > release() noexcept > { > pointer __p = get(); > std::get<0>(_M_t) = pointer(); > return __p; > } > > void > reset(pointer __p = pointer()) noexcept > { > using std::swap; > swap(std::get<0>(_M_t), __p); > if (__p != pointer()) > get_deleter()(__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> > { > > class _Pointer > { > template<typename _Up> > static typename _Up::pointer __test(typename _Up::pointer*); > > template<typename _Up> > static _Tp* __test(...); > > typedef typename remove_reference<_Dp>::type _Del; > > public: > typedef decltype(__test<_Del>(0)) type; > }; > > typedef std::tuple<typename _Pointer::type, _Dp> __tuple_type; > __tuple_type _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>>> >; > > template<typename _Up, typename _Ep, > typename _Tp_pointer = typename _Pointer::type, > typename _Up_pointer = typename unique_ptr<_Up, _Ep>::pointer> > using __safe_conversion = __and_< > is_convertible<_Up_pointer, _Tp_pointer>, > is_array<_Up>, > __or_<__not_<is_pointer<_Up_pointer>>, > __not_<is_pointer<_Tp_pointer>>, > __not_<__is_derived_Tp<typename remove_extent<_Up>::type>> > > > >; > > public: > typedef typename _Pointer::type pointer; > typedef _Tp element_type; > typedef _Dp deleter_type; > > > constexpr unique_ptr() noexcept > : _M_t() > { static_assert(!std::is_pointer<deleter_type>::value, > "constructed with null function pointer deleter"); } > > explicit > unique_ptr(pointer __p) noexcept > : _M_t(__p, deleter_type()) > { static_assert(!is_pointer<deleter_type>::value, > "constructed with null function pointer deleter"); } > > template<typename _Up, typename = _Require<is_pointer<pointer>, > is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> > explicit > unique_ptr(_Up* __p) = delete; > > unique_ptr(pointer __p, > typename conditional<is_reference<deleter_type>::value, > deleter_type, const deleter_type&>::type __d) noexcept > : _M_t(__p, __d) { } > > unique_ptr(pointer __p, typename > remove_reference<deleter_type>::type&& __d) noexcept > : _M_t(std::move(__p), std::move(__d)) > { static_assert(!is_reference<deleter_type>::value, > "rvalue deleter bound to reference"); } > > > unique_ptr(unique_ptr&& __u) noexcept > : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { } > > constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } > > template<typename _Up, typename _Ep, > typename = _Require<__safe_conversion<_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 = std::get<0>(_M_t); > if (__ptr != nullptr) > get_deleter()(__ptr); > __ptr = pointer(); > } > > > unique_ptr& > operator=(unique_ptr&& __u) noexcept > { > reset(__u.release()); > get_deleter() = std::forward<deleter_type>(__u.get_deleter()); > return *this; > } > > template<typename _Up, typename _Ep> > typename > enable_if<__safe_conversion<_Up, _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 std::get<0>(_M_t); } > > deleter_type& > get_deleter() noexcept > { return std::get<1>(_M_t); } > > const deleter_type& > get_deleter() const noexcept > { return std::get<1>(_M_t); } > > explicit operator bool() const noexcept > { return get() == pointer() ? false : true; } > > > pointer > release() noexcept > { > pointer __p = get(); > std::get<0>(_M_t) = pointer(); > return __p; > } > > void > reset() noexcept > { reset(pointer()); } > > void > reset(pointer __p) noexcept > { > using std::swap; > swap(std::get<0>(_M_t), __p); > if (__p != nullptr) > get_deleter()(__p); > } > > template<typename _Up, typename = _Require<is_pointer<pointer>, > is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> > void reset(_Up*) = delete; > > 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 _Up, typename = _Require<is_pointer<pointer>, > is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> > unique_ptr(_Up*, typename > conditional<is_reference<deleter_type>::value, > deleter_type, const deleter_type&>::type) = delete; > > template<typename _Up, typename = _Require<is_pointer<pointer>, > is_convertible<_Up*, pointer>, __is_derived_Tp<_Up>>> > unique_ptr(_Up*, typename > remove_reference<deleter_type>::type&&) = delete; > }; > > template<typename _Tp, typename _Dp> > inline void > swap(unique_ptr<_Tp, _Dp>& __x, > unique_ptr<_Tp, _Dp>& __y) noexcept > { __x.swap(__y); } > > 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>> > { > 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()); > } > }; > > > > >} ># 82 "/usr/include/c++/4.8.2/memory" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 1 3 ># 52 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 ># 1 "/usr/include/c++/4.8.2/bits/shared_ptr_base.h" 1 3 ># 52 "/usr/include/c++/4.8.2/bits/shared_ptr_base.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename> class auto_ptr; > > > > > > > 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&) = 0; > > void > _M_add_ref_copy() > { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } > > void > _M_add_ref_lock(); > > 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) > { > __asm __volatile ("":::"memory"); > __asm __volatile ("":::"memory"); > } > > > ; > 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) > { > > > __asm __volatile ("":::"memory"); > __asm __volatile ("":::"memory"); > } > _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 (__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_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<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) > : _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&) > { return 0; } > > _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; > _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; > > protected: > _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<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp> > class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> > { > > > > struct _My_Deleter > : public _Alloc > { > _Deleter _M_del; > _My_Deleter(_Deleter __d, const _Alloc& __a) > : _Alloc(__a), _M_del(__d) { } > }; > > public: > > _Sp_counted_deleter(_Ptr __p, _Deleter __d) > : _M_ptr(__p), _M_del(__d, _Alloc()) { } > > > _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) > : _M_ptr(__p), _M_del(__d, __a) { } > > ~_Sp_counted_deleter() noexcept { } > > virtual void > _M_dispose() noexcept > { _M_del._M_del(_M_ptr); } > > virtual void > _M_destroy() noexcept > { > typedef typename allocator_traits<_Alloc>::template > rebind_traits<_Sp_counted_deleter> _Alloc_traits; > typename _Alloc_traits::allocator_type __a(_M_del); > _Alloc_traits::destroy(__a, this); > _Alloc_traits::deallocate(__a, this, 1); > } > > virtual void* > _M_get_deleter(const std::type_info& __ti) > { > > return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; > > > > } > > protected: > _Ptr _M_ptr; > _My_Deleter _M_del; > }; > > > > struct _Sp_make_shared_tag { }; > > template<typename _Tp, typename _Alloc, _Lock_policy _Lp> > class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> > { > > > > struct _Impl > : public _Alloc > { > _Impl(_Alloc __a) : _Alloc(__a), _M_ptr() { } > _Tp* _M_ptr; > }; > > public: > template<typename... _Args> > _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) > : _M_impl(__a) > { > _M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage)); > > > allocator_traits<_Alloc>::construct(__a, _M_impl._M_ptr, > std::forward<_Args>(__args)...); > } > > ~_Sp_counted_ptr_inplace() noexcept { } > > virtual void > _M_dispose() noexcept > { allocator_traits<_Alloc>::destroy(_M_impl, _M_impl._M_ptr); } > > > virtual void > _M_destroy() noexcept > { > typedef typename allocator_traits<_Alloc>::template > rebind_traits<_Sp_counted_ptr_inplace> _Alloc_traits; > typename _Alloc_traits::allocator_type __a(_M_impl); > _Alloc_traits::destroy(__a, this); > _Alloc_traits::deallocate(__a, this, 1); > } > > > virtual void* > _M_get_deleter(const std::type_info& __ti) noexcept > { > > return __ti == typeid(_Sp_make_shared_tag) > ? static_cast<void*>(&_M_storage) > : 0; > > > > } > > private: > _Impl _M_impl; > typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type > _M_storage; > }; > > template<_Lock_policy _Lp> > class __shared_count > { > 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, typename _Deleter> > __shared_count(_Ptr __p, _Deleter __d) > : __shared_count(__p, std::move(__d), allocator<int>()) > { } > > template<typename _Ptr, typename _Deleter, typename _Alloc> > __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) > { > typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; > typedef typename allocator_traits<_Alloc>::template > rebind_traits<_Sp_cd_type> _Alloc_traits; > typename _Alloc_traits::allocator_type __a2(__a); > _Sp_cd_type* __mem = 0; > try > { > __mem = _Alloc_traits::allocate(__a2, 1); > _Alloc_traits::construct(__a2, __mem, > __p, std::move(__d), std::move(__a)); > _M_pi = __mem; > } > catch(...) > { > __d(__p); > if (__mem) > _Alloc_traits::deallocate(__a2, __mem, 1); > throw; > } > } > > template<typename _Tp, typename _Alloc, typename... _Args> > __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a, > _Args&&... __args) > : _M_pi(0) > { > typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; > typedef typename allocator_traits<_Alloc>::template > rebind_traits<_Sp_cp_type> _Alloc_traits; > typename _Alloc_traits::allocator_type __a2(__a); > _Sp_cp_type* __mem = _Alloc_traits::allocate(__a2, 1); > try > { > _Alloc_traits::construct(__a2, __mem, std::move(__a), > std::forward<_Args>(__args)...); > _M_pi = __mem; > } > catch(...) > { > _Alloc_traits::deallocate(__a2, __mem, 1); > throw; > } > } > > > > template<typename _Tp> > explicit > __shared_count(std::auto_ptr<_Tp>&& __r); > > > > template<typename _Tp, typename _Del> > explicit > __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) > { > 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); > > ~__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) : 0; } > > 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(0) > { } > > __weak_count(const __shared_count<_Lp>& __r) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi != 0) > _M_pi->_M_weak_add_ref(); > } > > __weak_count(const __weak_count<_Lp>& __r) noexcept > : _M_pi(__r._M_pi) > { > if (_M_pi != 0) > _M_pi->_M_weak_add_ref(); > } > > ~__weak_count() noexcept > { > if (_M_pi != 0) > _M_pi->_M_weak_release(); > } > > __weak_count<_Lp>& > operator=(const __shared_count<_Lp>& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > if (__tmp != 0) > __tmp->_M_weak_add_ref(); > if (_M_pi != 0) > _M_pi->_M_weak_release(); > _M_pi = __tmp; > return *this; > } > > __weak_count<_Lp>& > operator=(const __weak_count<_Lp>& __r) noexcept > { > _Sp_counted_base<_Lp>* __tmp = __r._M_pi; > if (__tmp != 0) > __tmp->_M_weak_add_ref(); > if (_M_pi != 0) > _M_pi->_M_weak_release(); > _M_pi = __tmp; > return *this; > } > > void > _M_swap(__weak_count<_Lp>& __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_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 != 0) > _M_pi->_M_add_ref_lock(); > else > __throw_bad_weak_ptr(); > } > > > > > > template<_Lock_policy _Lp, typename _Tp1, typename _Tp2> > void > __enable_shared_from_this_helper(const __shared_count<_Lp>&, > const __enable_shared_from_this<_Tp1, > _Lp>*, const _Tp2*) noexcept; > > > template<typename _Tp1, typename _Tp2> > void > __enable_shared_from_this_helper(const __shared_count<>&, > const enable_shared_from_this<_Tp1>*, > const _Tp2*) noexcept; > > template<_Lock_policy _Lp> > inline void > __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...) noexcept > { } > > > template<typename _Tp, _Lock_policy _Lp> > class __shared_ptr > { > public: > typedef _Tp element_type; > > constexpr __shared_ptr() noexcept > : _M_ptr(0), _M_refcount() > { } > > template<typename _Tp1> > explicit __shared_ptr(_Tp1* __p) > : _M_ptr(__p), _M_refcount(__p) > { > > static_assert( sizeof(_Tp1) > 0, "incomplete type" ); > __enable_shared_from_this_helper(_M_refcount, __p, __p); > } > > template<typename _Tp1, typename _Deleter> > __shared_ptr(_Tp1* __p, _Deleter __d) > : _M_ptr(__p), _M_refcount(__p, __d) > { > > > __enable_shared_from_this_helper(_M_refcount, __p, __p); > } > > template<typename _Tp1, typename _Deleter, typename _Alloc> > __shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) > : _M_ptr(__p), _M_refcount(__p, __d, std::move(__a)) > { > > > __enable_shared_from_this_helper(_M_refcount, __p, __p); > } > > template<typename _Deleter> > __shared_ptr(nullptr_t __p, _Deleter __d) > : _M_ptr(0), _M_refcount(__p, __d) > { } > > template<typename _Deleter, typename _Alloc> > __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) > : _M_ptr(0), _M_refcount(__p, __d, std::move(__a)) > { } > > template<typename _Tp1> > __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __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 _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > __shared_ptr(const __shared_ptr<_Tp1, _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 _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount() > { > _M_refcount._M_swap(__r._M_refcount); > __r._M_ptr = 0; > } > > template<typename _Tp1> > explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r) > : _M_refcount(__r._M_refcount) > { > > > > > _M_ptr = __r._M_ptr; > } > > > template<typename _Tp1, typename _Del> > __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) > : _M_ptr(__r.get()), _M_refcount() > { > > auto __tmp = __r.get(); > _M_refcount = __shared_count<_Lp>(std::move(__r)); > __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); > } > > > > template<typename _Tp1> > __shared_ptr(std::auto_ptr<_Tp1>&& __r); > > > > constexpr __shared_ptr(nullptr_t) noexcept > : _M_ptr(0), _M_refcount() > { } > > template<typename _Tp1> > __shared_ptr& > operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > _M_ptr = __r._M_ptr; > _M_refcount = __r._M_refcount; > return *this; > } > > > template<typename _Tp1> > __shared_ptr& > operator=(std::auto_ptr<_Tp1>&& __r) > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > > __shared_ptr& > operator=(__shared_ptr&& __r) noexcept > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > template<class _Tp1> > __shared_ptr& > operator=(__shared_ptr<_Tp1, _Lp>&& __r) noexcept > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > template<typename _Tp1, typename _Del> > __shared_ptr& > operator=(std::unique_ptr<_Tp1, _Del>&& __r) > { > __shared_ptr(std::move(__r)).swap(*this); > return *this; > } > > void > reset() noexcept > { __shared_ptr().swap(*this); } > > template<typename _Tp1> > void > reset(_Tp1* __p) > { > > ; > __shared_ptr(__p).swap(*this); > } > > template<typename _Tp1, typename _Deleter> > void > reset(_Tp1* __p, _Deleter __d) > { __shared_ptr(__p, __d).swap(*this); } > > template<typename _Tp1, typename _Deleter, typename _Alloc> > void > reset(_Tp1* __p, _Deleter __d, _Alloc __a) > { __shared_ptr(__p, __d, std::move(__a)).swap(*this); } > > > typename std::add_lvalue_reference<_Tp>::type > operator*() const noexcept > { > ; > return *_M_ptr; > } > > _Tp* > operator->() const noexcept > { > ; > return _M_ptr; > } > > _Tp* > 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 > { return _M_refcount._M_less(__rhs._M_refcount); } > > template<typename _Tp1> > bool > owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const > { return _M_refcount._M_less(__rhs._M_refcount); } > > > protected: > > template<typename _Alloc, typename... _Args> > __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, > _Args&&... __args) > : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a, > std::forward<_Args>(__args)...) > { > > > void* __p = _M_refcount._M_get_deleter(typeid(__tag)); > _M_ptr = static_cast<_Tp*>(__p); > __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr); > } ># 1005 "/usr/include/c++/4.8.2/bits/shared_ptr_base.h" 3 > template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc, > typename... _Args> > friend __shared_ptr<_Tp1, _Lp1> > __allocate_shared(const _Alloc& __a, _Args&&... __args); > > private: > 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; > > _Tp* _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 _Tp1, typename _Tp2, _Lock_policy _Lp> > inline bool > operator<(const __shared_ptr<_Tp1, _Lp>& __a, > const __shared_ptr<_Tp2, _Lp>& __b) noexcept > { > typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; > return std::less<_CT>()(__a.get(), __b.get()); > } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept > { return std::less<_Tp*>()(__a.get(), nullptr); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return std::less<_Tp*>()(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 std::less<_Tp*>()(nullptr, __a.get()); } > > template<typename _Tp, _Lock_policy _Lp> > inline bool > operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept > { return std::less<_Tp*>()(__a.get(), 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 _Sp> > struct _Sp_less : public binary_function<_Sp, _Sp, bool> > { > bool > operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept > { > typedef typename _Sp::element_type element_type; > return std::less<element_type*>()(__lhs.get(), __rhs.get()); > } > }; > > template<typename _Tp, _Lock_policy _Lp> > struct less<__shared_ptr<_Tp, _Lp>> > : public _Sp_less<__shared_ptr<_Tp, _Lp>> > { }; > > > template<typename _Tp, _Lock_policy _Lp> > inline void > swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept > { __a.swap(__b); } ># 1155 "/usr/include/c++/4.8.2/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 > { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__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 > { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__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 > { > if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) > return __shared_ptr<_Tp, _Lp>(__r, __p); > return __shared_ptr<_Tp, _Lp>(); > } > > > template<typename _Tp, _Lock_policy _Lp> > class __weak_ptr > { > public: > typedef _Tp element_type; > > constexpr __weak_ptr() noexcept > : _M_ptr(0), _M_refcount() > { } > > __weak_ptr(const __weak_ptr&) noexcept = default; > __weak_ptr& operator=(const __weak_ptr&) noexcept = default; > ~__weak_ptr() = default; ># 1213 "/usr/include/c++/4.8.2/bits/shared_ptr_base.h" 3 > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) noexcept > : _M_refcount(__r._M_refcount) > { _M_ptr = __r.lock().get(); } > > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) > { } > > template<typename _Tp1> > __weak_ptr& > operator=(const __weak_ptr<_Tp1, _Lp>& __r) noexcept > { > _M_ptr = __r.lock().get(); > _M_refcount = __r._M_refcount; > return *this; > } > > template<typename _Tp1> > __weak_ptr& > operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept > { > _M_ptr = __r._M_ptr; > _M_refcount = __r._M_refcount; > return *this; > } > > __shared_ptr<_Tp, _Lp> > lock() const noexcept > { > > > if (expired()) > return __shared_ptr<element_type, _Lp>(); > > try > { > return __shared_ptr<element_type, _Lp>(*this); > } > catch(const bad_weak_ptr&) > { > > > > return __shared_ptr<element_type, _Lp>(); > } > > > > > > > > } > > 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 > { return _M_refcount._M_less(__rhs._M_refcount); } > > template<typename _Tp1> > bool > owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const > { 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 > { > _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>; > > _Tp* _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 > { return __lhs.owner_before(__rhs); } > > bool > operator()(const _Tp& __lhs, const _Tp1& __rhs) const > { return __lhs.owner_before(__rhs); } > > bool > operator()(const _Tp1& __lhs, const _Tp& __rhs) const > { return __lhs.owner_before(__rhs); } > }; > > 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); } > > private: > template<typename _Tp1> > void > _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept > { _M_weak_this._M_assign(__p, __n); } > > template<typename _Tp1> > friend void > __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn, > const __enable_shared_from_this* __pe, > const _Tp1* __px) noexcept > { > if (__pe != 0) > __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); > } > > mutable __weak_ptr<_Tp, _Lp> _M_weak_this; > }; > > > template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args> > inline __shared_ptr<_Tp, _Lp> > __allocate_shared(const _Alloc& __a, _Args&&... __args) > { > return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(), __a, > std::forward<_Args>(__args)...); > } > > template<typename _Tp, _Lock_policy _Lp, 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 std::hash<_Tp*>()(__s.get()); } > }; > > >} ># 53 "/usr/include/c++/4.8.2/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))); > > > > } ># 92 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp> > class shared_ptr : public __shared_ptr<_Tp> > { > public: > > > > > constexpr shared_ptr() noexcept > : __shared_ptr<_Tp>() { } > > shared_ptr(const shared_ptr&) noexcept = default; > > > > > > > > template<typename _Tp1> > explicit shared_ptr(_Tp1* __p) > : __shared_ptr<_Tp>(__p) { } ># 128 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp1, typename _Deleter> > shared_ptr(_Tp1* __p, _Deleter __d) > : __shared_ptr<_Tp>(__p, __d) { } ># 145 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Deleter> > shared_ptr(nullptr_t __p, _Deleter __d) > : __shared_ptr<_Tp>(__p, __d) { } ># 164 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp1, typename _Deleter, typename _Alloc> > shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) > : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { } ># 183 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Deleter, typename _Alloc> > shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) > : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { } ># 205 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp1> > shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p) noexcept > : __shared_ptr<_Tp>(__r, __p) { } ># 216 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > shared_ptr(const shared_ptr<_Tp1>& __r) noexcept > : __shared_ptr<_Tp>(__r) { } > > > > > > > shared_ptr(shared_ptr&& __r) noexcept > : __shared_ptr<_Tp>(std::move(__r)) { } > > > > > > > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > shared_ptr(shared_ptr<_Tp1>&& __r) noexcept > : __shared_ptr<_Tp>(std::move(__r)) { } ># 247 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp1> > explicit shared_ptr(const weak_ptr<_Tp1>& __r) > : __shared_ptr<_Tp>(__r) { } > > > template<typename _Tp1> > shared_ptr(std::auto_ptr<_Tp1>&& __r); > > > template<typename _Tp1, typename _Del> > shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) > : __shared_ptr<_Tp>(std::move(__r)) { } > > > > > > > constexpr shared_ptr(nullptr_t __p) noexcept > : __shared_ptr<_Tp>(__p) { } > > shared_ptr& operator=(const shared_ptr&) noexcept = default; > > template<typename _Tp1> > shared_ptr& > operator=(const shared_ptr<_Tp1>& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(__r); > return *this; > } > > > template<typename _Tp1> > shared_ptr& > operator=(std::auto_ptr<_Tp1>&& __r) > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > > shared_ptr& > operator=(shared_ptr&& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > template<class _Tp1> > shared_ptr& > operator=(shared_ptr<_Tp1>&& __r) noexcept > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > template<typename _Tp1, typename _Del> > shared_ptr& > operator=(std::unique_ptr<_Tp1, _Del>&& __r) > { > this->__shared_ptr<_Tp>::operator=(std::move(__r)); > return *this; > } > > private: > > template<typename _Alloc, typename... _Args> > shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, > _Args&&... __args) > : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...) > { } > > template<typename _Tp1, typename _Alloc, typename... _Args> > friend shared_ptr<_Tp1> > allocate_shared(const _Alloc& __a, _Args&&... __args); > }; > > > template<typename _Tp1, typename _Tp2> > inline bool > operator==(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __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 _Tp1, typename _Tp2> > inline bool > operator!=(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __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 _Tp1, typename _Tp2> > inline bool > operator<(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __b) noexcept > { > typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; > return std::less<_CT>()(__a.get(), __b.get()); > } > > template<typename _Tp> > inline bool > operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return std::less<_Tp*>()(__a.get(), nullptr); } > > template<typename _Tp> > inline bool > operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return std::less<_Tp*>()(nullptr, __a.get()); } > > template<typename _Tp1, typename _Tp2> > inline bool > operator<=(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __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 _Tp1, typename _Tp2> > inline bool > operator>(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __b) noexcept > { return (__b < __a); } > > template<typename _Tp> > inline bool > operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept > { return std::less<_Tp*>()(nullptr, __a.get()); } > > template<typename _Tp> > inline bool > operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept > { return std::less<_Tp*>()(__a.get(), nullptr); } > > template<typename _Tp1, typename _Tp2> > inline bool > operator>=(const shared_ptr<_Tp1>& __a, > const shared_ptr<_Tp2>& __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> > struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>> > { }; > > > template<typename _Tp> > inline void > swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept > { __a.swap(__b); } > > > template<typename _Tp, typename _Tp1> > inline shared_ptr<_Tp> > static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept > { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); } > > template<typename _Tp, typename _Tp1> > inline shared_ptr<_Tp> > const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept > { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); } > > template<typename _Tp, typename _Tp1> > inline shared_ptr<_Tp> > dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept > { > if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) > return shared_ptr<_Tp>(__r, __p); > return shared_ptr<_Tp>(); > } > > > > > > > > template<typename _Tp> > class weak_ptr : public __weak_ptr<_Tp> > { > public: > constexpr weak_ptr() noexcept > : __weak_ptr<_Tp>() { } > > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > weak_ptr(const weak_ptr<_Tp1>& __r) noexcept > : __weak_ptr<_Tp>(__r) { } > > template<typename _Tp1, typename = typename > std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type> > weak_ptr(const shared_ptr<_Tp1>& __r) noexcept > : __weak_ptr<_Tp>(__r) { } > > template<typename _Tp1> > weak_ptr& > operator=(const weak_ptr<_Tp1>& __r) noexcept > { > this->__weak_ptr<_Tp>::operator=(__r); > return *this; > } > > template<typename _Tp1> > weak_ptr& > operator=(const shared_ptr<_Tp1>& __r) noexcept > { > this->__weak_ptr<_Tp>::operator=(__r); > return *this; > } > > shared_ptr<_Tp> > lock() const noexcept > { > > if (this->expired()) > return shared_ptr<_Tp>(); > > try > { > return shared_ptr<_Tp>(*this); > } > catch(const bad_weak_ptr&) > { > return shared_ptr<_Tp>(); > } > > > > } > }; > > > template<typename _Tp> > inline void > swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept > { __a.swap(__b); } > > > > template<typename _Tp> > struct owner_less; > > > 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); } > > private: > template<typename _Tp1> > void > _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept > { _M_weak_this._M_assign(__p, __n); } > > template<typename _Tp1> > friend void > __enable_shared_from_this_helper(const __shared_count<>& __pn, > const enable_shared_from_this* __pe, > const _Tp1* __px) noexcept > { > if (__pe != 0) > __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); > } > > mutable weak_ptr<_Tp> _M_weak_this; > }; ># 593 "/usr/include/c++/4.8.2/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_make_shared_tag(), __a, > std::forward<_Args>(__args)...); > } ># 608 "/usr/include/c++/4.8.2/bits/shared_ptr.h" 3 > template<typename _Tp, typename... _Args> > inline shared_ptr<_Tp> > make_shared(_Args&&... __args) > { > typedef typename std::remove_const<_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<_Tp*>()(__s.get()); } > }; > > > > >} ># 83 "/usr/include/c++/4.8.2/memory" 2 3 > ># 1 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 1 3 ># 36 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 47 "/usr/include/c++/4.8.2/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__)); ># 86 "/usr/include/c++/4.8.2/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) { } ># 112 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } ># 124 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > template<typename _Tp1> > auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } ># 135 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > auto_ptr& > operator=(auto_ptr& __a) throw() > { > reset(__a.release()); > return *this; > } ># 152 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > template<typename _Tp1> > auto_ptr& > operator=(auto_ptr<_Tp1>& __a) throw() > { > reset(__a.release()); > return *this; > } ># 170 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > ~auto_ptr() { delete _M_ptr; } ># 180 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > element_type& > operator*() const throw() > { > ; > return *_M_ptr; > } > > > > > > > > element_type* > operator->() const throw() > { > ; > return _M_ptr; > } ># 210 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > element_type* > get() const throw() { return _M_ptr; } ># 224 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > element_type* > release() throw() > { > element_type* __tmp = _M_ptr; > _M_ptr = 0; > return __tmp; > } ># 239 "/usr/include/c++/4.8.2/backward/auto_ptr.h" 3 > void > reset(element_type* __p = 0) throw() > { > if (__p != _M_ptr) > { > delete _M_ptr; > _M_ptr = __p; > } > } ># 260 "/usr/include/c++/4.8.2/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> > 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)); > __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); > } > > template<typename _Tp> > template<typename _Tp1> > 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()) { } > > > >} ># 85 "/usr/include/c++/4.8.2/memory" 2 3 ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/utility.h" 2 > > >namespace hsh >{ > > template<class T, class... Args> > enable_if_t<!std::is_array<T>::value, std::unique_ptr<T>> make_unique(Args&&... args) { > return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); > } > > template<class T> > enable_if_t<is_unbounded_array<T>::value, std::unique_ptr<T>> make_unique(std::size_t n) { > return std::unique_ptr<T>(new remove_extent_t<T>[n]()); > } > > template<class T, class... Args> > enable_if_t<is_bounded_array<T>::value> make_unique(Args&&...) = delete; > > > template <typename T> > constexpr hsh::remove_reference_t<T>&& move(T&& t) noexcept { > return static_cast<hsh::remove_reference_t<T>&&>(t); > } > > > template <typename T> > constexpr T&& forward(hsh::remove_reference_t<T>& t) noexcept { return static_cast<T&&>(t); } > > > template<class T, class U = T> > T exchange( T& obj, U&& new_value ) > { > T old_value = hsh::move(obj); > obj = hsh::forward<U>(new_value); > return old_value; > } > > > template<typename T> > inline constexpr T* addressof(T& value) noexcept > { > return reinterpret_cast<T*>(&const_cast<char&>(reinterpret_cast<const volatile char&>(value))); > } > > template<typename T> > inline constexpr const T* addressof(const T&& value) noexcept = delete; > > > template <class T> > constexpr typename std::add_const<T>::type& as_const(T& t) noexcept { return t; } > > template <class T> > void as_const(const T&&) = delete; > > > struct nullopt_t { explicit constexpr nullopt_t(int) {} }; > constexpr nullopt_t nullopt{ 1 }; > > > struct in_place_t { explicit in_place_t() = default; }; > constexpr in_place_t in_place{}; > > namespace detail > { > template <typename T> > struct in_place_type_tag > { > explicit in_place_type_tag() = delete; > in_place_type_tag(const in_place_type_tag&) = delete; > in_place_type_tag& operator=(const in_place_type_tag&) = delete; > }; > > template <size_t I> > struct in_place_index_tag > { > explicit in_place_index_tag() = delete; > in_place_index_tag(const in_place_index_tag&) = delete; > in_place_index_tag& operator=(const in_place_index_tag&) = delete; > }; > > } > > > struct monostate {}; > constexpr bool operator> (monostate, monostate) noexcept { return false; } > constexpr bool operator< (monostate, monostate) noexcept { return false; } > constexpr bool operator!=(monostate, monostate) noexcept { return false; } > constexpr bool operator<=(monostate, monostate) noexcept { return true; } > constexpr bool operator>=(monostate, monostate) noexcept { return true; } > constexpr bool operator==(monostate, monostate) noexcept { return true; } > > > template <typename T> > using in_place_type_t = void(*)(detail::in_place_type_tag<T>); > > template <typename T> > inline void in_place_type(detail::in_place_type_tag<T>) {} > > > template <size_t I> > using in_place_index_t = void(*)(detail::in_place_index_tag<I>); > > template <size_t I> > inline void in_place_index(detail::in_place_index_tag<I>) {} > > > struct ordered_range_t { explicit ordered_range_t() = default; }; > constexpr ordered_range_t ordered_range{}; > > > struct ordered_unique_range_t : public ordered_range_t { explicit ordered_unique_range_t() = default; }; > constexpr ordered_unique_range_t ordered_unique_range{}; > > template <typename T, T... Ints> > class integer_sequence > { > public: > using value_type = T; > static_assert(std::is_integral<T>::value, "integer_sequence can only be instantiated with an integral type"); > static constexpr size_t size() noexcept { return sizeof...(Ints); } > }; > > namespace detail > { > template <size_t N, typename IndexSeq> > struct make_index_sequence_impl; > > template <size_t N, size_t... Is> > struct make_index_sequence_impl<N, integer_sequence<size_t, Is...>> > { > using type = typename make_index_sequence_impl<N - 1, integer_sequence<size_t, N - 1, Is...>>::type; > }; > > template <size_t... Is> > struct make_index_sequence_impl<0, integer_sequence<size_t, Is...>> > { > using type = integer_sequence<size_t, Is...>; > }; > > template <typename Target, typename Seq> > struct integer_sequence_convert_impl; > > template <typename Target, size_t... Is> > struct integer_sequence_convert_impl<Target, integer_sequence<size_t, Is...>> > { > using type = integer_sequence<Target, Is...>; > }; > > template <typename T, size_t N> > struct make_integer_sequence_impl > { > using type = typename integer_sequence_convert_impl<T, typename make_index_sequence_impl<N, integer_sequence<size_t>>::type>::type; > }; > } > > template <size_t... Is> > using index_sequence = integer_sequence<size_t, Is...>; > > template <size_t N> > using make_index_sequence = typename detail::make_index_sequence_impl<N, integer_sequence<size_t>>::type; > > template <typename T, size_t N> > using make_integer_sequence = typename detail::make_integer_sequence_impl<T, N>::type; > > template<typename... T> > using index_sequence_for = make_index_sequence<sizeof...(T)>; > > namespace detail > { > template<typename T> > void hash_combine(size_t& seed, const T& val) > { > seed ^= std::hash<T>()(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2); > } > } > > > template<typename... Types> > size_t hash_combine(const Types&... args) noexcept(hsh::conjunction<hsh::is_nothrow_hashable<Types>...>::value) > { > size_t seed = 0; > auto l = { (detail::hash_combine(seed, args),0)... }; > (void)l; > return seed; > } > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/optional.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/functional.h" 1 > > > > > > >namespace hsh >{ > > template <typename T, typename U> > struct equal_to_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a == b; } > constexpr bool operator()(const U& b, const T& a) const { return b == a; } > }; > > template <typename T> > struct equal_to_2<T, T> : public std::equal_to<T>{}; > > template <typename T, typename U> > struct not_equal_to_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a != b; } > constexpr bool operator()(const U& b, const T& a) const { return b != a; } > }; > > template <typename T> > struct not_equal_to_2<T, T> : public std::not_equal_to<T>{}; > > template <typename T, typename U> > struct greater_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a > b; } > constexpr bool operator()(const U& b, const T& a) const { return b > a; } > }; > > template <typename T> > struct greater_2<T, T> : public std::greater<T>{}; > > template <typename T, typename U> > struct less_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a < b; } > constexpr bool operator()(const U& b, const T& a) const { return b < a; } > }; > > template <typename T> > struct less_2<T, T> : public std::less<T>{}; > > template <typename T, typename U> > struct greater_equal_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a >= b; } > constexpr bool operator()(const U& b, const T& a) const { return b >= a; } > }; > > template <typename T> > struct greater_equal_2<T, T> : public std::greater_equal<T>{}; > > template <typename T, typename U> > struct less_equal_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a <= b; } > constexpr bool operator()(const U& b, const T& a) const { return b <= a; } > }; > > template <typename T> > struct less_equal_2<T, T> : public std::less_equal<T>{}; > > template <typename T, typename U> > struct logical_or_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a || b; } > constexpr bool operator()(const U& b, const T& a) const { return b || a; } > }; > > template <typename T> > struct logical_or_2<T, T> : public std::logical_or<T> {}; > > template <typename T, typename U> > struct logical_and_2 > { > constexpr bool operator()(const T& a, const U& b) const { return a && b; } > constexpr bool operator()(const U& b, const T& a) const { return b && a; } > }; > > template <typename T> > struct logical_and_2<T, T> : public std::logical_and<T> {}; > > > template <typename Compare> > struct less_to_equal_to > { > explicit less_to_equal_to(const Compare& cmp) noexcept(std::is_nothrow_copy_constructible<Compare>::value) : cmp(cmp) {} > explicit less_to_equal_to(Compare&& cmp) noexcept(std::is_nothrow_move_constructible<Compare>::value) : cmp(std::move(cmp)) {} > > template <typename T> > bool operator()(const T& a, const T& b) const noexcept(hsh::is_nothrow_invocable<Compare, const T&,const T&>::value) > { > return !cmp(a, b) && !cmp(b, a); > } > > private: > Compare cmp; > }; > > struct first_element > { > template<typename T, typename U> > constexpr const T& operator()(const std::pair<T, U>& pair) const noexcept(std::is_nothrow_copy_constructible<T>::value) { return pair.first; } > > template<typename T, typename U> > constexpr T&& operator()(std::pair<T, U>&& pair) const noexcept(std::is_nothrow_move_constructible<T>::value) { return hsh::move(pair.first); } > }; > > struct second_element > { > template<typename T, typename U> > constexpr const U& operator()(const std::pair<T, U>& pair) const noexcept(std::is_nothrow_copy_constructible<U>::value) { return pair.second; } > > template<typename T, typename U> > constexpr U&& operator()(std::pair<T, U>&& pair) const noexcept(std::is_nothrow_move_constructible<U>::value) { return hsh::move(pair.second); } > }; > > > template <typename Compare> > struct compare_first_element > { > explicit compare_first_element(const Compare &comp) noexcept(std::is_nothrow_copy_constructible<Compare>::value) : comp(comp) {} > explicit compare_first_element(Compare &&comp) noexcept(std::is_nothrow_move_constructible<Compare>::value) : comp(std::move(comp)) {} > > template <typename Key, typename V, typename K> > inline bool operator()(const std::pair<Key, V>& lhs, const K& rhs) const noexcept(hsh::is_nothrow_invocable<Compare, const Key&, const K&>::value) > { > return comp(lhs.first, rhs); > } > > template <typename Key, typename V, typename K> > inline bool operator()(const K& lhs, const std::pair<Key, V>& rhs) const noexcept(hsh::is_nothrow_invocable<Compare, const K&, const Key&>::value) > { > return comp(lhs, rhs.first); > } > > private: > Compare comp; > }; > > > template <typename Compare> > struct compare_second_element > { > explicit compare_second_element(const Compare &comp) noexcept(std::is_nothrow_copy_constructible<Compare>::value) : comp(comp) {} > explicit compare_second_element(Compare &&comp) noexcept(std::is_nothrow_move_constructible<Compare>::value) : comp(std::move(comp)) {} > > template <typename K, typename V> > inline bool operator()(const std::pair<K, V>& lhs, const V& rhs) const noexcept(hsh::is_nothrow_invocable<Compare, const V&, const V&>::value) > { > return comp(lhs.second, rhs); > } > > template <typename K, typename V> > inline bool operator()(const V& lhs, const std::pair<K, V>& rhs) const noexcept(hsh::is_nothrow_invocable<Compare, const V&, const V&>::value) > { > return comp(lhs, rhs.second); > } > > private: > Compare comp; > }; > > > template <typename F, typename... Args> > inline auto invoke(F&& func, Args&&... args) noexcept(noexcept(detail::invoke_impl(std::forward<F>(func), std::forward<Args>(args)...))) > -> decltype(hsh::detail::invoke_impl(std::forward<F>(func), std::forward<Args>(args)...)) > { > return hsh::detail::invoke_impl(std::forward<F>(func), std::forward<Args>(args)...); > } > > namespace detail > { > template <class... Ts> > struct overloader; > > template <class F, class... FRest> > struct overloader<F, FRest...> : F, overloader<FRest...> > { > overloader(F&& f, FRest&&... rest) : F(std::forward<F>(f)), overloader<FRest...>(std::forward<FRest>(rest)...) {} > > using F::operator(); > using overloader<FRest...>::operator(); > }; > > template <class F> > struct overloader<F> : F > { > explicit overloader(F&& f) : F(std::forward<F>(f)) {} > > using F::operator(); > }; > } > > > template <class... Ts> > auto overload(Ts&&... ts) -> decltype(detail::overloader<hsh::decay_t<Ts>...>(std::forward<Ts>(ts)...)) > { > return detail::overloader<hsh::decay_t<Ts>...>{ std::forward<Ts>(ts)...}; > } > > > namespace detail > { > template <class F, class Tuple, size_t... I> > auto apply_impl(F&& f, Tuple&& t, index_sequence<I...>) noexcept(noexcept(hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...))) > -> decltype(hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...)) > { > return hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...); > } > } > > > template <class F, class Tuple> > auto apply(F&& f, Tuple&& t) noexcept(noexcept(detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t), hsh::make_index_sequence<std::tuple_size<hsh::decay_t<Tuple>>::value>{}))) > -> decltype(detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t), hsh::make_index_sequence<std::tuple_size<hsh::decay_t<Tuple>>::value>{})) > { > return detail::apply_impl(std::forward<F>(f), std::forward<Tuple>(t), > hsh::make_index_sequence<std::tuple_size<hsh::decay_t<Tuple>>::value>{}); > } > > namespace detail > { > > template <size_t... I, class F, class Tuple, class... Args> > auto call_front_binder(hsh::index_sequence<I...>, F&& f, Tuple&& tpl, Args&&... args) > noexcept(noexcept(hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(tpl))..., std::forward<Args>(args)...))) > -> decltype(hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(tpl))..., std::forward<Args>(args)...)) > { > return hsh::invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(tpl))..., std::forward<Args>(args)...); > } > > > template<class F, bool = std::is_empty<F>::value> > class front_binder_base > { > public: > explicit front_binder_base(const F& f) : _func(f) {} > explicit front_binder_base(F&& f) : _func(std::forward<F>(f)) {} > > F& function() { return _func; } > const F& function() const { return _func; } > > F _func; > }; > > template <class F> > class front_binder_base<F, true> : public F > { > public: > explicit front_binder_base(const F& f) : F(f) {} > explicit front_binder_base(F&& f) : F(std::forward<F>(f)) {} > > F& function() { return *this; } > const F& function() const { return *this; } > }; > > template <class F, class... BoundArgs> > class front_binder : front_binder_base<hsh::decay_t<F>> > { > static_assert(std::is_constructible<hsh::decay_t<F>, F>::value, > "bind_front() requires the decayed callable to be constructible from an undecayed callable"); > static_assert(std::is_move_constructible<hsh::decay_t<F>>::value, > "bind_front() requires the decayed callable to be move constructible"); > static_assert(hsh::conjunction<std::is_constructible<hsh::decay_t<BoundArgs>, BoundArgs>...>::value, > "bind_front() requires the decayed bound arguments to be constructible from undecayed bound arguments"); > static_assert(hsh::conjunction<std::is_move_constructible<hsh::decay_t<BoundArgs>>...>::value, > "bind_front() requires the decayed bound arguments to be move constructible"); > > using func_t = hsh::decay_t<F>; > using bound_args_t = std::tuple<hsh::decay_t<BoundArgs>...>; > using base = front_binder_base<func_t>; > > public: > explicit front_binder(F&& f, BoundArgs&&... args) : base(std::forward<F>(f)), bound_args(std::forward<BoundArgs>(args)...) {} > > template <typename... Args> > auto operator()(Args&&... args) & noexcept(hsh::is_nothrow_invocable<F, BoundArgs..., Args&&...>::value) -> hsh::invoke_result_t<F, BoundArgs..., Args...> > { > return call_front_binder(hsh::index_sequence_for<BoundArgs...>{}, base::function(), bound_args, std::forward<Args>(args)...); > } > > template <typename... Args> > auto operator()(Args&&... args) const& noexcept(hsh::is_nothrow_invocable<F, BoundArgs..., Args...>::value) -> hsh::invoke_result_t<F, BoundArgs..., Args...> > { > return call_front_binder(hsh::index_sequence_for<BoundArgs...>{}, base::function(), bound_args, std::forward<Args>(args)...); > } > > template <typename... Args> > auto operator()(Args&&... args) && noexcept(hsh::is_nothrow_invocable<F, BoundArgs..., Args...>::value) -> hsh::invoke_result_t<F, BoundArgs..., Args...> > { > return call_front_binder(hsh::index_sequence_for<BoundArgs...>{}, base::function(), std::move(bound_args), std::forward<Args>(args)...); > } > > template <typename... Args> > auto operator()(Args&&... args) const&& noexcept(hsh::is_nothrow_invocable<F, BoundArgs..., Args...>::value) -> hsh::invoke_result_t<F, BoundArgs..., Args...> > { > return call_front_binder(hsh::index_sequence_for<BoundArgs...>{}, base::function(), std::move(bound_args), std::forward<Args>(args)...); > } > > private: > bound_args_t bound_args; > }; > } > > > template <class F, class... BoundArgs> > auto bind_front(F&& f, BoundArgs&&... args) -> detail::front_binder<F, BoundArgs...> > { > return detail::front_binder<F, BoundArgs...>(std::forward<F>(f), std::forward<BoundArgs>(args)...); > } > > > template<typename F> > void for_each_parameter_pack(F&& f){} > > template<typename F, typename... Args> > void for_each_parameter_pack(F&& f, Args&&... args) > { > auto l = { (hsh::invoke(std::forward<F>(f), args),0)... }; > (void)l; > } > > > namespace detail > { > template<typename T, typename F, size_t... I> > void for_each_tuple_element(F&& f, T&& t, index_sequence<I...>) > { > for_each_parameter_pack(std::forward<F>(f), std::get<I>(std::forward<T>(t))...); > } > } > > template<typename F, typename... Ts> > void for_each_in_tuple(F&& f, std::tuple<Ts...>& t) > { > detail::for_each_tuple_element(std::forward<F>(f), t, hsh::index_sequence_for<Ts...>{}); > } > > template<typename F, typename... Ts> > void for_each_in_tuple(F&& f, const std::tuple<Ts...>& t) > { > detail::for_each_tuple_element(std::forward<F>(f), t, hsh::index_sequence_for<Ts...>{}); > } > > template<typename F, typename... Ts> > void for_each_in_tuple(F&& f, std::tuple<Ts...>&& t) > { > detail::for_each_tuple_element(std::forward<F>(f), std::move(t), hsh::index_sequence_for<Ts...>{}); > } > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/optional.h" 2 > > >namespace hsh >{ > template <class T> > class optional; > > namespace optional_details > { > template <class T> struct is_optional_impl : std::false_type {}; > template <class T> struct is_optional_impl<optional<T>> : std::true_type {}; > template <class T> using is_optional = is_optional_impl<hsh::decay_t<T>>; > > > > template <typename T, bool = is_trivially_destructible<T>::value> > class optional_storage_base > { > public: > constexpr optional_storage_base() noexcept : valueless{} {} > > template <typename... Args> > constexpr explicit optional_storage_base(in_place_t, Args&&... args) > : _value(std::forward<Args>(args)...), initialized(true) {} > > > ~optional_storage_base() { destroy(); } > > inline void destroy() > { > if (initialized) { > _value.~T(); > initialized = false; > } > } > > union { > T _value; > char valueless; > }; > bool initialized = false; > }; > > > template <typename T> > class optional_storage_base<T, true> > { > public: > constexpr optional_storage_base() noexcept : valueless{} {} > > template <typename... Args> > constexpr explicit optional_storage_base(in_place_t, Args&&... args) > : _value(std::forward<Args>(args)...), initialized(true) {} > > inline void destroy() { initialized = false; } > > union { > T _value; > char valueless; > }; > bool initialized = false; > }; > > > template <class T> > class optional_storage_impl : public optional_storage_base<T> > { > using super = optional_storage_base<T>; > public: > using super::super; > > template <typename... Args> > void construct(Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > { > ::new(std::addressof(this->_value)) T(std::forward<Args>(args)...); > this->initialized = true; > } > > > template <class Optional> > void assign(Optional&& rhs) > { > if (this->initialized) > { > if (rhs.initialized) { > this->_value = std::forward<Optional>(rhs).get(); > } > else { > this->destroy(); > } > } > else if (rhs.initialized) > { > construct(std::forward<Optional>(rhs).get()); > } > > } > > T &get() & noexcept { return this->_value; } > constexpr const T& get() const & noexcept { return this->_value; } > T &&get() && noexcept { return hsh::move(this->_value); } > constexpr const T &&get() const && noexcept { return hsh::move(this->_value); } > }; > > > template <class T, operation_support_trait = copy_constructor_traits<T>::traits> > class optional_storage_copy_constructor : public optional_storage_impl<T> > { > using super = optional_storage_impl<T>; > public: > using super::super; > }; > > template <class T> > class optional_storage_copy_constructor<T, operation_support_trait::available> : public optional_storage_impl<T> > { > using super = optional_storage_impl<T>; > public: > using super::super; > optional_storage_copy_constructor() = default; > optional_storage_copy_constructor(const optional_storage_copy_constructor& other) noexcept(std::is_nothrow_copy_constructible<T>::value) > { > if (other.initialized) { > this->construct(other.get()); > } > } > optional_storage_copy_constructor(optional_storage_copy_constructor&&) = default; > optional_storage_copy_constructor &operator=(const optional_storage_copy_constructor&) = default; > optional_storage_copy_constructor &operator=(optional_storage_copy_constructor&&) = default; > }; > > template <class T> > class optional_storage_copy_constructor<T, operation_support_trait::unavailable> : public optional_storage_impl<T> > { > using super = optional_storage_impl<T>; > public: > using super::super; > optional_storage_copy_constructor() = default; > optional_storage_copy_constructor(const optional_storage_copy_constructor&) = delete; > optional_storage_copy_constructor(optional_storage_copy_constructor&&) = default; > optional_storage_copy_constructor &operator=(const optional_storage_copy_constructor&) = default; > optional_storage_copy_constructor &operator=(optional_storage_copy_constructor&&) = default; > }; > > > template <class T, operation_support_trait = move_constructor_traits<T>::traits> > class optional_storage_move_constructor : public optional_storage_copy_constructor<T> > { > using super = optional_storage_copy_constructor<T>; > public: > using super::super; > }; > > template <class T> > class optional_storage_move_constructor<T, operation_support_trait::available> : public optional_storage_copy_constructor<T> > { > using super = optional_storage_copy_constructor<T>; > public: > using super::super; > optional_storage_move_constructor() = default; > optional_storage_move_constructor(const optional_storage_move_constructor&) = default; > optional_storage_move_constructor(optional_storage_move_constructor&& other) noexcept(std::is_nothrow_move_constructible<T>::value) > { > if (other.initialized) { > this->construct(std::move(other).get()); > } > } > optional_storage_move_constructor &operator=(const optional_storage_move_constructor&) = default; > optional_storage_move_constructor &operator=(optional_storage_move_constructor&&) = default; > }; > > template <class T> > class optional_storage_move_constructor<T, operation_support_trait::unavailable> : public optional_storage_copy_constructor<T> > { > using super = optional_storage_copy_constructor<T>; > public: > using super::super; > optional_storage_move_constructor() = default; > optional_storage_move_constructor(const optional_storage_move_constructor&) = default; > optional_storage_move_constructor(optional_storage_move_constructor&&) = delete; > optional_storage_move_constructor &operator=(const optional_storage_move_constructor&) = default; > optional_storage_move_constructor &operator=(optional_storage_move_constructor&&) = default; > }; > > > template <class T, operation_support_trait = copy_assignment_traits<T>::traits> > class optional_storage_copy_assignment : public optional_storage_move_constructor<T> > { > using super = optional_storage_move_constructor<T>; > public: > using super::super; > }; > > template <class T> > class optional_storage_copy_assignment<T, operation_support_trait::available> : public optional_storage_move_constructor<T> > { > using super = optional_storage_move_constructor<T>; > public: > using super::super; > optional_storage_copy_assignment() = default; > optional_storage_copy_assignment(const optional_storage_copy_assignment&) = default; > optional_storage_copy_assignment(optional_storage_copy_assignment&&) = default; > optional_storage_copy_assignment &operator=(const optional_storage_copy_assignment& other) > noexcept(conjunction<std::is_nothrow_copy_assignable<T>, std::is_nothrow_copy_constructible<T>>::value) > { > this->assign(other); > return *this; > } > optional_storage_copy_assignment &operator=(optional_storage_copy_assignment&&) = default; > }; > > template <class T> > class optional_storage_copy_assignment<T, operation_support_trait::unavailable> : public optional_storage_move_constructor<T> > { > using super = optional_storage_move_constructor<T>; > public: > using super::super; > optional_storage_copy_assignment() = default; > optional_storage_copy_assignment(const optional_storage_copy_assignment&) = default; > optional_storage_copy_assignment(optional_storage_copy_assignment&&) = default; > optional_storage_copy_assignment &operator=(const optional_storage_copy_assignment&) = delete;; > optional_storage_copy_assignment &operator=(optional_storage_copy_assignment&&) = default; > }; > > > template <class T, operation_support_trait = move_assignment_traits<T>::traits> > class optional_storage_move_assignment : public optional_storage_copy_assignment<T> > { > using super = optional_storage_copy_assignment<T>; > public: > using super::super; > }; > > template <class T> > class optional_storage_move_assignment<T, operation_support_trait::available> : public optional_storage_copy_assignment<T> > { > using super = optional_storage_copy_assignment<T>; > public: > using super::super; > optional_storage_move_assignment() = default; > optional_storage_move_assignment(const optional_storage_move_assignment&) = default; > optional_storage_move_assignment(optional_storage_move_assignment&&) = default; > optional_storage_move_assignment &operator=(const optional_storage_move_assignment&) = default; > optional_storage_move_assignment &operator=(optional_storage_move_assignment&& other) > noexcept(conjunction<std::is_nothrow_move_assignable<T>, std::is_nothrow_move_constructible<T>>::value) > { > this->assign(std::move(other)); > return *this; > } > }; > > template <class T> > class optional_storage_move_assignment<T, operation_support_trait::unavailable> : public optional_storage_copy_assignment<T> > { > using super = optional_storage_copy_assignment<T>; > public: > using super::super; > optional_storage_move_assignment() = default; > optional_storage_move_assignment(const optional_storage_move_assignment&) = default; > optional_storage_move_assignment(optional_storage_move_assignment&&) = default; > optional_storage_move_assignment &operator=(const optional_storage_move_assignment&) = default; > optional_storage_move_assignment &operator=(optional_storage_move_assignment&&) = delete; > }; > > template<typename Opt, > typename F, > typename R = hsh::invoke_result_t<F, decltype(*std::declval<Opt>())>, > enable_if_t<!std::is_same<R, void>::value>* = nullptr> > constexpr auto map_impl(Opt&& opt, F&& f) -> optional<R> > { > return opt ? hsh::invoke(hsh::forward<F>(f), *hsh::forward<Opt>(opt)) : optional<R>{}; > } > > template<typename Opt, > typename F, > typename R = hsh::invoke_result_t<F, decltype(*std::declval<Opt>())>, > enable_if_t<std::is_same<R, void>::value>* = nullptr, > typename Ret = hsh::monostate> > auto map_impl(Opt&& opt, F&& f) -> optional<Ret> > { > if (opt) > { > hsh::invoke(hsh::forward<F>(f), *hsh::forward<Opt>(opt)); > return hsh::monostate{}; > } > return hsh::nullopt; > } > } > > > class bad_optional_access : public std::logic_error > { > public: > bad_optional_access() : std::logic_error("hsh::bad_optional_access exception: optional has no value") {} > }; > > template <typename T, typename U> > struct is_constructible_convertible_from_optional > : disjunction<std::is_constructible<T, optional<U>&>, > std::is_constructible<T, optional<U>&&>, > std::is_constructible<T, const optional<U>&>, > std::is_constructible<T, const optional<U>&&>, > std::is_convertible<optional<U>&, T>, > std::is_convertible<optional<U>&&, T>, > std::is_convertible<const optional<U>&, T>, > std::is_convertible<const optional<U>&&, T>> {}; > > > template <typename T, typename U> > struct is_constructible_convertible_assignable_from_optional > : disjunction<is_constructible_convertible_from_optional<T, U>, > std::is_assignable<T&, optional<U>&>, > std::is_assignable<T&, optional<U>&&>, > std::is_assignable<T&, const optional<U>&>, > std::is_assignable<T&, const optional<U>&&>> {}; > > template <class T> > class optional : private optional_details::optional_storage_move_assignment<T> > { > using base = optional_details::optional_storage_move_assignment<T>; > public: > > static_assert(!std::is_reference<T>::value, "hsh::optional of a reference type is ill-formed, use std::reference_wrapper if you need a ref"); > static_assert(!std::is_same<T, in_place_t>::value, "hsh::optional of a in_place_t type is ill-formed"); > static_assert(!std::is_same<T, nullopt_t>::value, "hsh::optional of a nullopt_t type is ill-formed"); > > > constexpr optional() noexcept = default; > constexpr optional(nullopt_t) noexcept {} > optional(const optional &rhs) = default; > optional(optional &&rhs) = default; > > template < > typename U, > enable_if_t<conjunction<negation<std::is_same<T, U> >, > std::is_constructible<T, const U&>, > negation<is_constructible_convertible_from_optional<T, U> >, > std::is_convertible<const U&, T> >::value, bool> = false> > optional(const optional<U>& rhs) > { > if (rhs) { > this->construct(*rhs); > } > } > > template < > typename U, > hsh::enable_if_t< > hsh::conjunction< > hsh::negation<std::is_same<T, U>>, > std::is_constructible<T, const U&>, > hsh::negation< > hsh::is_constructible_convertible_from_optional<T, U>>, > hsh::negation<std::is_convertible<const U&, T>>>::value, bool> = false> > explicit optional(const optional<U>& rhs) > { > if (rhs) { > this->construct(*rhs); > } > } > > template < > typename U, > hsh::enable_if_t< > hsh::conjunction< > hsh::negation<std::is_same<T, U> >, > std::is_constructible<T, U&&>, > hsh::negation< > hsh::is_constructible_convertible_from_optional<T, U> >, > std::is_convertible<U&&, T> >::value, bool> = false> > optional(optional<U>&& rhs) > { > if (rhs) { > this->construct(std::move(*rhs)); > } > } > > template < > typename U, > enable_if_t< > conjunction< > negation<std::is_same<T, U>>, std::is_constructible<T, U&&>, > negation<is_constructible_convertible_from_optional<T, U>>, > negation<std::is_convertible<U&&, T>>>::value,bool> = false> > explicit optional(optional<U>&& rhs) > { > if (rhs) { > this->construct(std::move(*rhs)); > } > } > > template < > typename U = T, > enable_if_t< > conjunction<negation<std::is_same< > in_place_t, typename std::decay<U>::type> >, > negation<std::is_same< > optional<T>, typename std::decay<U>::type> >, > std::is_convertible<U&&, T>, > std::is_constructible<T, U&&> >::value,bool> = false> > constexpr optional(U&& other) : base(in_place, std::forward<U>(other)) {} > > template < > typename U = T, > enable_if_t< > conjunction<negation<std::is_same< > in_place_t, typename std::decay<U>::type>>, > negation<std::is_same< > optional<T>, typename std::decay<U>::type>>, > negation<std::is_convertible<U&&, T>>, > std::is_constructible<T, U&&>>::value, bool> = false> > constexpr explicit optional(U&& other) > : base(in_place, std::forward<U>(other)) {} > > template <typename InPlaceT, typename... Args, enable_if_t<conjunction<std::is_same<InPlaceT, in_place_t>, std::is_constructible<T, Args&&...> >::value>* = nullptr> > constexpr explicit optional(InPlaceT, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : base(in_place, std::forward<Args>(args)...) {} > > template <typename U, typename... Args, typename = enable_if_t<std::is_constructible<T, std::initializer_list<U>&, Args&&...>::value>> > constexpr explicit optional(in_place_t, std::initializer_list<U> ilist, Args&&... args) > noexcept(std::is_nothrow_constructible<T, std::initializer_list<U>&, Args...>::value) > : base(in_place, ilist, std::forward<Args>(args)...) {} > > > ~optional() = default; > > > optional& operator=(nullopt_t) noexcept { this->destroy(); return *this; } > optional& operator=(const optional& other) = default; > optional& operator=(optional&& other) = default; > > template < > typename U = T, > typename = hsh::enable_if_t<hsh::conjunction< > hsh::negation< > std::is_same<optional<T>, typename std::decay<U>::type>>, > hsh::negation< > hsh::conjunction<std::is_scalar<T>, > std::is_same<T, typename std::decay<U>::type>>>, > std::is_constructible<T, U>, std::is_assignable<T&, U>>::value>> > optional & operator=(U&& value) > { > if ( has_value() ) { > this->_value = std::forward<U>(value); > } else { > this->construct(std::forward<U>(value)); > } > return *this; > } > > template < > typename U, > typename = hsh::enable_if_t<hsh::conjunction< > hsh::negation<std::is_same<T, U>>, > std::is_constructible<T, const U&>, std::is_assignable<T&, const U&>, > hsh::negation<hsh::is_constructible_convertible_assignable_from_optional<T, U>>>::value>> > optional & operator=(const optional<U>& other) > { > if (has_value()) > { > if (other){ > this->_value = *other; > } else { > this->destroy(); > } > } > else if(other) > { > this->construct(*other); > } > return *this; > } > > template < > typename U, > typename = hsh::enable_if_t<hsh::conjunction< > hsh::negation<std::is_same<T, U>>, std::is_constructible<T, U>, > std::is_assignable<T&, U>, > hsh::negation< > hsh::is_constructible_convertible_assignable_from_optional<T, U>>>::value>> > optional& operator=(optional<U>&& other) > { > if (has_value()) > { > if (other) { > this->_value = std::move(*other); > } > else { > this->destroy(); > } > } > else if (other) > { > this->construct(std::move(*other)); > } > return *this; > } > > void swap(optional& rhs) noexcept(hsh::conjunction<std::is_nothrow_move_constructible<T>, hsh::is_nothrow_swappable<T>>::value) > { > using std::swap; > if (has_value()) > { > if (rhs.has_value()) > { > swap(**this, *rhs); > } > else > { > rhs.construct(std::move(this->_value)); > this->destroy(); > } > } > else if (rhs.has_value()) > { > this->construct(std::move(rhs._value)); > rhs.destroy(); > } > } > > explicit operator bool() const noexcept { return this->initialized; } > bool has_value() const noexcept { return this->initialized; } > > void reset() noexcept { this->destroy(); } > > constexpr const T* operator->() const noexcept { return std::addressof(this->_value); } > T* operator->() noexcept { return std::addressof(this->_value); } > > constexpr const T& operator*() const& noexcept { return this->_value; } > T& operator*() & noexcept { return this->_value; } > constexpr const T&& operator*() const && noexcept { return hsh::move(this->_value); } > T&& operator*() && noexcept { return hsh::move(this->_value); } > > const T& value() const & > { > if (!has_value()) { > throw bad_optional_access(); > } > return this->_value; > } > > T& value() & > { > if (!has_value()) { > throw bad_optional_access(); > } > return this->_value; > } > > T&& value() && > { > if (!has_value()) { > throw bad_optional_access(); > } > return std::move(this->_value); > } > > const T&& value() const && > { > if (!has_value()) { > throw bad_optional_access(); > } > return std::move(this->_value); > } > > template <typename U> > T value_or(U&& v) const& noexcept { return has_value() ? **this : static_cast<T>(std::forward<U>(v)); } > > template <typename U> > T value_or(U&& v) && noexcept { return has_value() ? std::move(**this) : static_cast<T>(std::forward<U>(v)); } > > template <class... Args, typename = enable_if_t<std::is_constructible<T,Args&&...>::value>> > T& emplace(Args&&... args) > { > this->destroy(); > this->construct(std::forward<Args>(args)...); > return this->_value; > } > > template< class U, class... Args, typename = enable_if_t<std::is_constructible<T,std::initializer_list<U>&, Args&&...>::value>> > T& emplace(std::initializer_list<U> il, Args&&... args) > { > this->destroy(); > this->construct(il, std::forward<Args>(args)...); > return this->_value; > } > > > > template<typename F> > auto map(F&& f) & -> decltype(optional_details::map_impl(*this, hsh::forward<F>(f))) > { > return optional_details::map_impl(*this, hsh::forward<F>(f)); > } > > template<typename F> > constexpr auto map(F&& f) const& -> decltype(optional_details::map_impl(*this, hsh::forward<F>(f))) > { > return optional_details::map_impl(*this, hsh::forward<F>(f)); > } > > template<typename F> > auto map(F&& f) && -> decltype(optional_details::map_impl(hsh::move(*this), hsh::forward<F>(f))) > { > return optional_details::map_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > template<typename F> > constexpr auto map(F&& f) const&& -> decltype(optional_details::map_impl(hsh::move(*this), hsh::forward<F>(f))) > { > return optional_details::map_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > > template<typename F> > auto and_then(F&& f) & -> hsh::invoke_result_t<F, T&> > { > using result = hsh::invoke_result_t<F, T&>; > static_assert(optional_details::is_optional<result>::value, "The functor passed to and_then must return an optional"); > return has_value() ? hsh::invoke(hsh::forward<F>(f), **this) : result{}; > } > > template<typename F> > constexpr auto and_then(F&& f) const & -> hsh::invoke_result_t<F, const T&> > { > using result = hsh::invoke_result_t<F, const T&>; > static_assert(optional_details::is_optional<result>::value, "The functor passed to and_then must return an optional"); > return has_value() ? hsh::invoke(hsh::forward<F>(f), **this) : result{}; > } > > template<typename F> > auto and_then(F&& f) && -> hsh::invoke_result_t<F, T&&> > { > using result = hsh::invoke_result_t<F, T&&>; > static_assert(optional_details::is_optional<result>::value, "The functor passed to and_then must return an optional"); > return has_value() ? hsh::invoke(hsh::forward<F>(f), hsh::move(**this)) : result{}; > } > > template<typename F> > constexpr auto and_then(F&& f) const && -> hsh::invoke_result_t<F, const T&&> > { > using result = hsh::invoke_result_t<F, const T&&>; > static_assert(optional_details::is_optional<result>::value, "The functor passed to and_then must return an optional"); > return has_value() ? hsh::invoke(hsh::forward<F>(f), hsh::move(**this)) : result{}; > } > > > template<typename F, enable_if_t<std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) & > { > if (has_value()) { > return *this; > } > hsh::invoke(hsh::forward<F>(f)); > return hsh::nullopt; > } > > template<typename F, enable_if_t<!std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) & > { > return has_value() ? *this : hsh::forward<F>(f)(); > } > > template<typename F, enable_if_t<std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) const & > { > if (has_value()) { > return *this; > } > hsh::invoke(hsh::forward<F>(f)); > return hsh::nullopt; > } > > template<typename F, enable_if_t<!std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) const & > { > return has_value() ? *this : hsh::forward<F>(f)(); > } > > template<typename F, enable_if_t<std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) && > { > if (has_value()) { > return hsh::move(*this); > } > hsh::invoke(hsh::forward<F>(f)); > return hsh::nullopt; > } > > template<typename F, enable_if_t<!std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) && > { > return has_value() ? hsh::move(*this) : hsh::forward<F>(f)(); > } > > template<typename F, enable_if_t<std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) const && > { > if (has_value()) { > return hsh::move(*this); > } > hsh::invoke(hsh::forward<F>(f)); > return hsh::nullopt; > } > > template<typename F, enable_if_t<!std::is_same<void, hsh::invoke_result_t<F>>::value>* = nullptr> > optional<T> or_else(F&& f) const && > { > return has_value() ? hsh::move(*this) : hsh::forward<F>(f)(); > } > }; > > template<class T> > void swap(optional<T>& lhs, optional<T>& rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } > > > template<class T1, class T2> > constexpr bool operator==(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(*x == *y)) { > return x ? (y && (*x == *y)) : !y; > } > > template<class T1, class T2> > constexpr bool operator!=(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(x == y)) { return !(x == y); } > > template<class T1, class T2> > constexpr bool operator<(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(*x < *y)) { > return y ? !x || (*x < *y) : false; > } > > template<class T1, class T2> > constexpr bool operator<=(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(y < x)) { return !(y < x); } > > template<class T1, class T2> > constexpr bool operator>(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(y < x)) { return (y < x); } > > template<class T1, class T2> > constexpr bool operator>=(const optional<T1>& x, const optional<T2>& y) noexcept(noexcept(x < y)) { return !(x < y); } > > template<class T> > constexpr bool operator==(const optional<T>& x, nullopt_t) noexcept { return !x; } > > template<class T> > constexpr bool operator==(nullopt_t, const optional<T>& x) noexcept { return !x; } > > template<class T> > constexpr bool operator!=(const optional<T>& x, nullopt_t) noexcept { return static_cast<bool>(x); } > > template<class T> > constexpr bool operator!=(nullopt_t, const optional<T>& x) noexcept { return static_cast<bool>(x); } > > template<class T> > constexpr bool operator<(const optional<T>& x, nullopt_t) noexcept { return false; } > > template<class T> > constexpr bool operator<(nullopt_t, const optional<T>& x) noexcept { return static_cast<bool>(x); } > > template<class T> > constexpr bool operator<=(const optional<T>& x, nullopt_t) noexcept { return !x; } > > template<class T> > constexpr bool operator<=(nullopt_t, const optional<T>& x) noexcept { return true; } > > template<class T> > constexpr bool operator>(const optional<T>& x, nullopt_t) noexcept { return static_cast<bool>(x); } > > template<class T> > constexpr bool operator>(nullopt_t, const optional<T>& x) noexcept { return false; } > > template<class T> > constexpr bool operator>=(const optional<T>& x, nullopt_t) noexcept { return true; } > > template<class T> > constexpr bool operator>=(nullopt_t, const optional<T>& x) noexcept { return !x; } > > > template <typename T> > optional<typename std::decay<T>::type> make_optional(T&& v) { > return optional<typename std::decay<T>::type>(std::forward<T>(v)); > } > > template <typename T, typename... Args> > optional<T> make_optional(Args&&... args) { > return optional<T>(in_place, std::forward<Args>(args)...); > } > > template <typename T, typename U, typename... Args> > optional<T> make_optional(std::initializer_list<U> il, Args&&... args) { > return optional<T>(in_place, il, std::forward<Args>(args)...); > } > >} ># 16 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 1 > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_generated_flags.h" 1 ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 16 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" ># 1 "/usr/include/c++/4.8.2/algorithm" 1 3 ># 58 "/usr/include/c++/4.8.2/algorithm" 3 > ># 59 "/usr/include/c++/4.8.2/algorithm" 3 > > > ># 1 "/usr/include/c++/4.8.2/bits/stl_algo.h" 1 3 ># 59 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 ># 1 "/usr/include/c++/4.8.2/cstdlib" 1 3 ># 39 "/usr/include/c++/4.8.2/cstdlib" 3 > ># 40 "/usr/include/c++/4.8.2/cstdlib" 3 ># 60 "/usr/include/c++/4.8.2/bits/stl_algo.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/algorithmfwd.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/algorithmfwd.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/algorithmfwd.h" 3 ># 42 "/usr/include/c++/4.8.2/bits/algorithmfwd.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 194 "/usr/include/c++/4.8.2/bits/algorithmfwd.h" 3 > template<typename _IIter, typename _Predicate> > bool > all_of(_IIter, _IIter, _Predicate); > > template<typename _IIter, typename _Predicate> > bool > any_of(_IIter, _IIter, _Predicate); > > > template<typename _FIter, typename _Tp> > bool > binary_search(_FIter, _FIter, const _Tp&); > > template<typename _FIter, typename _Tp, typename _Compare> > bool > binary_search(_FIter, _FIter, const _Tp&, _Compare); > > template<typename _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> > const _Tp& > max(const _Tp&, const _Tp&); > > template<typename _Tp, typename _Compare> > const _Tp& > max(const _Tp&, const _Tp&, _Compare); > > > > > template<typename _Tp> > const _Tp& > min(const _Tp&, const _Tp&); > > template<typename _Tp, typename _Compare> > const _Tp& > min(const _Tp&, const _Tp&, _Compare); > > > > > template<typename _Tp> > pair<const _Tp&, const _Tp&> > minmax(const _Tp&, const _Tp&); > > template<typename _Tp, typename _Compare> > pair<const _Tp&, const _Tp&> > minmax(const _Tp&, const _Tp&, _Compare); > > template<typename _FIter> > pair<_FIter, _FIter> > minmax_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > pair<_FIter, _FIter> > minmax_element(_FIter, _FIter, _Compare); > > template<typename _Tp> > _Tp > min(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > _Tp > min(initializer_list<_Tp>, _Compare); > > template<typename _Tp> > _Tp > max(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > _Tp > max(initializer_list<_Tp>, _Compare); > > template<typename _Tp> > pair<_Tp, _Tp> > minmax(initializer_list<_Tp>); > > template<typename _Tp, typename _Compare> > 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); > > template<typename _FIter> > void > rotate(_FIter, _FIter, _FIter); > > template<typename _FIter, typename _OIter> > _OIter > rotate_copy(_FIter, _FIter, _FIter, _OIter); ># 535 "/usr/include/c++/4.8.2/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); > > template<typename _Tp> > void > swap(_Tp&, _Tp&) > > noexcept(__and_<is_nothrow_move_constructible<_Tp>, > is_nothrow_move_assignable<_Tp>>::value) > > ; > > template<typename _Tp, size_t _Nm> > void > swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) > > noexcept(noexcept(swap(*__a, *__b))) > > ; > > 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> > _FIter > max_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > _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> > _FIter > min_element(_FIter, _FIter); > > template<typename _FIter, typename _Compare> > _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++/4.8.2/bits/stl_algo.h" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stl_heap.h" 1 3 ># 61 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > > > > template<typename _RandomAccessIterator, typename _Distance> > _Distance > __is_heap_until(_RandomAccessIterator __first, _Distance __n) > { > _Distance __parent = 0; > for (_Distance __child = 1; __child < __n; ++__child) > { > if (__first[__parent] < __first[__child]) > return __child; > if ((__child & 1) == 0) > ++__parent; > } > return __n; > } > > 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) > { return std::__is_heap_until(__first, __n) == __n; } > > template<typename _RandomAccessIterator, typename _Compare, > typename _Distance> > inline bool > __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) > { return std::__is_heap_until(__first, __n, __comp) == __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, __comp, std::distance(__first, __last)); } > > > > > template<typename _RandomAccessIterator, typename _Distance, typename _Tp> > void > __push_heap(_RandomAccessIterator __first, > _Distance __holeIndex, _Distance __topIndex, _Tp __value) > { > _Distance __parent = (__holeIndex - 1) / 2; > while (__holeIndex > __topIndex && *(__first + __parent) < __value) > { > *(__first + __holeIndex) = std::move(*(__first + __parent)); > __holeIndex = __parent; > __parent = (__holeIndex - 1) / 2; > } > *(__first + __holeIndex) = std::move(__value); > } ># 154 "/usr/include/c++/4.8.2/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; > > > > > > ; > ; > > _ValueType __value = std::move(*(__last - 1)); > std::__push_heap(__first, _DistanceType((__last - __first) - 1), > _DistanceType(0), std::move(__value)); > } > > 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); > } ># 204 "/usr/include/c++/4.8.2/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; > > > > > ; > ; > > _ValueType __value = std::move(*(__last - 1)); > std::__push_heap(__first, _DistanceType((__last - __first) - 1), > _DistanceType(0), std::move(__value), __comp); > } > > template<typename _RandomAccessIterator, typename _Distance, typename _Tp> > void > __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, > _Distance __len, _Tp __value) > { > const _Distance __topIndex = __holeIndex; > _Distance __secondChild = __holeIndex; > while (__secondChild < (__len - 1) / 2) > { > __secondChild = 2 * (__secondChild + 1); > if (*(__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; > } > std::__push_heap(__first, __holeIndex, __topIndex, > std::move(__value)); > } > > template<typename _RandomAccessIterator> > inline void > __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _RandomAccessIterator __result) > { > 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)); > } ># 279 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > inline void > pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > ; > ; > ; > > if (__last - __first > 1) > { > --__last; > std::__pop_heap(__first, __last, __last); > } > } > > 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; > } > std::__push_heap(__first, __holeIndex, __topIndex, > std::move(__value), __comp); > } > > 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); > } ># 357 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline void > pop_heap(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > > > > ; > ; > ; > > if (__last - __first > 1) > { > --__last; > std::__pop_heap(__first, __last, __last, __comp); > } > } ># 384 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > void > make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > 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)); > if (__parent == 0) > return; > __parent--; > } > } ># 424 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > 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--; > } > } ># 463 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > void > sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > ; > > while (__last - __first > 1) > { > --__last; > std::__pop_heap(__first, __last, __last); > } > } ># 492 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > 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); > } > } ># 521 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > inline _RandomAccessIterator > is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > > > > > > ; > > return __first + std::__is_heap_until(__first, std::distance(__first, > __last)); > } ># 547 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline _RandomAccessIterator > is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > > > > ; > > return __first + std::__is_heap_until(__first, std::distance(__first, > __last), > __comp); > } ># 569 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator> > inline bool > is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) > { return std::is_heap_until(__first, __last) == __last; } ># 582 "/usr/include/c++/4.8.2/bits/stl_heap.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline bool > is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { return std::is_heap_until(__first, __last, __comp) == __last; } > > > >} ># 62 "/usr/include/c++/4.8.2/bits/stl_algo.h" 2 3 > > > ># 1 "/usr/include/c++/4.8.2/random" 1 3 ># 32 "/usr/include/c++/4.8.2/random" 3 > ># 33 "/usr/include/c++/4.8.2/random" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/cmath" 1 3 ># 39 "/usr/include/c++/4.8.2/cmath" 3 > ># 40 "/usr/include/c++/4.8.2/cmath" 3 > > > > ># 1 "/usr/include/math.h" 1 3 4 ># 29 "/usr/include/math.h" 3 4 >extern "C" { > > > ># 1 "/usr/include/bits/huge_val.h" 1 3 4 ># 34 "/usr/include/math.h" 2 3 4 > ># 1 "/usr/include/bits/huge_valf.h" 1 3 4 ># 36 "/usr/include/math.h" 2 3 4 ># 1 "/usr/include/bits/huge_vall.h" 1 3 4 ># 37 "/usr/include/math.h" 2 3 4 > > ># 1 "/usr/include/bits/inf.h" 1 3 4 ># 40 "/usr/include/math.h" 2 3 4 > > ># 1 "/usr/include/bits/nan.h" 1 3 4 ># 43 "/usr/include/math.h" 2 3 4 > > > ># 1 "/usr/include/bits/mathdef.h" 1 3 4 ># 28 "/usr/include/bits/mathdef.h" 3 4 >typedef float float_t; >typedef double double_t; ># 47 "/usr/include/math.h" 2 3 4 ># 70 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 52 "/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 pow10 (double __x) throw (); extern double __pow10 (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 (); > > > > >extern int __isinf (double __value) throw () __attribute__ ((__const__)); > > >extern int __finite (double __value) throw () __attribute__ ((__const__)); > > > > > >extern int isinf (double __value) throw () __attribute__ ((__const__)); > > >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 () __attribute__ ((__const__)); extern double __nan (const char *__tagb) throw () __attribute__ ((__const__)); > > > > > >extern int __isnan (double __value) throw () __attribute__ ((__const__)); > > > >extern int isnan (double __value) throw () __attribute__ ((__const__)); > > >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 () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); > >extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); > > > >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 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 (); >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 (); >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 int __fpclassify (double __value) throw () > __attribute__ ((__const__)); > > >extern int __signbit (double __value) 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 scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); ># 71 "/usr/include/math.h" 2 3 4 ># 89 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 52 "/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 pow10f (float __x) throw (); extern float __pow10f (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 (); > > > > >extern int __isinff (float __value) throw () __attribute__ ((__const__)); > > >extern int __finitef (float __value) throw () __attribute__ ((__const__)); > > > > > >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 () __attribute__ ((__const__)); extern float __nanf (const char *__tagb) throw () __attribute__ ((__const__)); > > > > > >extern int __isnanf (float __value) throw () __attribute__ ((__const__)); > > > >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 () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); > >extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); > > > >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 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 (); >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 (); >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 int __fpclassifyf (float __value) throw () > __attribute__ ((__const__)); > > >extern int __signbitf (float __value) 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 scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); ># 90 "/usr/include/math.h" 2 3 4 ># 133 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 52 "/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 pow10l (long double __x) throw (); extern long double __pow10l (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 (); > > > > >extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); > > >extern int __finitel (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 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 () __attribute__ ((__const__)); extern long double __nanl (const char *__tagb) throw () __attribute__ ((__const__)); > > > > > >extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); > > > >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 () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); > >extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); > > > >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 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 (); >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 (); >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 int __fpclassifyl (long double __value) throw () > __attribute__ ((__const__)); > > >extern int __signbitl (long double __value) 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 scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); ># 134 "/usr/include/math.h" 2 3 4 ># 149 "/usr/include/math.h" 3 4 >extern int signgam; ># 190 "/usr/include/math.h" 3 4 >enum > { > FP_NAN = > > 0, > FP_INFINITE = > > 1, > FP_ZERO = > > 2, > FP_SUBNORMAL = > > 3, > FP_NORMAL = > > 4 > }; ># 288 "/usr/include/math.h" 3 4 >typedef enum >{ > _IEEE_ = -1, > _SVID_, > _XOPEN_, > _POSIX_, > _ISOC_ >} _LIB_VERSION_TYPE; > > > > >extern _LIB_VERSION_TYPE _LIB_VERSION; ># 311 "/usr/include/math.h" 3 4 >struct __exception > > > > { > int type; > char *name; > double arg1; > double arg2; > double retval; > }; > > >extern int matherr (struct __exception *__exc) throw (); ># 413 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathinline.h" 1 3 4 ># 123 "/usr/include/bits/mathinline.h" 3 4 > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) __signbitf (float __x) throw () >{ > > int __m; > __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); > return (__m & 0x8) != 0; > > > > >} >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) __signbit (double __x) throw () >{ > > int __m; > __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); > return (__m & 0x80) != 0; > > > > >} >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) __signbitl (long double __x) throw () >{ > __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; > return (__u.__i[2] & 0x8000) != 0; >} > > ># 414 "/usr/include/math.h" 2 3 4 ># 475 "/usr/include/math.h" 3 4 >} ># 45 "/usr/include/c++/4.8.2/cmath" 2 3 ># 75 "/usr/include/c++/4.8.2/cmath" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > 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); } > > > template<typename _Tp> > inline constexpr > typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, > double>::__type > abs(_Tp __x) > { return __builtin_fabs(__x); } > > 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); } ># 431 "/usr/include/c++/4.8.2/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); } > > >} ># 555 "/usr/include/c++/4.8.2/cmath" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > 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)); > } ># 916 "/usr/include/c++/4.8.2/cmath" 3 > >} ># 1032 "/usr/include/c++/4.8.2/cmath" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > 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); } > > >} ># 39 "/usr/include/c++/4.8.2/random" 2 3 ># 1 "/usr/include/c++/4.8.2/cstdio" 1 3 ># 39 "/usr/include/c++/4.8.2/cstdio" 3 > ># 40 "/usr/include/c++/4.8.2/cstdio" 3 ># 40 "/usr/include/c++/4.8.2/random" 2 3 ># 1 "/usr/include/c++/4.8.2/cstdlib" 1 3 ># 39 "/usr/include/c++/4.8.2/cstdlib" 3 > ># 40 "/usr/include/c++/4.8.2/cstdlib" 3 ># 41 "/usr/include/c++/4.8.2/random" 2 3 > > ># 1 "/usr/include/c++/4.8.2/limits" 1 3 ># 40 "/usr/include/c++/4.8.2/limits" 3 > ># 41 "/usr/include/c++/4.8.2/limits" 3 ># 147 "/usr/include/c++/4.8.2/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 > }; ># 191 "/usr/include/c++/4.8.2/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; ># 277 "/usr/include/c++/4.8.2/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; > }; ># 303 "/usr/include/c++/4.8.2/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> { }; > > > > > > > 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 -127 - 1; } > > static constexpr signed char > max() noexcept { return 127; } > > > 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 127 * 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; > }; > > > > 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 -32767 - 1; } > > static constexpr short > max() noexcept { return 32767; } > > > 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 32767 * 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 -2147483647 - 1; } > > static constexpr int > max() noexcept { return 2147483647; } > > > 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 2147483647 * 2U + 1; } > > > static constexpr unsigned int > lowest() noexcept { return min(); } > > > static constexpr int digits > = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); > static constexpr int digits10 > = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); > > static constexpr int max_digits10 = 0; > > static constexpr bool is_signed = false; > static constexpr bool is_integer = true; > static constexpr bool is_exact = true; > static constexpr int radix = 2; > > static constexpr unsigned int > epsilon() noexcept { return 0; } > > static constexpr unsigned int > round_error() noexcept { return 0; } > > static constexpr int min_exponent = 0; > static constexpr int min_exponent10 = 0; > static constexpr int max_exponent = 0; > static constexpr int max_exponent10 = 0; > > static constexpr bool has_infinity = false; > static constexpr bool has_quiet_NaN = false; > static constexpr bool has_signaling_NaN = false; > static constexpr float_denorm_style has_denorm > = denorm_absent; > static constexpr bool has_denorm_loss = false; > > static constexpr unsigned int > infinity() noexcept { 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 -9223372036854775807L - 1; } > > static constexpr long > max() noexcept { return 9223372036854775807L; } > > > static constexpr long > lowest() noexcept { return min(); } > > > static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); > static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); > > static constexpr int max_digits10 = 0; > > static constexpr bool is_signed = true; > static constexpr bool is_integer = true; > static constexpr bool is_exact = true; > static constexpr int radix = 2; > > static constexpr long > epsilon() noexcept { return 0; } > > static constexpr long > round_error() noexcept { 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 9223372036854775807L * 2UL + 1; } > > > static constexpr unsigned long > lowest() noexcept { return min(); } > > > static constexpr int digits > = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); > static constexpr int digits10 > = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); > > static constexpr int max_digits10 = 0; > > static constexpr bool is_signed = false; > static constexpr bool is_integer = true; > static constexpr bool is_exact = true; > static constexpr int radix = 2; > > static constexpr unsigned long > epsilon() noexcept { return 0; } > > static constexpr unsigned long > round_error() noexcept { return 0; } > > static constexpr int min_exponent = 0; > static constexpr int min_exponent10 = 0; > static constexpr int max_exponent = 0; > static constexpr int max_exponent10 = 0; > > static constexpr bool has_infinity = false; > static constexpr bool has_quiet_NaN = false; > static constexpr bool has_signaling_NaN = false; > static constexpr float_denorm_style has_denorm > = denorm_absent; > static constexpr bool has_denorm_loss = false; > > static constexpr unsigned long > infinity() noexcept > { return static_cast<unsigned long>(0); } > > static constexpr unsigned long > quiet_NaN() noexcept > { return static_cast<unsigned long>(0); } > > static constexpr unsigned long > signaling_NaN() noexcept > { 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 -9223372036854775807LL - 1; } > > static constexpr long long > max() noexcept { return 9223372036854775807LL; } > > > 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 9223372036854775807LL * 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; > }; ># 1552 "/usr/include/c++/4.8.2/limits" 3 > template<> > struct numeric_limits<float> > { > static constexpr bool is_specialized = true; > > static constexpr float > min() noexcept { return 1.17549435082228750797e-38F; } > > static constexpr float > max() noexcept { return 3.40282346638528859812e+38F; } > > > static constexpr float > lowest() noexcept { return -3.40282346638528859812e+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.19209289550781250000e-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.40129846432481707092e-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.22507385850720138309e-308L); } > > static constexpr double > max() noexcept { return double(1.79769313486231570815e+308L); } > > > static constexpr double > lowest() noexcept { return -double(1.79769313486231570815e+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.22044604925031308085e-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.94065645841246544177e-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.36210314311209350626e-4932L; } > > static constexpr long double > max() noexcept { return 1.18973149535723176502e+4932L; } > > > static constexpr long double > lowest() noexcept { return -1.18973149535723176502e+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.08420217248550443401e-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.64519953188247460253e-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; > }; > > > > > > >} ># 44 "/usr/include/c++/4.8.2/random" 2 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/bits/random.h" 1 3 ># 36 "/usr/include/c++/4.8.2/bits/random.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/4.8.2/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 _Tp> > inline bool > _Power_of_2(_Tp __x) > { > return ((__x - 1) & __x) == 0; > }; > > > > > > template<typename _Engine, typename _DInputType> > struct _Adaptor > { > > 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; > }; > > > } > > ># 240 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> > class linear_congruential_engine > { > static_assert(std::is_unsigned<_UIntType>::value, "template argument " > "substituting _UIntType not an unsigned integral type"); > static_assert(__m == 0u || (__a < __m && __c < __m), > "template argument substituting __m out of bounds"); > > 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; ># 267 "/usr/include/c++/4.8.2/bits/random.h" 3 > explicit > linear_congruential_engine(result_type __s = default_seed) > { seed(__s); } > > > > > > > > template<typename _Sseq, typename = typename > std::enable_if<!std::is_same<_Sseq, linear_congruential_engine>::value> > ::type> > explicit > linear_congruential_engine(_Sseq& __q) > { seed(__q); } > > > > > > > > void > seed(result_type __s = default_seed); ># 300 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _Sseq> > typename std::enable_if<std::is_class<_Sseq>::value>::type > 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; > } ># 352 "/usr/include/c++/4.8.2/bits/random.h" 3 > friend bool > operator==(const linear_congruential_engine& __lhs, > const linear_congruential_engine& __rhs) > { return __lhs._M_x == __rhs._M_x; } ># 365 "/usr/include/c++/4.8.2/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); ># 385 "/usr/include/c++/4.8.2/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; > }; ># 407 "/usr/include/c++/4.8.2/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); } ># 444 "/usr/include/c++/4.8.2/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, "template argument " > "substituting _UIntType not 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"); > > 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; > > > explicit > mersenne_twister_engine(result_type __sd = default_seed) > { seed(__sd); } > > > > > > > > template<typename _Sseq, typename = typename > std::enable_if<!std::is_same<_Sseq, mersenne_twister_engine>::value> > ::type> > explicit > mersenne_twister_engine(_Sseq& __q) > { seed(__q); } > > void > seed(result_type __sd = default_seed); > > template<typename _Sseq> > typename std::enable_if<std::is_class<_Sseq>::value>::type > 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()(); ># 558 "/usr/include/c++/4.8.2/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); } ># 576 "/usr/include/c++/4.8.2/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); ># 602 "/usr/include/c++/4.8.2/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; > }; ># 635 "/usr/include/c++/4.8.2/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); } ># 667 "/usr/include/c++/4.8.2/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, "template argument " > "substituting _UIntType not an unsigned integral type"); > static_assert(0u < __s && __s < __r, > "template argument substituting __s out of bounds"); > static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, > "template argument substituting __w out of bounds"); > > 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; > > > > > > explicit > subtract_with_carry_engine(result_type __sd = default_seed) > { seed(__sd); } > > > > > > > > template<typename _Sseq, typename = typename > std::enable_if<!std::is_same<_Sseq, subtract_with_carry_engine>::value> > ::type> > explicit > subtract_with_carry_engine(_Sseq& __q) > { seed(__q); } ># 720 "/usr/include/c++/4.8.2/bits/random.h" 3 > void > seed(result_type __sd = default_seed); > > > > > > template<typename _Sseq> > typename std::enable_if<std::is_class<_Sseq>::value>::type > 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()(); ># 775 "/usr/include/c++/4.8.2/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); } ># 794 "/usr/include/c++/4.8.2/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>&, > const std::subtract_with_carry_engine<_UIntType1, __w1, > __s1, __r1>&); ># 813 "/usr/include/c++/4.8.2/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>&, > std::subtract_with_carry_engine<_UIntType1, __w1, > __s1, __r1>&); > > private: > _UIntType _M_x[long_lag]; > _UIntType _M_carry; > size_t _M_p; > }; ># 838 "/usr/include/c++/4.8.2/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); } ># 853 "/usr/include/c++/4.8.2/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; > > > 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 = typename > std::enable_if<!std::is_same<_Sseq, discard_block_engine>::value > && !std::is_same<_Sseq, _RandomNumberEngine>::value> > ::type> > 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> > void > 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()(); ># 1003 "/usr/include/c++/4.8.2/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; } ># 1019 "/usr/include/c++/4.8.2/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); ># 1037 "/usr/include/c++/4.8.2/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; > }; ># 1060 "/usr/include/c++/4.8.2/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, "template argument " > "substituting _UIntType not an unsigned integral type"); > static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, > "template argument substituting __w out of bounds"); > > 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 = typename > std::enable_if<!std::is_same<_Sseq, independent_bits_engine>::value > && !std::is_same<_Sseq, _RandomNumberEngine>::value> > ::type> > 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> > void > 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()(); ># 1213 "/usr/include/c++/4.8.2/bits/random.h" 3 > friend bool > operator==(const independent_bits_engine& __lhs, > const independent_bits_engine& __rhs) > { return __lhs._M_b == __rhs._M_b; } ># 1230 "/usr/include/c++/4.8.2/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; > }; ># 1256 "/usr/include/c++/4.8.2/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); } ># 1274 "/usr/include/c++/4.8.2/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; > > 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 = typename > std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value > && !std::is_same<_Sseq, _RandomNumberEngine>::value> > ::type> > 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> > void > 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()(); ># 1442 "/usr/include/c++/4.8.2/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); } ># 1460 "/usr/include/c++/4.8.2/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); ># 1478 "/usr/include/c++/4.8.2/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; > }; ># 1508 "/usr/include/c++/4.8.2/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; ># 1537 "/usr/include/c++/4.8.2/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; > > > > > > explicit > random_device(const std::string& __token = "default") > { > _M_init(__token); > } > > ~random_device() > { _M_fini(); } ># 1604 "/usr/include/c++/4.8.2/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 0.0; } > > 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(); > > union > { > FILE* _M_file; > mt19937 _M_mt; > }; > }; ># 1665 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class uniform_int_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not an integral type"); > > public: > > typedef _IntType result_type; > > struct param_type > { > typedef uniform_int_distribution<_IntType> distribution_type; > > explicit > param_type(_IntType __a = 0, > _IntType __b = std::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; } > > private: > _IntType _M_a; > _IntType _M_b; > }; > > public: > > > > explicit > uniform_int_distribution(_IntType __a = 0, > _IntType __b = std::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> > inline bool > operator!=(const std::uniform_int_distribution<_IntType>& __d1, > const std::uniform_int_distribution<_IntType>& __d2) > { return !(__d1 == __d2); } ># 1839 "/usr/include/c++/4.8.2/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>&); ># 1853 "/usr/include/c++/4.8.2/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>&); ># 1866 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class uniform_real_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef uniform_real_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __a = _RealType(0), > _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; } > > private: > _RealType _M_a; > _RealType _M_b; > }; > > public: > > > > > > > explicit > uniform_real_distribution(_RealType __a = _RealType(0), > _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); } ># 2048 "/usr/include/c++/4.8.2/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>&); ># 2062 "/usr/include/c++/4.8.2/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>&); ># 2084 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class normal_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef normal_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __mean = _RealType(0), > _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); } > > private: > _RealType _M_mean; > _RealType _M_stddev; > }; > > public: > > > > > explicit > normal_distribution(result_type __mean = result_type(0), > 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); ># 2245 "/usr/include/c++/4.8.2/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); ># 2260 "/usr/include/c++/4.8.2/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); } ># 2297 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class lognormal_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef lognormal_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __m = _RealType(0), > _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; } > > private: > _RealType _M_m; > _RealType _M_s; > }; > > explicit > lognormal_distribution(_RealType __m = _RealType(0), > _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); } ># 2449 "/usr/include/c++/4.8.2/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); ># 2464 "/usr/include/c++/4.8.2/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); } ># 2501 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class gamma_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef gamma_distribution<_RealType> distribution_type; > friend class gamma_distribution<_RealType>; > > explicit > param_type(_RealType __alpha_val = _RealType(1), > _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); } > > private: > void > _M_initialize(); > > _RealType _M_alpha; > _RealType _M_beta; > > _RealType _M_malpha, _M_a2; > }; > > public: > > > > > explicit > gamma_distribution(_RealType __alpha_val = _RealType(1), > _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); } ># 2670 "/usr/include/c++/4.8.2/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); ># 2684 "/usr/include/c++/4.8.2/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); } ># 2718 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class chi_squared_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef chi_squared_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __n = _RealType(1)) > : _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; } > > private: > _RealType _M_n; > }; > > explicit > chi_squared_distribution(_RealType __n = _RealType(1)) > : _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; } > > > > > 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; } ># 2872 "/usr/include/c++/4.8.2/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); ># 2887 "/usr/include/c++/4.8.2/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); } ># 2928 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class cauchy_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef cauchy_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __a = _RealType(0), > _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; } > > private: > _RealType _M_a; > _RealType _M_b; > }; > > explicit > cauchy_distribution(_RealType __a = _RealType(0), > _RealType __b = _RealType(1)) > : _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); } ># 3098 "/usr/include/c++/4.8.2/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); ># 3113 "/usr/include/c++/4.8.2/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); ># 3129 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class fisher_f_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef fisher_f_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __m = _RealType(1), > _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; } > > private: > _RealType _M_m; > _RealType _M_n; > }; > > explicit > fisher_f_distribution(_RealType __m = _RealType(1), > _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); } ># 3296 "/usr/include/c++/4.8.2/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); ># 3311 "/usr/include/c++/4.8.2/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); } ># 3353 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class student_t_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef student_t_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __n = _RealType(1)) > : _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; } > > private: > _RealType _M_n; > }; > > explicit > student_t_distribution(_RealType __n = _RealType(1)) > : _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); } ># 3509 "/usr/include/c++/4.8.2/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); ># 3524 "/usr/include/c++/4.8.2/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); } ># 3572 "/usr/include/c++/4.8.2/bits/random.h" 3 > class bernoulli_distribution > { > public: > > typedef bool result_type; > > struct param_type > { > typedef bernoulli_distribution distribution_type; > > explicit > param_type(double __p = 0.5) > : _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; } > > private: > double _M_p; > }; > > public: > > > > > > > explicit > bernoulli_distribution(double __p = 0.5) > : _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); } ># 3743 "/usr/include/c++/4.8.2/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); ># 3757 "/usr/include/c++/4.8.2/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; > } ># 3776 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class binomial_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not an integral type"); > > public: > > typedef _IntType result_type; > > struct param_type > { > typedef binomial_distribution<_IntType> distribution_type; > friend class binomial_distribution<_IntType>; > > explicit > param_type(_IntType __t = _IntType(1), 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; } > > 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; > }; > > > explicit > binomial_distribution(_IntType __t = _IntType(1), > 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; } ># 3949 "/usr/include/c++/4.8.2/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); ># 3965 "/usr/include/c++/4.8.2/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); } ># 4007 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class geometric_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not an integral type"); > > public: > > typedef _IntType result_type; > > struct param_type > { > typedef geometric_distribution<_IntType> distribution_type; > friend class geometric_distribution<_IntType>; > > explicit > param_type(double __p = 0.5) > : _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; } > > private: > void > _M_initialize() > { _M_log_1_p = std::log(1.0 - _M_p); } > > double _M_p; > > double _M_log_1_p; > }; > > > explicit > geometric_distribution(double __p = 0.5) > : _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); } ># 4178 "/usr/include/c++/4.8.2/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); ># 4193 "/usr/include/c++/4.8.2/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); ># 4207 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class negative_binomial_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not an integral type"); > > public: > > typedef _IntType result_type; > > struct param_type > { > typedef negative_binomial_distribution<_IntType> distribution_type; > > explicit > param_type(_IntType __k = 1, 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; } > > private: > _IntType _M_k; > double _M_p; > }; > > explicit > negative_binomial_distribution(_IntType __k = 1, 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; } ># 4366 "/usr/include/c++/4.8.2/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); ># 4381 "/usr/include/c++/4.8.2/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); } ># 4429 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class poisson_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not an integral type"); > > public: > > typedef _IntType result_type; > > struct param_type > { > typedef poisson_distribution<_IntType> distribution_type; > friend class poisson_distribution<_IntType>; > > explicit > param_type(double __mean = 1.0) > : _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; } > > 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; > > }; > > > explicit > poisson_distribution(double __mean = 1.0) > : _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; } ># 4586 "/usr/include/c++/4.8.2/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); ># 4601 "/usr/include/c++/4.8.2/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); } ># 4645 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class exponential_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef exponential_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __lambda = _RealType(1)) > : _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; } > > private: > _RealType _M_lambda; > }; > > public: > > > > > explicit > exponential_distribution(const result_type& __lambda = result_type(1)) > : _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); } ># 4817 "/usr/include/c++/4.8.2/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); ># 4832 "/usr/include/c++/4.8.2/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); ># 4847 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class weibull_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef weibull_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __a = _RealType(1), > _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; } > > private: > _RealType _M_a; > _RealType _M_b; > }; > > explicit > weibull_distribution(_RealType __a = _RealType(1), > _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); } ># 5020 "/usr/include/c++/4.8.2/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); ># 5035 "/usr/include/c++/4.8.2/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); ># 5050 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class extreme_value_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not a floating point type"); > > public: > > typedef _RealType result_type; > > struct param_type > { > typedef extreme_value_distribution<_RealType> distribution_type; > > explicit > param_type(_RealType __a = _RealType(0), > _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; } > > private: > _RealType _M_a; > _RealType _M_b; > }; > > explicit > extreme_value_distribution(_RealType __a = _RealType(0), > _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); } ># 5223 "/usr/include/c++/4.8.2/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); ># 5238 "/usr/include/c++/4.8.2/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); ># 5250 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _IntType = int> > class discrete_distribution > { > static_assert(std::is_integral<_IntType>::value, > "template argument not 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; } > > 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; } ># 5431 "/usr/include/c++/4.8.2/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); ># 5447 "/usr/include/c++/4.8.2/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); } ># 5480 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class piecewise_constant_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not 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; } > > private: > void > _M_initialize(); > > std::vector<_RealType> _M_int; > std::vector<double> _M_den; > std::vector<double> _M_cp; > }; > > explicit > 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; } ># 5698 "/usr/include/c++/4.8.2/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); ># 5714 "/usr/include/c++/4.8.2/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); } ># 5747 "/usr/include/c++/4.8.2/bits/random.h" 3 > template<typename _RealType = double> > class piecewise_linear_distribution > { > static_assert(std::is_floating_point<_RealType>::value, > "template argument not 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); } > > private: > void > _M_initialize(); > > std::vector<_RealType> _M_int; > std::vector<double> _M_den; > std::vector<double> _M_cp; > std::vector<double> _M_m; > }; > > explicit > 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; } ># 5968 "/usr/include/c++/4.8.2/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); ># 5984 "/usr/include/c++/4.8.2/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); } ># 6025 "/usr/include/c++/4.8.2/bits/random.h" 3 > class seed_seq > { > > public: > > typedef uint_least32_t result_type; > > > seed_seq() > : _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 > { return _M_v.size(); } > > template<typename OutputIterator> > void > param(OutputIterator __dest) const > { std::copy(_M_v.begin(), _M_v.end(), __dest); } > > private: > > std::vector<result_type> _M_v; > }; > > > > > > >} ># 51 "/usr/include/c++/4.8.2/random" 2 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/opt_random.h" 1 3 ># 33 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/opt_random.h" 3 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 1 3 4 ># 27 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/ia32intrin.h" 1 3 4 ># 29 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/ia32intrin.h" 3 4 >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bsfd (int __X) >{ > return __builtin_ctz (__X); >} > > >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bsrd (int __X) >{ > return __builtin_ia32_bsrsi (__X); >} > > >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bswapd (int __X) >{ > return __builtin_bswap32 (__X); >} ># 77 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/ia32intrin.h" 3 4 >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__popcntd (unsigned int __X) >{ > return __builtin_popcount (__X); >} > > >extern __inline unsigned long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rdpmc (int __S) >{ > return __builtin_ia32_rdpmc (__S); >} > > >extern __inline unsigned long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rdtsc (void) >{ > return __builtin_ia32_rdtsc (); >} > > >extern __inline unsigned long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rdtscp (unsigned int *__A) >{ > return __builtin_ia32_rdtscp (__A); >} > > >extern __inline unsigned char >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rolb (unsigned char __X, int __C) >{ > return __builtin_ia32_rolqi (__X, __C); >} > > >extern __inline unsigned short >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rolw (unsigned short __X, int __C) >{ > return __builtin_ia32_rolhi (__X, __C); >} > > >extern __inline unsigned int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rold (unsigned int __X, int __C) >{ > return (__X << __C) | (__X >> (32 - __C)); >} > > >extern __inline unsigned char >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rorb (unsigned char __X, int __C) >{ > return __builtin_ia32_rorqi (__X, __C); >} > > >extern __inline unsigned short >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rorw (unsigned short __X, int __C) >{ > return __builtin_ia32_rorhi (__X, __C); >} > > >extern __inline unsigned int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rord (unsigned int __X, int __C) >{ > return (__X >> __C) | (__X << (32 - __C)); >} > > >extern __inline void >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__pause (void) >{ > __builtin_ia32_pause (); >} > > > >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bsfq (long long __X) >{ > return __builtin_ctzll (__X); >} > > >extern __inline int >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bsrq (long long __X) >{ > return __builtin_ia32_bsrdi (__X); >} > > >extern __inline long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__bswapq (long long __X) >{ > return __builtin_bswap64 (__X); >} ># 200 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/ia32intrin.h" 3 4 >extern __inline long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__popcntq (unsigned long long __X) >{ > return __builtin_popcountll (__X); >} > > >extern __inline unsigned long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rolq (unsigned long long __X, int __C) >{ > return (__X << __C) | (__X >> (64 - __C)); >} > > >extern __inline unsigned long long >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >__rorq (unsigned long long __X, int __C) >{ > return (__X >> __C) | (__X << (64 - __C)); >} ># 28 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/mmintrin.h" 1 3 4 ># 35 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/mmintrin.h" 3 4 >typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); > > >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); >} > > > >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); >} > > > >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); >} ># 31 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 1 3 4 ># 38 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/mm_malloc.h" 1 3 4 ># 34 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/mm_malloc.h" 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); >} ># 39 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 2 3 4 > > > >typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); > > >typedef float __v4sf __attribute__ ((__vector_size__ (16))); > > > > > > >enum _mm_hint >{ > _MM_HINT_T0 = 3, > _MM_HINT_T1 = 2, > _MM_HINT_T2 = 1, > _MM_HINT_NTA = 0 >}; ># 88 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 3 4 >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) __builtin_ia32_addps ((__v4sf)__A, (__v4sf)__B); >} > >extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_sub_ps (__m128 __A, __m128 __B) >{ > return (__m128) __builtin_ia32_subps ((__v4sf)__A, (__v4sf)__B); >} > >extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_mul_ps (__m128 __A, __m128 __B) >{ > return (__m128) __builtin_ia32_mulps ((__v4sf)__A, (__v4sf)__B); >} > >extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_div_ps (__m128 __A, __m128 __B) >{ > return (__m128) __builtin_ia32_divps ((__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); >} > > > >extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shuffle_ps (__m128 __A, __m128 __B, int const __mask) >{ > return (__m128) __builtin_ia32_shufps ((__v4sf)__A, (__v4sf)__B, __mask); >} > > > > > > > >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) *(__v4sf *)__P; >} > > >extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_loadu_ps (float const *__P) >{ > return (__m128) __builtin_ia32_loadups (__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 = __builtin_ia32_vec_ext_v4sf ((__v4sf)__A, 0); >} > >extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cvtss_f32 (__m128 __A) >{ > return __builtin_ia32_vec_ext_v4sf ((__v4sf)__A, 0); >} > > >extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_store_ps (float *__P, __m128 __A) >{ > *(__v4sf *)__P = (__v4sf)__A; >} > > >extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_storeu_ps (float *__P, __m128 __A) >{ > __builtin_ia32_storeups (__P, (__v4sf)__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_ia32_movss ((__v4sf)__A, (__v4sf)__B); >} > > > >extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_extract_pi16 (__m64 const __A, int const __N) >{ > return __builtin_ia32_vec_ext_v4hi ((__v4hi)__A, __N); >} > >extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_m_pextrw (__m64 const __A, int const __N) >{ > return _mm_extract_pi16 (__A, __N); >} ># 1011 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 3 4 >extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_insert_pi16 (__m64 const __A, int const __D, int const __N) >{ > return (__m64) __builtin_ia32_vec_set_v4hi ((__v4hi)__A, __D, __N); >} > >extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_m_pinsrw (__m64 const __A, int const __D, int const __N) >{ > return _mm_insert_pi16 (__A, __D, __N); >} ># 1031 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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); >} > > > > >extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shuffle_pi16 (__m64 __A, int const __N) >{ > return (__m64) __builtin_ia32_pshufw ((__v4hi)__A, __N); >} > >extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_m_pshufw (__m64 __A, int const __N) >{ > return _mm_shuffle_pi16 (__A, __N); >} ># 1133 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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_prefetch (const void *__P, enum _mm_hint __I) >{ > __builtin_prefetch (__P, 0, __I); >} > > > > > > >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 (); >} > > > > >extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_pause (void) >{ > __builtin_ia32_pause (); >} ># 1246 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/emmintrin.h" 1 3 4 ># 35 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/emmintrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 1 3 4 ># 36 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/emmintrin.h" 2 3 4 > > >typedef double __v2df __attribute__ ((__vector_size__ (16))); >typedef long long __v2di __attribute__ ((__vector_size__ (16))); >typedef int __v4si __attribute__ ((__vector_size__ (16))); >typedef short __v8hi __attribute__ ((__vector_size__ (16))); >typedef char __v16qi __attribute__ ((__vector_size__ (16))); > > > >typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); >typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); > > > > > > >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_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 (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); >} > > >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 __builtin_ia32_loadupd (__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) >{ > __builtin_ia32_storeupd (__P, __A); >} > > >extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_store_sd (double *__P, __m128d __A) >{ > *__P = __builtin_ia32_vec_ext_v2df (__A, 0); >} > >extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cvtsd_f64 (__m128d __A) >{ > return __builtin_ia32_vec_ext_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 = __builtin_ia32_vec_ext_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 __builtin_ia32_vec_ext_v2di ((__v2di)__A, 0); >} > > >extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cvtsi128_si64x (__m128i __A) >{ > return __builtin_ia32_vec_ext_v2di ((__v2di)__A, 0); >} > > >extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_add_pd (__m128d __A, __m128d __B) >{ > return (__m128d)__builtin_ia32_addpd ((__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)__builtin_ia32_subpd ((__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)__builtin_ia32_mulpd ((__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)__builtin_ia32_divpd ((__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 const *__P) >{ > return (__m128i) __builtin_ia32_loaddqu ((char const *)__P); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_loadl_epi64 (__m128i const *__P) >{ > return _mm_set_epi64 ((__m64)0LL, *(__m64 *)__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 *__P, __m128i __B) >{ > __builtin_ia32_storedqu ((char *)__P, (__v16qi)__B); >} > >extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_storel_epi64 (__m128i *__P, __m128i __B) >{ > *(long long *)__P = __builtin_ia32_vec_ext_v2di ((__v2di)__B, 0); >} > >extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_movepi64_pi64 (__m128i __B) >{ > return (__m64) __builtin_ia32_vec_ext_v2di ((__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_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); >} > > >extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shuffle_pd(__m128d __A, __m128d __B, const int __mask) >{ > return (__m128d)__builtin_ia32_shufpd ((__v2df)__A, (__v2df)__B, __mask); >} > > > > > > >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)__builtin_ia32_paddb128 ((__v16qi)__A, (__v16qi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_add_epi16 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_paddw128 ((__v8hi)__A, (__v8hi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_add_epi32 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_paddd128 ((__v4si)__A, (__v4si)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_add_epi64 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_paddq128 ((__v2di)__A, (__v2di)__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)__builtin_ia32_psubb128 ((__v16qi)__A, (__v16qi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_sub_epi16 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_psubw128 ((__v8hi)__A, (__v8hi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_sub_epi32 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_psubd128 ((__v4si)__A, (__v4si)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_sub_epi64 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_psubq128 ((__v2di)__A, (__v2di)__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)__builtin_ia32_pmullw128 ((__v8hi)__A, (__v8hi)__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); >} > > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_bsrli_si128 (__m128i __A, const int __N) >{ > return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_bslli_si128 (__m128i __A, const int __N) >{ > return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_srli_si128 (__m128i __A, const int __N) >{ > return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_slli_si128 (__m128i __A, const int __N) >{ > return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); >} ># 1179 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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)__builtin_ia32_pand128 ((__v2di)__A, (__v2di)__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)__builtin_ia32_por128 ((__v2di)__A, (__v2di)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_xor_si128 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pxor128 ((__v2di)__A, (__v2di)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpeq_epi8 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpeqb128 ((__v16qi)__A, (__v16qi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpeq_epi16 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpeqw128 ((__v8hi)__A, (__v8hi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpeq_epi32 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpeqd128 ((__v4si)__A, (__v4si)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmplt_epi8 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__B, (__v16qi)__A); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmplt_epi16 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__B, (__v8hi)__A); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmplt_epi32 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__B, (__v4si)__A); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpgt_epi8 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__A, (__v16qi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpgt_epi16 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__A, (__v8hi)__B); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_cmpgt_epi32 (__m128i __A, __m128i __B) >{ > return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__A, (__v4si)__B); >} > > >extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_extract_epi16 (__m128i const __A, int const __N) >{ > return (unsigned short) __builtin_ia32_vec_ext_v8hi ((__v8hi)__A, __N); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_insert_epi16 (__m128i const __A, int const __D, int const __N) >{ > return (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)__A, __D, __N); >} ># 1343 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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); >} > > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shufflehi_epi16 (__m128i __A, const int __mask) >{ > return (__m128i)__builtin_ia32_pshufhw ((__v8hi)__A, __mask); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shufflelo_epi16 (__m128i __A, const int __mask) >{ > return (__m128i)__builtin_ia32_pshuflw ((__v8hi)__A, __mask); >} > >extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_mm_shuffle_epi32 (__m128i __A, const int __mask) >{ > return (__m128i)__builtin_ia32_pshufd ((__v4si)__A, __mask); >} ># 1406 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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; >} ># 1247 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/xmmintrin.h" 2 3 4 ># 35 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 ># 62 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/immintrin.h" 1 3 4 ># 63 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 ># 109 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/fxsrintrin.h" 1 3 4 ># 31 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/fxsrintrin.h" 3 4 >extern __inline void >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_fxsave (void *__P) >{ > return __builtin_ia32_fxsave (__P); >} > >extern __inline void >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_fxrstor (void *__P) >{ > return __builtin_ia32_fxrstor (__P); >} > > >extern __inline void >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_fxsave64 (void *__P) >{ > return __builtin_ia32_fxsave64 (__P); >} > >extern __inline void >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_fxrstor64 (void *__P) >{ > return __builtin_ia32_fxrstor64 (__P); >} ># 110 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 ># 120 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/adxintrin.h" 1 3 4 ># 31 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/adxintrin.h" 3 4 >extern __inline unsigned char >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_addcarryx_u32 (unsigned char __CF, unsigned int __X, > unsigned int __Y, unsigned int *__P) >{ > return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P); >} > > >extern __inline unsigned char >__attribute__((__gnu_inline__, __always_inline__, __artificial__)) >_addcarryx_u64 (unsigned char __CF, unsigned long __X, > unsigned long __Y, unsigned long long *__P) >{ > return __builtin_ia32_addcarryx_u64 (__CF, __X, __Y, __P); >} ># 121 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/x86intrin.h" 2 3 4 ># 34 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/opt_random.h" 2 3 > > > ># 37 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/opt_random.h" 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 215 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/opt_random.h" 3 > >} ># 52 "/usr/include/c++/4.8.2/random" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/random.tcc" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/random.tcc" 3 ># 1 "/usr/include/c++/4.8.2/numeric" 1 3 ># 58 "/usr/include/c++/4.8.2/numeric" 3 > ># 59 "/usr/include/c++/4.8.2/numeric" 3 > > > ># 1 "/usr/include/c++/4.8.2/bits/stl_numeric.h" 1 3 ># 65 "/usr/include/c++/4.8.2/bits/stl_numeric.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 80 "/usr/include/c++/4.8.2/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"))) >{ > ># 118 "/usr/include/c++/4.8.2/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; > } ># 144 "/usr/include/c++/4.8.2/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; > } ># 172 "/usr/include/c++/4.8.2/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, ++__first2) > __init = __init + (*__first1 * *__first2); > return __init; > } ># 203 "/usr/include/c++/4.8.2/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, ++__first2) > __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); > return __init; > } ># 235 "/usr/include/c++/4.8.2/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; > } ># 275 "/usr/include/c++/4.8.2/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; > } ># 315 "/usr/include/c++/4.8.2/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; > } ># 357 "/usr/include/c++/4.8.2/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++/4.8.2/numeric" 2 3 ># 34 "/usr/include/c++/4.8.2/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> > typename std::enable_if<std::is_class<_Sseq>::value>::type > linear_congruential_engine<_UIntType, __a, __c, __m>:: > seed(_Sseq& __q) > { > 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> > typename std::enable_if<std::is_class<_Sseq>::value>::type > mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, > __s, __b, __t, __c, __l, __f>:: > seed(_Sseq& __q) > { > 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> > typename std::enable_if<std::is_class<_Sseq>::value>::type > subtract_with_carry_engine<_UIntType, __w, __s, __r>:: > seed(_Sseq& __q) > { > 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> > 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) > { ># 924 "/usr/include/c++/4.8.2/bits/random.tcc" 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) > { ># 1008 "/usr/include/c++/4.8.2/bits/random.tcc" 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(); > } > > 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(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); > } ># 1432 "/usr/include/c++/4.8.2/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 __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; > 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(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(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; > } ># 1682 "/usr/include/c++/4.8.2/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; > } ># 1931 "/usr/include/c++/4.8.2/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.331 * __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.331 * __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.331 * __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) > { > 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); > size_t __k = std::max<size_t>(1UL, (__b + __log2r - 1UL) / __log2r); > _RealType __sum = _RealType(0); > _RealType __tmp = _RealType(1); > for (; __k != 0; --__k) > { > __sum += _RealType(__urng() - __urng.min()) * __tmp; > __tmp *= __r; > } > return __sum / __tmp; > } > > >} ># 53 "/usr/include/c++/4.8.2/random" 2 3 ># 66 "/usr/include/c++/4.8.2/bits/stl_algo.h" 2 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > template<typename _Iterator> > void > __move_median_to_first(_Iterator __result, _Iterator __a, > _Iterator __b, _Iterator __c) > { > > > > > if (*__a < *__b) > { > if (*__b < *__c) > std::iter_swap(__result, __b); > else if (*__a < *__c) > std::iter_swap(__result, __c); > else > std::iter_swap(__result, __a); > } > else if (*__a < *__c) > std::iter_swap(__result, __a); > else if (*__b < *__c) > std::iter_swap(__result, __c); > else > std::iter_swap(__result, __b); > } > > > 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 _Tp> > inline _InputIterator > __find(_InputIterator __first, _InputIterator __last, > const _Tp& __val, input_iterator_tag) > { > while (__first != __last && !(*__first == __val)) > ++__first; > return __first; > } > > > template<typename _InputIterator, typename _Predicate> > inline _InputIterator > __find_if(_InputIterator __first, _InputIterator __last, > _Predicate __pred, input_iterator_tag) > { > while (__first != __last && !bool(__pred(*__first))) > ++__first; > return __first; > } > > > template<typename _RandomAccessIterator, typename _Tp> > _RandomAccessIterator > __find(_RandomAccessIterator __first, _RandomAccessIterator __last, > const _Tp& __val, random_access_iterator_tag) > { > typename iterator_traits<_RandomAccessIterator>::difference_type > __trip_count = (__last - __first) >> 2; > > for (; __trip_count > 0; --__trip_count) > { > if (*__first == __val) > return __first; > ++__first; > > if (*__first == __val) > return __first; > ++__first; > > if (*__first == __val) > return __first; > ++__first; > > if (*__first == __val) > return __first; > ++__first; > } > > switch (__last - __first) > { > case 3: > if (*__first == __val) > return __first; > ++__first; > case 2: > if (*__first == __val) > return __first; > ++__first; > case 1: > if (*__first == __val) > return __first; > ++__first; > case 0: > default: > return __last; > } > } > > > 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 _InputIterator, typename _Predicate> > inline _InputIterator > __find_if_not(_InputIterator __first, _InputIterator __last, > _Predicate __pred, input_iterator_tag) > { > while (__first != __last && bool(__pred(*__first))) > ++__first; > return __first; > } > > > template<typename _RandomAccessIterator, typename _Predicate> > _RandomAccessIterator > __find_if_not(_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 (!bool(__pred(*__first))) > return __first; > ++__first; > > if (!bool(__pred(*__first))) > return __first; > ++__first; > > if (!bool(__pred(*__first))) > return __first; > ++__first; > > if (!bool(__pred(*__first))) > return __first; > ++__first; > } > > switch (__last - __first) > { > case 3: > if (!bool(__pred(*__first))) > return __first; > ++__first; > case 2: > if (!bool(__pred(*__first))) > return __first; > ++__first; > case 1: > if (!bool(__pred(*__first))) > return __first; > ++__first; > case 0: > default: > return __last; > } > } > > > template<typename _InputIterator, typename _Predicate> > inline _InputIterator > __find_if_not(_InputIterator __first, _InputIterator __last, > _Predicate __pred) > { > return std::__find_if_not(__first, __last, __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, ++__first) > if (!bool(__pred(*__first))) > break; > return __first; > } ># 351 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp> > _ForwardIterator > __search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val, > std::forward_iterator_tag) > { > __first = std::find(__first, __last, __val); > while (__first != __last) > { > typename iterator_traits<_ForwardIterator>::difference_type > __n = __count; > _ForwardIterator __i = __first; > ++__i; > while (__i != __last && __n != 1 && *__i == __val) > { > ++__i; > --__n; > } > if (__n == 1) > return __first; > if (__i == __last) > return __last; > __first = std::find(++__i, __last, __val); > } > return __last; > } > > > > > > > template<typename _RandomAccessIter, typename _Integer, typename _Tp> > _RandomAccessIter > __search_n(_RandomAccessIter __first, _RandomAccessIter __last, > _Integer __count, const _Tp& __val, > 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 (*--__backTrack == __val) > { > if (--__remainder == 0) > return (__first - __count); > } > __remainder = __count + 1 - (__first - __backTrack); > } > return __last; > } ># 421 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp, > typename _BinaryPredicate> > _ForwardIterator > __search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val, > _BinaryPredicate __binary_pred, std::forward_iterator_tag) > { > while (__first != __last && !bool(__binary_pred(*__first, __val))) > ++__first; > > while (__first != __last) > { > typename iterator_traits<_ForwardIterator>::difference_type > __n = __count; > _ForwardIterator __i = __first; > ++__i; > while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) > { > ++__i; > --__n; > } > if (__n == 1) > return __first; > if (__i == __last) > return __last; > __first = ++__i; > while (__first != __last > && !bool(__binary_pred(*__first, __val))) > ++__first; > } > return __last; > } > > > > > > > > template<typename _RandomAccessIter, typename _Integer, typename _Tp, > typename _BinaryPredicate> > _RandomAccessIter > __search_n(_RandomAccessIter __first, _RandomAccessIter __last, > _Integer __count, const _Tp& __val, > _BinaryPredicate __binary_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 (__binary_pred(*--__backTrack, __val)) > { > if (--__remainder == 0) > return (__first - __count); > } > __remainder = __count + 1 - (__first - __backTrack); > } > return __last; > } > > > template<typename _ForwardIterator1, typename _ForwardIterator2> > _ForwardIterator1 > __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2, > forward_iterator_tag, forward_iterator_tag) > { > if (__first2 == __last2) > return __last1; > else > { > _ForwardIterator1 __result = __last1; > while (1) > { > _ForwardIterator1 __new_result > = std::search(__first1, __last1, __first2, __last2); > if (__new_result == __last1) > return __result; > else > { > __result = __new_result; > __first1 = __new_result; > ++__first1; > } > } > } > } > > 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; > else > { > _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> > _BidirectionalIterator1 > __find_end(_BidirectionalIterator1 __first1, > _BidirectionalIterator1 __last1, > _BidirectionalIterator2 __first2, > _BidirectionalIterator2 __last2, > bidirectional_iterator_tag, bidirectional_iterator_tag) > { > > > > > > > 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); > > if (__rresult == __rlast1) > return __last1; > else > { > _BidirectionalIterator1 __result = __rresult.base(); > std::advance(__result, -std::distance(__first2, __last2)); > return __result; > } > } > > 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; > } > } ># 645 "/usr/include/c++/4.8.2/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)); > } ># 692 "/usr/include/c++/4.8.2/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), > __comp); > } ># 727 "/usr/include/c++/4.8.2/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); } ># 744 "/usr/include/c++/4.8.2/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); } ># 762 "/usr/include/c++/4.8.2/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); } ># 777 "/usr/include/c++/4.8.2/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, __pred); > } ># 800 "/usr/include/c++/4.8.2/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); > return std::none_of(__first, __last, __pred); > } ># 818 "/usr/include/c++/4.8.2/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; > } ># 871 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp> > _OutputIterator > remove_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, const _Tp& __value) > { > > > > > > > ; > > for (; __first != __last; ++__first) > if (!(*__first == __value)) > { > *__result = *__first; > ++__result; > } > return __result; > } ># 908 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, > typename _Predicate> > _OutputIterator > remove_copy_if(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, _Predicate __pred) > { > > > > > > > ; > > for (; __first != __last; ++__first) > if (!bool(__pred(*__first))) > { > *__result = *__first; > ++__result; > } > return __result; > } ># 947 "/usr/include/c++/4.8.2/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); } ># 1011 "/usr/include/c++/4.8.2/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)); > } ># 1039 "/usr/include/c++/4.8.2/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); > } ># 1089 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > _ForwardIterator > remove(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __value) > { > > > > > > ; > > __first = std::find(__first, __last, __value); > if(__first == __last) > return __first; > _ForwardIterator __result = __first; > ++__first; > for(; __first != __last; ++__first) > if(!(*__first == __value)) > { > *__result = std::move(*__first); > ++__result; > } > return __result; > } ># 1132 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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(!bool(__pred(*__first))) > { > *__result = std::move(*__first); > ++__result; > } > return __result; > } ># 1172 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > _ForwardIterator > unique(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > > ; > > > __first = std::adjacent_find(__first, __last); > if (__first == __last) > return __last; > > > _ForwardIterator __dest = __first; > ++__first; > while (++__first != __last) > if (!(*__dest == *__first)) > *++__dest = std::move(*__first); > return ++__dest; > } ># 1212 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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 (!bool(__binary_pred(*__dest, *__first))) > *++__dest = std::move(*__first); > return ++__dest; > } > > > > > > > template<typename _ForwardIterator, typename _OutputIterator> > _OutputIterator > __unique_copy(_ForwardIterator __first, _ForwardIterator __last, > _OutputIterator __result, > forward_iterator_tag, output_iterator_tag) > { > > _ForwardIterator __next = __first; > *__result = *__first; > while (++__next != __last) > if (!(*__first == *__next)) > { > __first = __next; > *++__result = *__first; > } > return ++__result; > } > > > > > > > template<typename _InputIterator, typename _OutputIterator> > _OutputIterator > __unique_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > input_iterator_tag, output_iterator_tag) > { > > typename iterator_traits<_InputIterator>::value_type __value = *__first; > *__result = __value; > while (++__first != __last) > if (!(__value == *__first)) > { > __value = *__first; > *++__result = __value; > } > return ++__result; > } > > > > > > > template<typename _InputIterator, typename _ForwardIterator> > _ForwardIterator > __unique_copy(_InputIterator __first, _InputIterator __last, > _ForwardIterator __result, > input_iterator_tag, forward_iterator_tag) > { > > *__result = *__first; > while (++__first != __last) > if (!(*__result == *__first)) > *++__result = *__first; > return ++__result; > } > > > > > > > > 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 (!bool(__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; > *__result = __value; > while (++__first != __last) > if (!bool(__binary_pred(__value, *__first))) > { > __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 (!bool(__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; > } > } ># 1440 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > inline void > reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) > { > > > > ; > std::__reverse(__first, __last, std::__iterator_category(__first)); > } ># 1467 "/usr/include/c++/4.8.2/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; > } > > > template<typename _ForwardIterator> > void > __rotate(_ForwardIterator __first, > _ForwardIterator __middle, > _ForwardIterator __last, > forward_iterator_tag) > { > if (__first == __middle || __last == __middle) > return; > > _ForwardIterator __first2 = __middle; > do > { > std::iter_swap(__first, __first2); > ++__first; > ++__first2; > if (__first == __middle) > __middle = __first2; > } > while (__first2 != __last); > > __first2 = __middle; > > while (__first2 != __last) > { > std::iter_swap(__first, __first2); > ++__first; > ++__first2; > if (__first == __middle) > __middle = __first2; > else if (__first2 == __last) > __first2 = __middle; > } > } > > > template<typename _BidirectionalIterator> > void > __rotate(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > bidirectional_iterator_tag) > { > > > > > if (__first == __middle || __last == __middle) > return; > > 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()); > else > std::__reverse(__first, __middle, bidirectional_iterator_tag()); > } > > > template<typename _RandomAccessIterator> > void > __rotate(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > random_access_iterator_tag) > { > > > > > if (__first == __middle || __last == __middle) > return; > > 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; > } > > _RandomAccessIterator __p = __first; > > 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; > } > _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; > 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; > } > _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; > std::swap(__n, __k); > } > } > } ># 1673 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > inline void > rotate(_ForwardIterator __first, _ForwardIterator __middle, > _ForwardIterator __last) > { > > > > ; > ; > > typedef typename iterator_traits<_ForwardIterator>::iterator_category > _IterType; > std::__rotate(__first, __middle, __last, _IterType()); > } ># 1709 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _OutputIterator> > _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; > } > } > > > > > > > template<typename _ForwardIterator, typename _Predicate, typename _Distance> > _ForwardIterator > __inplace_stable_partition(_ForwardIterator __first, > _Predicate __pred, _Distance __len) > { > if (__len == 1) > return __first; > _ForwardIterator __middle = __first; > std::advance(__middle, __len / 2); > _ForwardIterator __left_split = > std::__inplace_stable_partition(__first, __pred, __len / 2); > > > _Distance __right_len = __len - __len / 2; > _ForwardIterator __right_split = > std::__find_if_not_n(__middle, __right_len, __pred); > if (__right_len) > __right_split = std::__inplace_stable_partition(__middle, > __pred, > __right_len); > std::rotate(__left_split, __middle, __right_split); > std::advance(__left_split, std::distance(__middle, __right_split)); > return __left_split; > } > > > > > > > > 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 <= __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; > } > else > { > _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); > std::rotate(__left_split, __middle, __right_split); > std::advance(__left_split, std::distance(__middle, __right_split)); > return __left_split; > } > } ># 1888 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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; > else > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > typedef typename iterator_traits<_ForwardIterator>::difference_type > _DistanceType; > > _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, > __last); > if (__buf.size() > 0) > return > std::__stable_partition_adaptive(__first, __last, __pred, > _DistanceType(__buf.requested_size()), > __buf.begin(), > _DistanceType(__buf.size())); > else > return > std::__inplace_stable_partition(__first, __pred, > _DistanceType(__buf.requested_size())); > } > } > > > template<typename _RandomAccessIterator> > void > __heap_select(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last) > { > std::make_heap(__first, __middle); > for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) > if (*__i < *__first) > std::__pop_heap(__first, __middle, __i); > } > > > 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); > } ># 1972 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _RandomAccessIterator> > _RandomAccessIterator > partial_sort_copy(_InputIterator __first, _InputIterator __last, > _RandomAccessIterator __result_first, > _RandomAccessIterator __result_last) > { > typedef typename iterator_traits<_InputIterator>::value_type > _InputValueType; > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _OutputValueType; > typedef typename iterator_traits<_RandomAccessIterator>::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); > while (__first != __last) > { > if (*__first < *__result_first) > std::__adjust_heap(__result_first, _DistanceType(0), > _DistanceType(__result_real_last > - __result_first), > _InputValueType(*__first)); > ++__first; > } > std::sort_heap(__result_first, __result_real_last); > return __result_real_last; > } ># 2038 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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 typename iterator_traits<_RandomAccessIterator>::value_type > _OutputValueType; > typedef typename iterator_traits<_RandomAccessIterator>::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; > } > > > template<typename _RandomAccessIterator> > void > __unguarded_linear_insert(_RandomAccessIterator __last) > { > typename iterator_traits<_RandomAccessIterator>::value_type > __val = std::move(*__last); > _RandomAccessIterator __next = __last; > --__next; > while (__val < *__next) > { > *__last = std::move(*__next); > __last = __next; > --__next; > } > *__last = std::move(__val); > } > > > 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> > void > __insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last) > { > if (__first == __last) > return; > > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > { > if (*__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); > } > } > > > 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, __comp); > } > } > > > template<typename _RandomAccessIterator> > inline void > __unguarded_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > for (_RandomAccessIterator __i = __first; __i != __last; ++__i) > std::__unguarded_linear_insert(__i); > } > > > template<typename _RandomAccessIterator, typename _Compare> > inline void > __unguarded_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > for (_RandomAccessIterator __i = __first; __i != __last; ++__i) > std::__unguarded_linear_insert(__i, __comp); > } > > > > > > enum { _S_threshold = 16 }; > > > template<typename _RandomAccessIterator> > void > __final_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last) > { > if (__last - __first > int(_S_threshold)) > { > std::__insertion_sort(__first, __first + int(_S_threshold)); > std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); > } > else > std::__insertion_sort(__first, __last); > } > > > 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 _Tp> > _RandomAccessIterator > __unguarded_partition(_RandomAccessIterator __first, > _RandomAccessIterator __last, const _Tp& __pivot) > { > while (true) > { > while (*__first < __pivot) > ++__first; > --__last; > while (__pivot < *__last) > --__last; > if (!(__first < __last)) > return __first; > std::iter_swap(__first, __last); > ++__first; > } > } > > > template<typename _RandomAccessIterator, typename _Tp, typename _Compare> > _RandomAccessIterator > __unguarded_partition(_RandomAccessIterator __first, > _RandomAccessIterator __last, > const _Tp& __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> > inline _RandomAccessIterator > __unguarded_partition_pivot(_RandomAccessIterator __first, > _RandomAccessIterator __last) > { > _RandomAccessIterator __mid = __first + (__last - __first) / 2; > std::__move_median_to_first(__first, __first + 1, __mid, __last - 1); > return std::__unguarded_partition(__first + 1, __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 _Size> > void > __introsort_loop(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Size __depth_limit) > { > while (__last - __first > int(_S_threshold)) > { > if (__depth_limit == 0) > { > std::partial_sort(__first, __last, __last); > return; > } > --__depth_limit; > _RandomAccessIterator __cut = > std::__unguarded_partition_pivot(__first, __last); > std::__introsort_loop(__cut, __last, __depth_limit); > __last = __cut; > } > } > > > 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 _Size> > void > __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Size __depth_limit) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > while (__last - __first > 3) > { > if (__depth_limit == 0) > { > std::__heap_select(__first, __nth + 1, __last); > > > std::iter_swap(__first, __nth); > return; > } > --__depth_limit; > _RandomAccessIterator __cut = > std::__unguarded_partition_pivot(__first, __last); > if (__cut <= __nth) > __first = __cut; > else > __last = __cut; > } > std::__insertion_sort(__first, __last); > } > > template<typename _RandomAccessIterator, typename _Size, typename _Compare> > void > __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Size __depth_limit, > _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > 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); > } ># 2423 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > _ForwardIterator > lower_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > 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; > } ># 2470 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > _ForwardIterator > upper_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > 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 (__val < *__middle) > __len = __half; > else > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > } > return __first; > } ># 2519 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > _ForwardIterator > upper_bound(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > 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; > } ># 2572 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > pair<_ForwardIterator, _ForwardIterator> > equal_range(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > 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 (*__middle < __val) > { > __first = __middle; > ++__first; > __len = __len - __half - 1; > } > else if (__val < *__middle) > __len = __half; > else > { > _ForwardIterator __left = std::lower_bound(__first, __middle, > __val); > std::advance(__first, __len); > _ForwardIterator __right = std::upper_bound(++__middle, __first, > __val); > return pair<_ForwardIterator, _ForwardIterator>(__left, __right); > } > } > return pair<_ForwardIterator, _ForwardIterator>(__first, __first); > } ># 2634 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > pair<_ForwardIterator, _ForwardIterator> > equal_range(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > 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 if (__comp(__val, *__middle)) > __len = __half; > else > { > _ForwardIterator __left = std::lower_bound(__first, __middle, > __val, __comp); > std::advance(__first, __len); > _ForwardIterator __right = std::upper_bound(++__middle, __first, > __val, __comp); > return pair<_ForwardIterator, _ForwardIterator>(__left, __right); > } > } > return pair<_ForwardIterator, _ForwardIterator>(__first, __first); > } ># 2695 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp> > bool > binary_search(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > > > > ; > ; > > _ForwardIterator __i = std::lower_bound(__first, __last, __val); > return __i != __last && !(__val < *__i); > } ># 2728 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Tp, typename _Compare> > bool > binary_search(_ForwardIterator __first, _ForwardIterator __last, > const _Tp& __val, _Compare __comp) > { > typedef typename iterator_traits<_ForwardIterator>::value_type > _ValueType; > > > > > > > ; > > ; > > _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); > return __i != __last && !bool(__comp(__val, *__i)); > } > > > > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > void > __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (*__first2 < *__first1) > { > *__result = std::move(*__first2); > ++__first2; > } > else > { > *__result = std::move(*__first1); > ++__first1; > } > ++__result; > } > if (__first1 != __last1) > std::move(__first1, __last1, __result); > } > > > 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> > void > __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, > _BidirectionalIterator1 __last1, > _BidirectionalIterator2 __first2, > _BidirectionalIterator2 __last2, > _BidirectionalIterator3 __result) > { > if (__first1 == __last1) > { > std::move_backward(__first2, __last2, __result); > return; > } > else if (__first2 == __last2) > return; > > --__last1; > --__last2; > while (true) > { > if (*__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 _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 > { > std::rotate(__first, __middle, __last); > std::advance(__first, std::distance(__middle, __last)); > return __first; > } > } > > > template<typename _BidirectionalIterator, typename _Distance, > typename _Pointer> > void > __merge_adaptive(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Distance __len1, _Distance __len2, > _Pointer __buffer, _Distance __buffer_size) > { > if (__len1 <= __len2 && __len1 <= __buffer_size) > { > _Pointer __buffer_end = std::move(__first, __middle, __buffer); > std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, > __first); > } > else if (__len2 <= __buffer_size) > { > _Pointer __buffer_end = std::move(__middle, __last, __buffer); > std::__move_merge_adaptive_backward(__first, __middle, __buffer, > __buffer_end, __last); > } > 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); > __len22 = std::distance(__middle, __second_cut); > } > else > { > __len22 = __len2 / 2; > std::advance(__second_cut, __len22); > __first_cut = std::upper_bound(__first, __middle, > *__second_cut); > __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); > std::__merge_adaptive(__new_middle, __second_cut, __last, > __len1 - __len11, > __len2 - __len22, __buffer, __buffer_size); > } > } > > > template<typename _BidirectionalIterator, typename _Distance, > typename _Pointer, typename _Compare> > void > __merge_adaptive(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Distance __len1, _Distance __len2, > _Pointer __buffer, _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, > __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, > __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> > void > __merge_without_buffer(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last, > _Distance __len1, _Distance __len2) > { > if (__len1 == 0 || __len2 == 0) > return; > if (__len1 + __len2 == 2) > { > if (*__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); > __len22 = std::distance(__middle, __second_cut); > } > else > { > __len22 = __len2 / 2; > std::advance(__second_cut, __len22); > __first_cut = std::upper_bound(__first, __middle, *__second_cut); > __len11 = std::distance(__first, __first_cut); > } > std::rotate(__first_cut, __middle, __second_cut); > _BidirectionalIterator __new_middle = __first_cut; > std::advance(__new_middle, std::distance(__middle, __second_cut)); > std::__merge_without_buffer(__first, __first_cut, __new_middle, > __len11, __len22); > std::__merge_without_buffer(__new_middle, __second_cut, __last, > __len1 - __len11, __len2 - __len22); > } > > > 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, > __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, > __comp); > __len11 = std::distance(__first, __first_cut); > } > std::rotate(__first_cut, __middle, __second_cut); > _BidirectionalIterator __new_middle = __first_cut; > std::advance(__new_middle, std::distance(__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); > } ># 3152 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > void > inplace_merge(_BidirectionalIterator __first, > _BidirectionalIterator __middle, > _BidirectionalIterator __last) > { > typedef typename iterator_traits<_BidirectionalIterator>::value_type > _ValueType; > typedef typename iterator_traits<_BidirectionalIterator>::difference_type > _DistanceType; > > > > > > ; > ; > > if (__first == __middle || __middle == __last) > return; > > _DistanceType __len1 = std::distance(__first, __middle); > _DistanceType __len2 = std::distance(__middle, __last); > > _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, > __last); > if (__buf.begin() == 0) > std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); > else > std::__merge_adaptive(__first, __middle, __last, __len1, __len2, > __buf.begin(), _DistanceType(__buf.size())); > } ># 3207 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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); > > _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, > __last); > 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); > } > > > > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > while (__first1 != __last1 && __first2 != __last2) > { > if (*__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 _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > _OutputIterator > __move_merge(_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; > } > return std::move(__first2, __last2, std::move(__first1, __last1, __result)) > > ; > } > > template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, > typename _Distance> > void > __merge_sort_loop(_RandomAccessIterator1 __first, > _RandomAccessIterator1 __last, > _RandomAccessIterator2 __result, > _Distance __step_size) > { > 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); > __first += __two_step; > } > > __step_size = std::min(_Distance(__last - __first), __step_size); > std::__move_merge(__first, __first + __step_size, > __first + __step_size, __last, __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> > void > __chunk_insertion_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Distance __chunk_size) > { > while (__last - __first >= __chunk_size) > { > std::__insertion_sort(__first, __first + __chunk_size); > __first += __chunk_size; > } > std::__insertion_sort(__first, __last); > } > > 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> > void > __merge_sort_with_buffer(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Pointer __buffer) > { > 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); > > while (__step_size < __len) > { > std::__merge_sort_loop(__first, __last, __buffer, __step_size); > __step_size *= 2; > std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); > __step_size *= 2; > } > } > > 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> > void > __stable_sort_adaptive(_RandomAccessIterator __first, > _RandomAccessIterator __last, > _Pointer __buffer, _Distance __buffer_size) > { > 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); > std::__stable_sort_adaptive(__middle, __last, > __buffer, __buffer_size); > } > else > { > std::__merge_sort_with_buffer(__first, __middle, __buffer); > std::__merge_sort_with_buffer(__middle, __last, __buffer); > } > std::__merge_adaptive(__first, __middle, __last, > _Distance(__middle - __first), > _Distance(__last - __middle), > __buffer, __buffer_size); > } > > 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> > void > __inplace_stable_sort(_RandomAccessIterator __first, > _RandomAccessIterator __last) > { > if (__last - __first < 15) > { > std::__insertion_sort(__first, __last); > return; > } > _RandomAccessIterator __middle = __first + (__last - __first) / 2; > std::__inplace_stable_sort(__first, __middle); > std::__inplace_stable_sort(__middle, __last); > std::__merge_without_buffer(__first, __middle, __last, > __middle - __first, > __last - __middle); > } > > > 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); > } ># 3547 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2> > bool > includes(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (*__first2 < *__first1) > return false; > else if(*__first1 < *__first2) > ++__first1; > else > ++__first1, ++__first2; > > return __first2 == __last2; > } ># 3597 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _Compare> > bool > includes(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _Compare __comp) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (__comp(*__first2, *__first1)) > return false; > else if(__comp(*__first1, *__first2)) > ++__first1; > else > ++__first1, ++__first2; > > return __first2 == __last2; > } ># 3652 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > bool > next_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last) > { > > > > > > ; > > if (__first == __last) > return false; > _BidirectionalIterator __i = __first; > ++__i; > if (__i == __last) > return false; > __i = __last; > --__i; > > for(;;) > { > _BidirectionalIterator __ii = __i; > --__i; > if (*__i < *__ii) > { > _BidirectionalIterator __j = __last; > while (!(*__i < *--__j)) > {} > std::iter_swap(__i, __j); > std::reverse(__ii, __last); > return true; > } > if (__i == __first) > { > std::reverse(__first, __last); > return false; > } > } > } ># 3709 "/usr/include/c++/4.8.2/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 (!bool(__comp(*__i, *--__j))) > {} > std::iter_swap(__i, __j); > std::reverse(__ii, __last); > return true; > } > if (__i == __first) > { > std::reverse(__first, __last); > return false; > } > } > } ># 3765 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _BidirectionalIterator> > bool > prev_permutation(_BidirectionalIterator __first, > _BidirectionalIterator __last) > { > > > > > > ; > > if (__first == __last) > return false; > _BidirectionalIterator __i = __first; > ++__i; > if (__i == __last) > return false; > __i = __last; > --__i; > > for(;;) > { > _BidirectionalIterator __ii = __i; > --__i; > if (*__ii < *__i) > { > _BidirectionalIterator __j = __last; > while (!(*--__j < *__i)) > {} > std::iter_swap(__i, __j); > std::reverse(__ii, __last); > return true; > } > if (__i == __first) > { > std::reverse(__first, __last); > return false; > } > } > } ># 3822 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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 (!bool(__comp(*--__j, *__i))) > {} > std::iter_swap(__i, __j); > std::reverse(__ii, __last); > return true; > } > if (__i == __first) > { > std::reverse(__first, __last); > return false; > } > } > } ># 3882 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _OutputIterator, typename _Tp> > _OutputIterator > replace_copy(_InputIterator __first, _InputIterator __last, > _OutputIterator __result, > const _Tp& __old_value, const _Tp& __new_value) > { > > > > > > > ; > > for (; __first != __last; ++__first, ++__result) > if (*__first == __old_value) > *__result = __new_value; > else > *__result = *__first; > return __result; > } ># 3919 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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, ++__result) > if (__pred(*__first)) > *__result = __new_value; > else > *__result = *__first; > return __result; > } ># 3950 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > inline bool > is_sorted(_ForwardIterator __first, _ForwardIterator __last) > { return std::is_sorted_until(__first, __last) == __last; } ># 3964 "/usr/include/c++/4.8.2/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; } ># 3978 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > _ForwardIterator > is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > > if (__first == __last) > return __last; > > _ForwardIterator __next = __first; > for (++__next; __next != __last; __first = __next, ++__next) > if (*__next < *__first) > return __next; > return __next; > } ># 4007 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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, ++__next) > if (__comp(*__next, *__first)) > return __next; > return __next; > } ># 4037 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _Tp> > 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); > } ># 4057 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _Tp, typename _Compare> > 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); > } ># 4076 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > pair<_ForwardIterator, _ForwardIterator> > minmax_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > > _ForwardIterator __next = __first; > if (__first == __last > || ++__next == __last) > return std::make_pair(__first, __first); > > _ForwardIterator __min, __max; > if (*__next < *__first) > { > __min = __next; > __max = __first; > } > else > { > __min = __first; > __max = __next; > } > > __first = __next; > ++__first; > > while (__first != __last) > { > __next = __first; > if (++__next == __last) > { > if (*__first < *__min) > __min = __first; > else if (!(*__first < *__max)) > __max = __first; > break; > } > > if (*__next < *__first) > { > if (*__next < *__min) > __min = __next; > if (!(*__first < *__max)) > __max = __first; > } > else > { > if (*__first < *__min) > __min = __first; > if (!(*__next < *__max)) > __max = __next; > } > > __first = __next; > ++__first; > } > > return std::make_pair(__min, __max); > } ># 4152 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > 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); > } > > > template<typename _Tp> > inline _Tp > min(initializer_list<_Tp> __l) > { return *std::min_element(__l.begin(), __l.end()); } > > template<typename _Tp, typename _Compare> > inline _Tp > min(initializer_list<_Tp> __l, _Compare __comp) > { return *std::min_element(__l.begin(), __l.end(), __comp); } > > template<typename _Tp> > inline _Tp > max(initializer_list<_Tp> __l) > { return *std::max_element(__l.begin(), __l.end()); } > > template<typename _Tp, typename _Compare> > inline _Tp > max(initializer_list<_Tp> __l, _Compare __comp) > { return *std::max_element(__l.begin(), __l.end(), __comp); } > > template<typename _Tp> > 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> > 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); > } ># 4269 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2) > { > > > for (; __first1 != __last1; ++__first1, ++__first2) > if (!(*__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(__first1, __scan, *__scan)) > continue; > > auto __matches = std::count(__first2, __last2, *__scan); > if (0 == __matches > || std::count(__scan, __last1, *__scan) != __matches) > return false; > } > return true; > } ># 4314 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2, > typename _BinaryPredicate> > bool > is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _BinaryPredicate __pred) > { > > > for (; __first1 != __last1; ++__first1, ++__first2) > if (!bool(__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) > { > using std::placeholders::_1; > > if (__scan != std::find_if(__first1, __scan, > std::bind(__pred, _1, *__scan))) > continue; > > auto __matches = std::count_if(__first2, __last2, > std::bind(__pred, _1, *__scan)); > if (0 == __matches > || std::count_if(__scan, __last1, > std::bind(__pred, _1, *__scan)) != __matches) > return false; > } > return true; > } ># 4364 "/usr/include/c++/4.8.2/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; > __distr_type __d; > > for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) > std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); > } > > > > > > > ># 4409 "/usr/include/c++/4.8.2/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 std::move(__f); > } ># 4430 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Tp> > inline _InputIterator > find(_InputIterator __first, _InputIterator __last, > const _Tp& __val) > { > > > > > ; > return std::__find(__first, __last, __val, > std::__iterator_category(__first)); > } ># 4454 "/usr/include/c++/4.8.2/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, __pred, > std::__iterator_category(__first)); > } ># 4484 "/usr/include/c++/4.8.2/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; > } ># 4524 "/usr/include/c++/4.8.2/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; > } ># 4556 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > _ForwardIterator > adjacent_find(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > if (__first == __last) > return __last; > _ForwardIterator __next = __first; > while(++__next != __last) > { > if (*__first == *__next) > return __first; > __first = __next; > } > return __last; > } ># 4588 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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; > } ># 4620 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator, typename _Tp> > typename iterator_traits<_InputIterator>::difference_type > count(_InputIterator __first, _InputIterator __last, const _Tp& __value) > { > > > > > ; > typename iterator_traits<_InputIterator>::difference_type __n = 0; > for (; __first != __last; ++__first) > if (*__first == __value) > ++__n; > return __n; > } ># 4645 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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; > } ># 4687 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator1, typename _ForwardIterator2> > _ForwardIterator1 > search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, > _ForwardIterator2 __first2, _ForwardIterator2 __last2) > { > > > > > > > ; > ; > > > if (__first1 == __last1 || __first2 == __last2) > return __first1; > > > _ForwardIterator2 __p1(__first2); > if (++__p1 == __last2) > return std::find(__first1, __last1, *__first2); > > > _ForwardIterator2 __p; > _ForwardIterator1 __current = __first1; > > for (;;) > { > __first1 = std::find(__first1, __last1, *__first2); > if (__first1 == __last1) > return __last1; > > __p = __p1; > __current = __first1; > if (++__current == __last1) > return __last1; > > while (*__current == *__p) > { > if (++__p == __last2) > return __first1; > if (++__current == __last1) > return __last1; > } > ++__first1; > } > return __first1; > } ># 4758 "/usr/include/c++/4.8.2/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) > { > while (__first1 != __last1 > && !bool(__predicate(*__first1, *__first2))) > ++__first1; > return __first1; > } > > > _ForwardIterator2 __p; > _ForwardIterator1 __current = __first1; > > for (;;) > { > while (__first1 != __last1 > && !bool(__predicate(*__first1, *__first2))) > ++__first1; > 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; > } ># 4833 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp> > _ForwardIterator > search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val) > { > > > > > ; > > if (__count <= 0) > return __first; > if (__count == 1) > return std::find(__first, __last, __val); > return std::__search_n(__first, __last, __count, __val, > std::__iterator_category(__first)); > } ># 4870 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Integer, typename _Tp, > typename _BinaryPredicate> > _ForwardIterator > search_n(_ForwardIterator __first, _ForwardIterator __last, > _Integer __count, const _Tp& __val, > _BinaryPredicate __binary_pred) > { > > > > > ; > > if (__count <= 0) > return __first; > if (__count == 1) > { > while (__first != __last && !bool(__binary_pred(*__first, __val))) > ++__first; > return __first; > } > return std::__search_n(__first, __last, __count, __val, __binary_pred, > std::__iterator_category(__first)); > } ># 4912 "/usr/include/c++/4.8.2/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, ++__result) > *__result = __unary_op(*__first); > return __result; > } ># 4949 "/usr/include/c++/4.8.2/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, ++__first2, ++__result) > *__result = __binary_op(*__first1, *__first2); > return __result; > } ># 4982 "/usr/include/c++/4.8.2/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; > } ># 5014 "/usr/include/c++/4.8.2/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; > } ># 5046 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Generator> > void > generate(_ForwardIterator __first, _ForwardIterator __last, > _Generator __gen) > { > > > > > ; > > for (; __first != __last; ++__first) > *__first = __gen(); > } ># 5077 "/usr/include/c++/4.8.2/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, ++__first) > *__first = __gen(); > return __first; > } ># 5114 "/usr/include/c++/4.8.2/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, > std::__iterator_category(__first), > std::__iterator_category(__result)); > } ># 5153 "/usr/include/c++/4.8.2/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, __binary_pred, > std::__iterator_category(__first), > std::__iterator_category(__result)); > } ># 5185 "/usr/include/c++/4.8.2/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); > } > } ># 5218 "/usr/include/c++/4.8.2/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); > } > } ># 5258 "/usr/include/c++/4.8.2/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)); > } ># 5292 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > inline void > partial_sort(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > ; > ; > > std::__heap_select(__first, __middle, __last); > std::sort_heap(__first, __middle); > } ># 5331 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline void > partial_sort(_RandomAccessIterator __first, > _RandomAccessIterator __middle, > _RandomAccessIterator __last, > _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > > ; > ; > > std::__heap_select(__first, __middle, __last, __comp); > std::sort_heap(__first, __middle, __comp); > } ># 5368 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > inline void > nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > ; > ; > > if (__first == __last || __nth == __last) > return; > > std::__introselect(__first, __nth, __last, > std::__lg(__last - __first) * 2); > } ># 5407 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline void > nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, > _RandomAccessIterator __last, _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > > ; > ; > > if (__first == __last || __nth == __last) > return; > > std::__introselect(__first, __nth, __last, > std::__lg(__last - __first) * 2, __comp); > } ># 5445 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > inline void > sort(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > ; > > if (__first != __last) > { > std::__introsort_loop(__first, __last, > std::__lg(__last - __first) * 2); > std::__final_insertion_sort(__first, __last); > } > } ># 5481 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator, typename _Compare> > inline void > sort(_RandomAccessIterator __first, _RandomAccessIterator __last, > _Compare __comp) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > > > > > > > ; > > if (__first != __last) > { > std::__introsort_loop(__first, __last, > std::__lg(__last - __first) * 2, __comp); > std::__final_insertion_sort(__first, __last, __comp); > } > } ># 5523 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > { > if (*__first2 < *__first1) > { > *__result = *__first2; > ++__first2; > } > else > { > *__result = *__first1; > ++__first1; > } > ++__result; > } > return std::copy(__first2, __last2, std::copy(__first1, __last1, > __result)); > } ># 5587 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > _OutputIterator > merge(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > ; > ; > > 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)); > } ># 5647 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _RandomAccessIterator> > inline void > stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) > { > typedef typename iterator_traits<_RandomAccessIterator>::value_type > _ValueType; > typedef typename iterator_traits<_RandomAccessIterator>::difference_type > _DistanceType; > > > > > > ; > > _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, > __last); > if (__buf.begin() == 0) > std::__inplace_stable_sort(__first, __last); > else > std::__stable_sort_adaptive(__first, __last, __buf.begin(), > _DistanceType(__buf.size())); > } ># 5689 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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; > > > > > > > > ; > > _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__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); > } ># 5735 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > set_union(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > { > if (*__first1 < *__first2) > { > *__result = *__first1; > ++__first1; > } > else if (*__first2 < *__first1) > { > *__result = *__first2; > ++__first2; > } > else > { > *__result = *__first1; > ++__first1; > ++__first2; > } > ++__result; > } > return std::copy(__first2, __last2, std::copy(__first1, __last1, > __result)); > } ># 5802 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > _OutputIterator > set_union(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > > > ; > ; > > 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)); > } ># 5869 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (*__first1 < *__first2) > ++__first1; > else if (*__first2 < *__first1) > ++__first2; > else > { > *__result = *__first1; > ++__first1; > ++__first2; > ++__result; > } > return __result; > } ># 5926 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > _OutputIterator > set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (__comp(*__first1, *__first2)) > ++__first1; > else if (__comp(*__first2, *__first1)) > ++__first2; > else > { > *__result = *__first1; > ++__first1; > ++__first2; > ++__result; > } > return __result; > } ># 5984 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > set_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (*__first1 < *__first2) > { > *__result = *__first1; > ++__first1; > ++__result; > } > else if (*__first2 < *__first1) > ++__first2; > else > { > ++__first1; > ++__first2; > } > return std::copy(__first1, __last1, __result); > } ># 6045 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator, typename _Compare> > _OutputIterator > set_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result, _Compare __comp) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > ; > ; > > 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); > } ># 6103 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _InputIterator1, typename _InputIterator2, > typename _OutputIterator> > _OutputIterator > set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, > _InputIterator2 __first2, _InputIterator2 __last2, > _OutputIterator __result) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > ; > ; > > while (__first1 != __last1 && __first2 != __last2) > if (*__first1 < *__first2) > { > *__result = *__first1; > ++__first1; > ++__result; > } > else if (*__first2 < *__first1) > { > *__result = *__first2; > ++__first2; > ++__result; > } > else > { > ++__first1; > ++__first2; > } > return std::copy(__first2, __last2, std::copy(__first1, > __last1, __result)); > } ># 6169 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > 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) > { > typedef typename iterator_traits<_InputIterator1>::value_type > _ValueType1; > typedef typename iterator_traits<_InputIterator2>::value_type > _ValueType2; > > > > > > > > > > > > > ; > ; > > 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)); > } ># 6226 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > _ForwardIterator > min_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > > if (__first == __last) > return __first; > _ForwardIterator __result = __first; > while (++__first != __last) > if (*__first < *__result) > __result = __first; > return __result; > } ># 6254 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > _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; > } ># 6282 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator> > _ForwardIterator > max_element(_ForwardIterator __first, _ForwardIterator __last) > { > > > > > ; > > if (__first == __last) > return __first; > _ForwardIterator __result = __first; > while (++__first != __last) > if (*__result < *__first) > __result = __first; > return __result; > } ># 6310 "/usr/include/c++/4.8.2/bits/stl_algo.h" 3 > template<typename _ForwardIterator, typename _Compare> > _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; > } > > >} ># 63 "/usr/include/c++/4.8.2/algorithm" 2 3 ># 17 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 > > > > ># 1 "/usr/include/c++/4.8.2/atomic" 1 3 ># 35 "/usr/include/c++/4.8.2/atomic" 3 > ># 36 "/usr/include/c++/4.8.2/atomic" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/bits/atomic_base.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/atomic_base.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/atomic_base.h" 3 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdbool.h" 1 3 4 ># 37 "/usr/include/c++/4.8.2/bits/atomic_base.h" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 52 "/usr/include/c++/4.8.2/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(__m | int(__mod)); > } > > constexpr memory_order > operator&(memory_order __m, __memory_order_modifier __mod) > { > return memory_order(__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) > | (__m & __memory_order_modifier_mask)); > } > > inline void > atomic_thread_fence(memory_order __m) noexcept > { __atomic_thread_fence(__m); } > > inline void > atomic_signal_fence(memory_order __m) noexcept > { __atomic_signal_fence(__m); } > > > template<typename _Tp> > inline _Tp > kill_dependency(_Tp __y) noexcept > { > _Tp __ret(__y); > return __ret; > } > > > > template<typename _IntTp> > struct __atomic_base; > > > typedef __atomic_base<char> atomic_char; > > > typedef __atomic_base<signed char> atomic_schar; > > > typedef __atomic_base<unsigned char> atomic_uchar; > > > typedef __atomic_base<short> atomic_short; > > > typedef __atomic_base<unsigned short> atomic_ushort; > > > typedef __atomic_base<int> atomic_int; > > > typedef __atomic_base<unsigned int> atomic_uint; > > > typedef __atomic_base<long> atomic_long; > > > typedef __atomic_base<unsigned long> atomic_ulong; > > > typedef __atomic_base<long long> atomic_llong; > > > typedef __atomic_base<unsigned long long> atomic_ullong; > > > typedef __atomic_base<wchar_t> atomic_wchar_t; > > > typedef __atomic_base<char16_t> atomic_char16_t; > > > typedef __atomic_base<char32_t> atomic_char32_t; > > > typedef __atomic_base<char32_t> atomic_char32_t; > > > > typedef __atomic_base<int_least8_t> atomic_int_least8_t; > > > typedef __atomic_base<uint_least8_t> atomic_uint_least8_t; > > > typedef __atomic_base<int_least16_t> atomic_int_least16_t; > > > typedef __atomic_base<uint_least16_t> atomic_uint_least16_t; > > > typedef __atomic_base<int_least32_t> atomic_int_least32_t; > > > typedef __atomic_base<uint_least32_t> atomic_uint_least32_t; > > > typedef __atomic_base<int_least64_t> atomic_int_least64_t; > > > typedef __atomic_base<uint_least64_t> atomic_uint_least64_t; > > > > typedef __atomic_base<int_fast8_t> atomic_int_fast8_t; > > > typedef __atomic_base<uint_fast8_t> atomic_uint_fast8_t; > > > typedef __atomic_base<int_fast16_t> atomic_int_fast16_t; > > > typedef __atomic_base<uint_fast16_t> atomic_uint_fast16_t; > > > typedef __atomic_base<int_fast32_t> atomic_int_fast32_t; > > > typedef __atomic_base<uint_fast32_t> atomic_uint_fast32_t; > > > typedef __atomic_base<int_fast64_t> atomic_int_fast64_t; > > > typedef __atomic_base<uint_fast64_t> atomic_uint_fast64_t; > > > > typedef __atomic_base<intptr_t> atomic_intptr_t; > > > typedef __atomic_base<uintptr_t> atomic_uintptr_t; > > > typedef __atomic_base<size_t> atomic_size_t; > > > typedef __atomic_base<intmax_t> atomic_intmax_t; > > > typedef __atomic_base<uintmax_t> atomic_uintmax_t; > > > typedef __atomic_base<ptrdiff_t> atomic_ptrdiff_t; > > > > > template<typename _Tp> > struct atomic; > > template<typename _Tp> > struct atomic<_Tp*>; > > > > typedef bool __atomic_flag_data_type; ># 259 "/usr/include/c++/4.8.2/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) } > { } > > bool > test_and_set(memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_test_and_set (&_M_i, __m); > } > > bool > test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_test_and_set (&_M_i, __m); > } > > void > clear(memory_order __m = memory_order_seq_cst) noexcept > { > memory_order __b = __m & __memory_order_mask; > ; > ; > ; > > __atomic_clear (&_M_i, __m); > } > > void > clear(memory_order __m = memory_order_seq_cst) volatile noexcept > { > memory_order __b = __m & __memory_order_mask; > ; > ; > ; > > __atomic_clear (&_M_i, __m); > } > > private: > static constexpr __atomic_flag_data_type > _S_init(bool __i) > { return __i ? 1 : 0; } > }; ># 348 "/usr/include/c++/4.8.2/bits/atomic_base.h" 3 > template<typename _ITp> > struct __atomic_base > { > private: > typedef _ITp __int_type; > > __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, memory_order_seq_cst); } > > __int_type > operator++() volatile noexcept > { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } > > __int_type > operator--() noexcept > { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } > > __int_type > operator--() volatile noexcept > { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } > > __int_type > operator+=(__int_type __i) noexcept > { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator+=(__int_type __i) volatile noexcept > { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator-=(__int_type __i) noexcept > { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator-=(__int_type __i) volatile noexcept > { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator&=(__int_type __i) noexcept > { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator&=(__int_type __i) volatile noexcept > { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator|=(__int_type __i) noexcept > { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator|=(__int_type __i) volatile noexcept > { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator^=(__int_type __i) noexcept > { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } > > __int_type > operator^=(__int_type __i) volatile noexcept > { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } > > bool > is_lock_free() const noexcept > { return __atomic_is_lock_free(sizeof(_M_i), nullptr); } > > bool > is_lock_free() const volatile noexcept > { return __atomic_is_lock_free(sizeof(_M_i), nullptr); } > > 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, __m); > } > > 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, __m); > } > > __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, __m); > } > > __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, __m); > } > > __int_type > exchange(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_exchange_n(&_M_i, __i, __m); > } > > > __int_type > exchange(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_exchange_n(&_M_i, __i, __m); > } > > 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, __m1, __m2); > } > > 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, __m1, __m2); > } > > 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)); > } > > 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)); > } > > 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, __m1, __m2); > } > > 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, __m1, __m2); > } > > 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)); > } > > 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)); > } > > __int_type > fetch_add(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_add(&_M_i, __i, __m); } > > __int_type > fetch_add(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_add(&_M_i, __i, __m); } > > __int_type > fetch_sub(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_sub(&_M_i, __i, __m); } > > __int_type > fetch_sub(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_sub(&_M_i, __i, __m); } > > __int_type > fetch_and(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_and(&_M_i, __i, __m); } > > __int_type > fetch_and(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_and(&_M_i, __i, __m); } > > __int_type > fetch_or(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_or(&_M_i, __i, __m); } > > __int_type > fetch_or(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_or(&_M_i, __i, __m); } > > __int_type > fetch_xor(__int_type __i, > memory_order __m = memory_order_seq_cst) noexcept > { return __atomic_fetch_xor(&_M_i, __i, __m); } > > __int_type > fetch_xor(__int_type __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return __atomic_fetch_xor(&_M_i, __i, __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) { return __d * sizeof(_PTp); } > > constexpr ptrdiff_t > _M_type_size(ptrdiff_t __d) 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), > memory_order_seq_cst); } > > __pointer_type > operator++() volatile noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(1), > memory_order_seq_cst); } > > __pointer_type > operator--() noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(1), > memory_order_seq_cst); } > > __pointer_type > operator--() volatile noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(1), > memory_order_seq_cst); } > > __pointer_type > operator+=(ptrdiff_t __d) noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(__d), > memory_order_seq_cst); } > > __pointer_type > operator+=(ptrdiff_t __d) volatile noexcept > { return __atomic_add_fetch(&_M_p, _M_type_size(__d), > memory_order_seq_cst); } > > __pointer_type > operator-=(ptrdiff_t __d) noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), > memory_order_seq_cst); } > > __pointer_type > operator-=(ptrdiff_t __d) volatile noexcept > { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), > memory_order_seq_cst); } > > bool > is_lock_free() const noexcept > { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); } > > bool > is_lock_free() const volatile noexcept > { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); } > > 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, __m); > } > > 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, __m); > } > > __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, __m); > } > > __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, __m); > } > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { > return __atomic_exchange_n(&_M_p, __p, __m); > } > > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return __atomic_exchange_n(&_M_p, __p, __m); > } > > 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, __m1, __m2); > } > > 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, __m1, __m2); > } > > __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), __m); } > > __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), __m); } > > __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), __m); } > > __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), __m); } > }; > > > > >} ># 42 "/usr/include/c++/4.8.2/atomic" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 54 "/usr/include/c++/4.8.2/atomic" 3 > struct atomic_bool > { > private: > __atomic_base<bool> _M_base; > > public: > atomic_bool() noexcept = default; > ~atomic_bool() noexcept = default; > atomic_bool(const atomic_bool&) = delete; > atomic_bool& operator=(const atomic_bool&) = delete; > atomic_bool& operator=(const atomic_bool&) volatile = delete; > > constexpr atomic_bool(bool __i) noexcept : _M_base(__i) { } > > bool > operator=(bool __i) noexcept > { return _M_base.operator=(__i); } > > bool > operator=(bool __i) volatile noexcept > { return _M_base.operator=(__i); } > > operator bool() const noexcept > { return _M_base.load(); } > > operator bool() const volatile noexcept > { return _M_base.load(); } > > bool > is_lock_free() const noexcept { return _M_base.is_lock_free(); } > > bool > is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } > > void > store(bool __i, memory_order __m = memory_order_seq_cst) noexcept > { _M_base.store(__i, __m); } > > void > store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept > { _M_base.store(__i, __m); } > > bool > load(memory_order __m = memory_order_seq_cst) const noexcept > { return _M_base.load(__m); } > > bool > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { return _M_base.load(__m); } > > bool > exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.exchange(__i, __m); } > > bool > exchange(bool __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.exchange(__i, __m); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m); } > > bool > compare_exchange_weak(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.compare_exchange_weak(__i1, __i2, __m); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m); } > > bool > compare_exchange_strong(bool& __i1, bool __i2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_base.compare_exchange_strong(__i1, __i2, __m); } > }; > > > > > > > > template<typename _Tp> > struct atomic > { > private: > _Tp _M_i; > > public: > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(_Tp __i) noexcept : _M_i(__i) { } > > operator _Tp() const noexcept > { return load(); } > > operator _Tp() const volatile noexcept > { return load(); } > > _Tp > operator=(_Tp __i) noexcept > { store(__i); return __i; } > > _Tp > operator=(_Tp __i) volatile noexcept > { store(__i); return __i; } > > bool > is_lock_free() const noexcept > { return __atomic_is_lock_free(sizeof(_M_i), nullptr); } > > bool > is_lock_free() const volatile noexcept > { return __atomic_is_lock_free(sizeof(_M_i), nullptr); } > > void > store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept > { __atomic_store(&_M_i, &__i, _m); } > > void > store(_Tp __i, memory_order _m = memory_order_seq_cst) volatile noexcept > { __atomic_store(&_M_i, &__i, _m); } > > _Tp > load(memory_order _m = memory_order_seq_cst) const noexcept > { > _Tp tmp; > __atomic_load(&_M_i, &tmp, _m); > return tmp; > } > > _Tp > load(memory_order _m = memory_order_seq_cst) const volatile noexcept > { > _Tp tmp; > __atomic_load(&_M_i, &tmp, _m); > return tmp; > } > > _Tp > exchange(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept > { > _Tp tmp; > __atomic_exchange(&_M_i, &__i, &tmp, _m); > return tmp; > } > > _Tp > exchange(_Tp __i, > memory_order _m = memory_order_seq_cst) volatile noexcept > { > _Tp tmp; > __atomic_exchange(&_M_i, &__i, &tmp, _m); > return tmp; > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) noexcept > { > return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) volatile noexcept > { > return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); > } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) noexcept > { return compare_exchange_weak(__e, __i, __m, __m); } > > bool > compare_exchange_weak(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return compare_exchange_weak(__e, __i, __m, __m); } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) noexcept > { > return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); > } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, > memory_order __f) volatile noexcept > { > return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); > } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) noexcept > { return compare_exchange_strong(__e, __i, __m, __m); } > > bool > compare_exchange_strong(_Tp& __e, _Tp __i, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return compare_exchange_strong(__e, __i, __m, __m); } > }; > > > > template<typename _Tp> > struct atomic<_Tp*> > { > typedef _Tp* __pointer_type; > typedef __atomic_base<_Tp*> __base_type; > __base_type _M_b; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { } > > operator __pointer_type() const noexcept > { return __pointer_type(_M_b); } > > operator __pointer_type() const volatile noexcept > { return __pointer_type(_M_b); } > > __pointer_type > operator=(__pointer_type __p) noexcept > { return _M_b.operator=(__p); } > > __pointer_type > operator=(__pointer_type __p) volatile noexcept > { return _M_b.operator=(__p); } > > __pointer_type > operator++(int) noexcept > { return _M_b++; } > > __pointer_type > operator++(int) volatile noexcept > { return _M_b++; } > > __pointer_type > operator--(int) noexcept > { return _M_b--; } > > __pointer_type > operator--(int) volatile noexcept > { return _M_b--; } > > __pointer_type > operator++() noexcept > { return ++_M_b; } > > __pointer_type > operator++() volatile noexcept > { return ++_M_b; } > > __pointer_type > operator--() noexcept > { return --_M_b; } > > __pointer_type > operator--() volatile noexcept > { return --_M_b; } > > __pointer_type > operator+=(ptrdiff_t __d) noexcept > { return _M_b.operator+=(__d); } > > __pointer_type > operator+=(ptrdiff_t __d) volatile noexcept > { return _M_b.operator+=(__d); } > > __pointer_type > operator-=(ptrdiff_t __d) noexcept > { return _M_b.operator-=(__d); } > > __pointer_type > operator-=(ptrdiff_t __d) volatile noexcept > { return _M_b.operator-=(__d); } > > bool > is_lock_free() const noexcept > { return _M_b.is_lock_free(); } > > bool > is_lock_free() const volatile noexcept > { return _M_b.is_lock_free(); } > > void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.store(__p, __m); } > > void > store(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.store(__p, __m); } > > __pointer_type > load(memory_order __m = memory_order_seq_cst) const noexcept > { return _M_b.load(__m); } > > __pointer_type > load(memory_order __m = memory_order_seq_cst) const volatile noexcept > { return _M_b.load(__m); } > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.exchange(__p, __m); } > > __pointer_type > exchange(__pointer_type __p, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.exchange(__p, __m); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, memory_order __m2) noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) noexcept > { > return compare_exchange_weak(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return compare_exchange_weak(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, memory_order __m2) noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m1, > memory_order __m2) volatile noexcept > { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) noexcept > { > return _M_b.compare_exchange_strong(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > bool > compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, > memory_order __m = memory_order_seq_cst) volatile noexcept > { > return _M_b.compare_exchange_strong(__p1, __p2, __m, > __cmpexch_failure_order(__m)); > } > > __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.fetch_add(__d, __m); } > > __pointer_type > fetch_add(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.fetch_add(__d, __m); } > > __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) noexcept > { return _M_b.fetch_sub(__d, __m); } > > __pointer_type > fetch_sub(ptrdiff_t __d, > memory_order __m = memory_order_seq_cst) volatile noexcept > { return _M_b.fetch_sub(__d, __m); } > }; > > > > template<> > struct atomic<bool> : public atomic_bool > { > typedef bool __integral_type; > typedef atomic_bool __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<char> : public atomic_char > { > typedef char __integral_type; > typedef atomic_char __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<signed char> : public atomic_schar > { > typedef signed char __integral_type; > typedef atomic_schar __base_type; > > atomic() noexcept= default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<unsigned char> : public atomic_uchar > { > typedef unsigned char __integral_type; > typedef atomic_uchar __base_type; > > atomic() noexcept= default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<short> : public atomic_short > { > typedef short __integral_type; > typedef atomic_short __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<unsigned short> : public atomic_ushort > { > typedef unsigned short __integral_type; > typedef atomic_ushort __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<int> : atomic_int > { > typedef int __integral_type; > typedef atomic_int __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<unsigned int> : public atomic_uint > { > typedef unsigned int __integral_type; > typedef atomic_uint __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<long> : public atomic_long > { > typedef long __integral_type; > typedef atomic_long __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<unsigned long> : public atomic_ulong > { > typedef unsigned long __integral_type; > typedef atomic_ulong __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<long long> : public atomic_llong > { > typedef long long __integral_type; > typedef atomic_llong __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<unsigned long long> : public atomic_ullong > { > typedef unsigned long long __integral_type; > typedef atomic_ullong __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<wchar_t> : public atomic_wchar_t > { > typedef wchar_t __integral_type; > typedef atomic_wchar_t __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<char16_t> : public atomic_char16_t > { > typedef char16_t __integral_type; > typedef atomic_char16_t __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > template<> > struct atomic<char32_t> : public atomic_char32_t > { > typedef char32_t __integral_type; > typedef atomic_char32_t __base_type; > > atomic() noexcept = default; > ~atomic() noexcept = default; > atomic(const atomic&) = delete; > atomic& operator=(const atomic&) = delete; > atomic& operator=(const atomic&) volatile = delete; > > constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } > > using __base_type::operator __integral_type; > using __base_type::operator=; > }; > > > > inline bool > atomic_flag_test_and_set_explicit(atomic_flag* __a, > memory_order __m) noexcept > { return __a->test_and_set(__m); } > > inline bool > atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, > memory_order __m) noexcept > { return __a->test_and_set(__m); } > > inline void > atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept > { __a->clear(__m); } > > inline void > atomic_flag_clear_explicit(volatile atomic_flag* __a, > memory_order __m) noexcept > { __a->clear(__m); } > > inline bool > atomic_flag_test_and_set(atomic_flag* __a) noexcept > { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } > > inline bool > atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept > { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } > > inline void > atomic_flag_clear(atomic_flag* __a) noexcept > { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } > > inline void > atomic_flag_clear(volatile atomic_flag* __a) noexcept > { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } > > > > template<typename _ITp> > inline bool > atomic_is_lock_free(const atomic<_ITp>* __a) noexcept > { return __a->is_lock_free(); } > > template<typename _ITp> > inline bool > atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept > { return __a->is_lock_free(); } > > template<typename _ITp> > inline void > atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept; > > template<typename _ITp> > inline void > atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept; > > template<typename _ITp> > inline void > atomic_store_explicit(atomic<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { __a->store(__i, __m); } > > template<typename _ITp> > inline void > atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { __a->store(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept > { return __a->load(__m); } > > template<typename _ITp> > inline _ITp > atomic_load_explicit(const volatile atomic<_ITp>* __a, > memory_order __m) noexcept > { return __a->load(__m); } > > template<typename _ITp> > inline _ITp > atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->exchange(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->exchange(__i, __m); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2, > memory_order __m1, > memory_order __m2) noexcept > { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } > > > template<typename _ITp> > inline void > atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept > { atomic_store_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline void > atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept > { atomic_store_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_load(const atomic<_ITp>* __a) noexcept > { return atomic_load_explicit(__a, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_load(const volatile atomic<_ITp>* __a) noexcept > { return atomic_load_explicit(__a, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept > { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept > { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak(atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2) noexcept > { > return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2) noexcept > { > return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong(atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2) noexcept > { > return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > template<typename _ITp> > inline bool > atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, > _ITp* __i1, _ITp __i2) noexcept > { > return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, > memory_order_seq_cst, > memory_order_seq_cst); > } > > > > > > template<typename _ITp> > inline _ITp > atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_add(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_add(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_sub(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_sub(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_and(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_and(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_or(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_or(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_xor(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, > memory_order __m) noexcept > { return __a->fetch_xor(__i, __m); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } > > template<typename _ITp> > inline _ITp > atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept > { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } > > > > template<typename _ITp> > inline _ITp* > atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, > memory_order __m) noexcept > { return __a->fetch_add(__d, __m); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d, > memory_order __m) noexcept > { return __a->fetch_add(__d, __m); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept > { return __a->fetch_add(__d); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept > { return __a->fetch_add(__d); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a, > ptrdiff_t __d, memory_order __m) noexcept > { return __a->fetch_sub(__d, __m); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, > memory_order __m) noexcept > { return __a->fetch_sub(__d, __m); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept > { return __a->fetch_sub(__d); } > > template<typename _ITp> > inline _ITp* > atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept > { return __a->fetch_sub(__d); } > > > >} ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 1 "/usr/include/c++/4.8.2/mutex" 1 3 ># 32 "/usr/include/c++/4.8.2/mutex" 3 > ># 33 "/usr/include/c++/4.8.2/mutex" 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/chrono" 1 3 ># 32 "/usr/include/c++/4.8.2/chrono" 3 > ># 33 "/usr/include/c++/4.8.2/chrono" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/ratio" 1 3 ># 32 "/usr/include/c++/4.8.2/ratio" 3 > ># 33 "/usr/include/c++/4.8.2/ratio" 3 ># 43 "/usr/include/c++/4.8.2/ratio" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 55 "/usr/include/c++/4.8.2/ratio" 3 > template<intmax_t _Pn> > struct __static_sign > : integral_constant<intmax_t, (_Pn < 0) ? -1 : 1> > { }; > > template<intmax_t _Pn> > struct __static_abs > : integral_constant<intmax_t, _Pn * __static_sign<_Pn>::value> > { }; > > template<intmax_t _Pn, intmax_t _Qn> > struct __static_gcd > : __static_gcd<_Qn, (_Pn % _Qn)> > { }; > > template<intmax_t _Pn> > struct __static_gcd<_Pn, 0> > : integral_constant<intmax_t, __static_abs<_Pn>::value> > { }; > > template<intmax_t _Qn> > struct __static_gcd<0, _Qn> > : integral_constant<intmax_t, __static_abs<_Qn>::value> > { }; > > > > > > > > template<intmax_t _Pn, intmax_t _Qn> > struct __safe_multiply > { > private: > static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); > > static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; > static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; > static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; > static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; > > static_assert(__a1 == 0 || __b1 == 0, > "overflow in multiplication"); > static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), > "overflow in multiplication"); > static_assert(__b0 * __a0 <= 9223372036854775807L, > "overflow in multiplication"); > static_assert((__a0 * __b1 + __b0 * __a1) * __c > <= 9223372036854775807L - __b0 * __a0, > "overflow in multiplication"); > > public: > static const intmax_t value = _Pn * _Qn; > }; > > > > template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> > struct __big_less > : integral_constant<bool, (__hi1 < __hi2 > || (__hi1 == __hi2 && __lo1 < __lo2))> > { }; > > template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> > struct __big_add > { > static constexpr uintmax_t __lo = __lo1 + __lo2; > static constexpr uintmax_t __hi = (__hi1 + __hi2 + > (__lo1 + __lo2 < __lo1)); > }; > > > template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> > struct __big_sub > { > static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, > "Internal library error"); > static constexpr uintmax_t __lo = __lo1 - __lo2; > static constexpr uintmax_t __hi = (__hi1 - __hi2 - > (__lo1 < __lo2)); > }; > > > template<uintmax_t __x, uintmax_t __y> > struct __big_mul > { > private: > static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); > static constexpr uintmax_t __x0 = __x % __c; > static constexpr uintmax_t __x1 = __x / __c; > static constexpr uintmax_t __y0 = __y % __c; > static constexpr uintmax_t __y1 = __y / __c; > static constexpr uintmax_t __x0y0 = __x0 * __y0; > static constexpr uintmax_t __x0y1 = __x0 * __y1; > static constexpr uintmax_t __x1y0 = __x1 * __y0; > static constexpr uintmax_t __x1y1 = __x1 * __y1; > static constexpr uintmax_t __mix = __x0y1 + __x1y0; > static constexpr uintmax_t __mix_lo = __mix * __c; > static constexpr uintmax_t __mix_hi > = __mix / __c + ((__mix < __x0y1) ? __c : 0); > typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; > public: > static constexpr uintmax_t __hi = _Res::__hi; > static constexpr uintmax_t __lo = _Res::__lo; > }; > > > > template<uintmax_t __n1, uintmax_t __n0, uintmax_t __d> > struct __big_div_impl > { > private: > static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), > "Internal library error"); > static_assert(__n1 < __d, "Internal library error"); > static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); > static constexpr uintmax_t __d1 = __d / __c; > static constexpr uintmax_t __d0 = __d % __c; > > static constexpr uintmax_t __q1x = __n1 / __d1; > static constexpr uintmax_t __r1x = __n1 % __d1; > static constexpr uintmax_t __m = __q1x * __d0; > static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; > static constexpr uintmax_t __r1z = __r1y + __d; > static constexpr uintmax_t __r1 > = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) > ? (__r1z + __d) : __r1z : __r1y) - __m; > static constexpr uintmax_t __q1 > = __q1x - ((__r1y < __m) > ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); > static constexpr uintmax_t __q0x = __r1 / __d1; > static constexpr uintmax_t __r0x = __r1 % __d1; > static constexpr uintmax_t __n = __q0x * __d0; > static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; > static constexpr uintmax_t __r0z = __r0y + __d; > static constexpr uintmax_t __r0 > = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) > ? (__r0z + __d) : __r0z : __r0y) - __n; > static constexpr uintmax_t __q0 > = __q0x - ((__r0y < __n) ? ((__r0z >= __d) > && (__r0z < __n)) ? 2 : 1 : 0); > > public: > static constexpr uintmax_t __quot = __q1 * __c + __q0; > static constexpr uintmax_t __rem = __r0; > > private: > typedef __big_mul<__quot, __d> _Prod; > typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; > static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, > "Internal library error"); > }; > > template<uintmax_t __n1, uintmax_t __n0, uintmax_t __d> > struct __big_div > { > private: > static_assert(__d != 0, "Internal library error"); > static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), > "This library calls __builtin_clzll on uintmax_t, which " > "is unsafe on your platform. Please complain to " > "http://gcc.gnu.org/bugzilla/"); > static constexpr int __shift = __builtin_clzll(__d); > static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; > static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; > static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; > static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; > static constexpr uintmax_t __new_d = __d * __c1; > static constexpr uintmax_t __new_n0 = __n0 * __c1; > static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; > static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; > static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; > typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; > > public: > static constexpr uintmax_t __quot_hi = __n1 / __d; > static constexpr uintmax_t __quot_lo = _Res::__quot; > static constexpr uintmax_t __rem = _Res::__rem / __c1; > > private: > typedef __big_mul<__quot_lo, __d> _P0; > typedef __big_mul<__quot_hi, __d> _P1; > typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; > > static_assert(_P1::__hi == 0, "Internal library error"); > static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); > > static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, > "Internal library error"); > static_assert(__rem < __d, "Internal library error"); > }; ># 262 "/usr/include/c++/4.8.2/ratio" 3 > template<intmax_t _Num, intmax_t _Den = 1> > struct ratio > { > static_assert(_Den != 0, "denominator cannot be zero"); > static_assert(_Num >= -9223372036854775807L && _Den >= -9223372036854775807L, > "out of range"); > > > static constexpr intmax_t num = > _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; > > static constexpr intmax_t den = > __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; > > typedef ratio<num, den> type; > }; > > template<intmax_t _Num, intmax_t _Den> > constexpr intmax_t ratio<_Num, _Den>::num; > > template<intmax_t _Num, intmax_t _Den> > constexpr intmax_t ratio<_Num, _Den>::den; > > template<typename _R1, typename _R2> > struct __ratio_multiply > { > private: > static const intmax_t __gcd1 = > __static_gcd<_R1::num, _R2::den>::value; > static const intmax_t __gcd2 = > __static_gcd<_R2::num, _R1::den>::value; > > public: > typedef ratio< > __safe_multiply<(_R1::num / __gcd1), > (_R2::num / __gcd2)>::value, > __safe_multiply<(_R1::den / __gcd2), > (_R2::den / __gcd1)>::value> type; > > static constexpr intmax_t num = type::num; > static constexpr intmax_t den = type::den; > }; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_multiply<_R1, _R2>::num; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_multiply<_R1, _R2>::den; > > > template<typename _R1, typename _R2> > using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; > > template<typename _R1, typename _R2> > struct __ratio_divide > { > static_assert(_R2::num != 0, "division by 0"); > > typedef typename __ratio_multiply< > _R1, > ratio<_R2::den, _R2::num>>::type type; > > static constexpr intmax_t num = type::num; > static constexpr intmax_t den = type::den; > }; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_divide<_R1, _R2>::num; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_divide<_R1, _R2>::den; > > > template<typename _R1, typename _R2> > using ratio_divide = typename __ratio_divide<_R1, _R2>::type; > > > template<typename _R1, typename _R2> > struct ratio_equal > : integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> > { }; > > > template<typename _R1, typename _R2> > struct ratio_not_equal > : integral_constant<bool, !ratio_equal<_R1, _R2>::value> > { }; > > > template<typename _R1, typename _R2, > typename _Left = __big_mul<_R1::num,_R2::den>, > typename _Right = __big_mul<_R2::num,_R1::den> > > struct __ratio_less_impl_1 > : integral_constant<bool, __big_less<_Left::__hi, _Left::__lo, > _Right::__hi, _Right::__lo>::value> > { }; > > template<typename _R1, typename _R2, > bool = (_R1::num == 0 || _R2::num == 0 > || (__static_sign<_R1::num>::value > != __static_sign<_R2::num>::value)), > bool = (__static_sign<_R1::num>::value == -1 > && __static_sign<_R2::num>::value == -1)> > struct __ratio_less_impl > : __ratio_less_impl_1<_R1, _R2>::type > { }; > > template<typename _R1, typename _R2> > struct __ratio_less_impl<_R1, _R2, true, false> > : integral_constant<bool, _R1::num < _R2::num> > { }; > > template<typename _R1, typename _R2> > struct __ratio_less_impl<_R1, _R2, false, true> > : __ratio_less_impl_1<ratio<-_R2::num, _R2::den>, > ratio<-_R1::num, _R1::den> >::type > { }; > > > template<typename _R1, typename _R2> > struct ratio_less > : __ratio_less_impl<_R1, _R2>::type > { }; > > > template<typename _R1, typename _R2> > struct ratio_less_equal > : integral_constant<bool, !ratio_less<_R2, _R1>::value> > { }; > > > template<typename _R1, typename _R2> > struct ratio_greater > : integral_constant<bool, ratio_less<_R2, _R1>::value> > { }; > > > template<typename _R1, typename _R2> > struct ratio_greater_equal > : integral_constant<bool, !ratio_less<_R1, _R2>::value> > { }; > > template<typename _R1, typename _R2, > bool = (_R1::num >= 0), > bool = (_R2::num >= 0), > bool = ratio_less<ratio<__static_abs<_R1::num>::value, _R1::den>, > ratio<__static_abs<_R2::num>::value, _R2::den> >::value> > struct __ratio_add_impl > { > private: > typedef typename __ratio_add_impl< > ratio<-_R1::num, _R1::den>, > ratio<-_R2::num, _R2::den> >::type __t; > public: > typedef ratio<-__t::num, __t::den> type; > }; > > > template<typename _R1, typename _R2, bool __b> > struct __ratio_add_impl<_R1, _R2, true, true, __b> > { > private: > static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; > static constexpr uintmax_t __d2 = _R2::den / __g; > typedef __big_mul<_R1::den, __d2> __d; > typedef __big_mul<_R1::num, _R2::den / __g> __x; > typedef __big_mul<_R2::num, _R1::den / __g> __y; > typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; > static_assert(__n::__hi >= __x::__hi, "Internal library error"); > typedef __big_div<__n::__hi, __n::__lo, __g> __ng; > static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; > typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; > static_assert(__n_final::__rem == 0, "Internal library error"); > static_assert(__n_final::__quot_hi == 0 && > __n_final::__quot_lo <= 9223372036854775807L, "overflow in addition"); > typedef __big_mul<_R1::den / __g2, __d2> __d_final; > static_assert(__d_final::__hi == 0 && > __d_final::__lo <= 9223372036854775807L, "overflow in addition"); > public: > typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; > }; > > template<typename _R1, typename _R2> > struct __ratio_add_impl<_R1, _R2, false, true, true> > : __ratio_add_impl<_R2, _R1> > { }; > > > template<typename _R1, typename _R2> > struct __ratio_add_impl<_R1, _R2, true, false, false> > { > private: > static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; > static constexpr uintmax_t __d2 = _R2::den / __g; > typedef __big_mul<_R1::den, __d2> __d; > typedef __big_mul<_R1::num, _R2::den / __g> __x; > typedef __big_mul<-_R2::num, _R1::den / __g> __y; > typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; > typedef __big_div<__n::__hi, __n::__lo, __g> __ng; > static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; > typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; > static_assert(__n_final::__rem == 0, "Internal library error"); > static_assert(__n_final::__quot_hi == 0 && > __n_final::__quot_lo <= 9223372036854775807L, "overflow in addition"); > typedef __big_mul<_R1::den / __g2, __d2> __d_final; > static_assert(__d_final::__hi == 0 && > __d_final::__lo <= 9223372036854775807L, "overflow in addition"); > public: > typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; > }; > > template<typename _R1, typename _R2> > struct __ratio_add > { > typedef typename __ratio_add_impl<_R1, _R2>::type type; > static constexpr intmax_t num = type::num; > static constexpr intmax_t den = type::den; > }; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_add<_R1, _R2>::num; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_add<_R1, _R2>::den; > > > template<typename _R1, typename _R2> > using ratio_add = typename __ratio_add<_R1, _R2>::type; > > template<typename _R1, typename _R2> > struct __ratio_subtract > { > typedef typename __ratio_add< > _R1, > ratio<-_R2::num, _R2::den>>::type type; > > static constexpr intmax_t num = type::num; > static constexpr intmax_t den = type::den; > }; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_subtract<_R1, _R2>::num; > > template<typename _R1, typename _R2> > constexpr intmax_t __ratio_subtract<_R1, _R2>::den; > > > template<typename _R1, typename _R2> > using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; > > > typedef ratio<1, 1000000000000000000> atto; > typedef ratio<1, 1000000000000000> femto; > typedef ratio<1, 1000000000000> pico; > typedef ratio<1, 1000000000> nano; > typedef ratio<1, 1000000> micro; > typedef ratio<1, 1000> milli; > typedef ratio<1, 100> centi; > typedef ratio<1, 10> deci; > typedef ratio< 10, 1> deca; > typedef ratio< 100, 1> hecto; > typedef ratio< 1000, 1> kilo; > typedef ratio< 1000000, 1> mega; > typedef ratio< 1000000000, 1> giga; > typedef ratio< 1000000000000, 1> tera; > typedef ratio< 1000000000000000, 1> peta; > typedef ratio< 1000000000000000000, 1> exa; > > > >} ># 39 "/usr/include/c++/4.8.2/chrono" 2 3 > > ># 1 "/usr/include/c++/4.8.2/ctime" 1 3 ># 39 "/usr/include/c++/4.8.2/ctime" 3 > ># 40 "/usr/include/c++/4.8.2/ctime" 3 ># 58 "/usr/include/c++/4.8.2/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; >} ># 42 "/usr/include/c++/4.8.2/chrono" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ ># 58 "/usr/include/c++/4.8.2/chrono" 3 > namespace chrono > { > > > template<typename _Rep, typename _Period = ratio<1>> > struct duration; > > template<typename _Clock, typename _Dur = typename _Clock::duration> > struct time_point; > > > } > > > > > > template<typename _CT, typename _Period1, typename _Period2> > struct __duration_common_type_wrapper > { > private: > typedef __static_gcd<_Period1::num, _Period2::num> __gcd_num; > typedef __static_gcd<_Period1::den, _Period2::den> __gcd_den; > typedef typename _CT::type __cr; > typedef ratio<__gcd_num::value, > (_Period1::den / __gcd_den::value) * _Period2::den> __r; > public: > typedef __success_type<chrono::duration<__cr, __r>> type; > }; > > template<typename _Period1, typename _Period2> > struct __duration_common_type_wrapper<__failure_type, _Period1, _Period2> > { typedef __failure_type type; }; > > template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> > struct common_type<chrono::duration<_Rep1, _Period1>, > chrono::duration<_Rep2, _Period2>> > : public __duration_common_type_wrapper<typename __member_type_wrapper< > common_type<_Rep1, _Rep2>>::type, _Period1, _Period2>::type > { }; > > > > template<typename _CT, typename _Clock> > struct __timepoint_common_type_wrapper > { > typedef __success_type<chrono::time_point<_Clock, typename _CT::type>> > type; > }; > > template<typename _Clock> > struct __timepoint_common_type_wrapper<__failure_type, _Clock> > { typedef __failure_type type; }; > > template<typename _Clock, typename _Duration1, typename _Duration2> > struct common_type<chrono::time_point<_Clock, _Duration1>, > chrono::time_point<_Clock, _Duration2>> > : public __timepoint_common_type_wrapper<typename __member_type_wrapper< > common_type<_Duration1, _Duration2>>::type, _Clock>::type > { }; > > > > namespace chrono > { > > > > template<typename _ToDur, typename _CF, typename _CR, > bool _NumIsOne = false, bool _DenIsOne = false> > struct __duration_cast_impl > { > template<typename _Rep, typename _Period> > static constexpr _ToDur > __cast(const duration<_Rep, _Period>& __d) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) > * static_cast<_CR>(_CF::num) > / static_cast<_CR>(_CF::den))); > } > }; > > template<typename _ToDur, typename _CF, typename _CR> > struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> > { > template<typename _Rep, typename _Period> > static constexpr _ToDur > __cast(const duration<_Rep, _Period>& __d) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>(__d.count())); > } > }; > > template<typename _ToDur, typename _CF, typename _CR> > struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> > { > template<typename _Rep, typename _Period> > static constexpr _ToDur > __cast(const duration<_Rep, _Period>& __d) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>( > static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); > } > }; > > template<typename _ToDur, typename _CF, typename _CR> > struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> > { > template<typename _Rep, typename _Period> > static constexpr _ToDur > __cast(const duration<_Rep, _Period>& __d) > { > typedef typename _ToDur::rep __to_rep; > return _ToDur(static_cast<__to_rep>( > static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); > } > }; > > template<typename _Tp> > struct __is_duration > : std::false_type > { }; > > template<typename _Rep, typename _Period> > struct __is_duration<duration<_Rep, _Period>> > : std::true_type > { }; > > > template<typename _ToDur, typename _Rep, typename _Period> > constexpr typename enable_if<__is_duration<_ToDur>::value, > _ToDur>::type > duration_cast(const duration<_Rep, _Period>& __d) > { > typedef typename _ToDur::period __to_period; > typedef typename _ToDur::rep __to_rep; > typedef ratio_divide<_Period, __to_period> __cf; > typedef typename common_type<__to_rep, _Rep, intmax_t>::type > __cr; > typedef __duration_cast_impl<_ToDur, __cf, __cr, > __cf::num == 1, __cf::den == 1> __dc; > return __dc::__cast(__d); > } > > > template<typename _Rep> > struct treat_as_floating_point > : is_floating_point<_Rep> > { }; > > > template<typename _Rep> > struct duration_values > { > static constexpr _Rep > zero() > { return _Rep(0); } > > static constexpr _Rep > max() > { return numeric_limits<_Rep>::max(); } > > static constexpr _Rep > min() > { return numeric_limits<_Rep>::lowest(); } > }; > > template<typename _Tp> > struct __is_ratio > : std::false_type > { }; > > template<intmax_t _Num, intmax_t _Den> > struct __is_ratio<ratio<_Num, _Den>> > : std::true_type > { }; > > > template<typename _Rep, typename _Period> > struct duration > { > typedef _Rep rep; > typedef _Period period; > > static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); > static_assert(__is_ratio<_Period>::value, > "period must be a specialization of ratio"); > static_assert(_Period::num > 0, "period must be positive"); > > > constexpr duration() = default; > > > > > duration(const duration&) = default; > > template<typename _Rep2, typename = typename > enable_if<is_convertible<_Rep2, rep>::value > && (treat_as_floating_point<rep>::value > || !treat_as_floating_point<_Rep2>::value)>::type> > constexpr explicit duration(const _Rep2& __rep) > : __r(static_cast<rep>(__rep)) { } > > template<typename _Rep2, typename _Period2, typename = typename > enable_if<treat_as_floating_point<rep>::value > || (ratio_divide<_Period2, period>::den == 1 > && !treat_as_floating_point<_Rep2>::value)>::type> > constexpr duration(const duration<_Rep2, _Period2>& __d) > : __r(duration_cast<duration>(__d).count()) { } > > ~duration() = default; > duration& operator=(const duration&) = default; > > > constexpr rep > count() const > { return __r; } > > > constexpr duration > operator+() const > { return *this; } > > constexpr duration > operator-() const > { return duration(-__r); } > > duration& > operator++() > { > ++__r; > return *this; > } > > duration > operator++(int) > { return duration(__r++); } > > duration& > operator--() > { > --__r; > return *this; > } > > duration > operator--(int) > { return duration(__r--); } > > duration& > operator+=(const duration& __d) > { > __r += __d.count(); > return *this; > } > > duration& > operator-=(const duration& __d) > { > __r -= __d.count(); > return *this; > } > > duration& > operator*=(const rep& __rhs) > { > __r *= __rhs; > return *this; > } > > duration& > operator/=(const rep& __rhs) > { > __r /= __rhs; > return *this; > } > > > template<typename _Rep2 = rep> > typename enable_if<!treat_as_floating_point<_Rep2>::value, > duration&>::type > operator%=(const rep& __rhs) > { > __r %= __rhs; > return *this; > } > > template<typename _Rep2 = rep> > typename enable_if<!treat_as_floating_point<_Rep2>::value, > duration&>::type > operator%=(const duration& __d) > { > __r %= __d.count(); > return *this; > } > > > static constexpr duration > zero() > { return duration(duration_values<rep>::zero()); } > > static constexpr duration > min() > { return duration(duration_values<rep>::min()); } > > static constexpr duration > max() > { return duration(duration_values<rep>::max()); } > > private: > rep __r; > }; > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr typename common_type<duration<_Rep1, _Period1>, > duration<_Rep2, _Period2>>::type > operator+(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() + __cd(__rhs).count()); > } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr typename common_type<duration<_Rep1, _Period1>, > duration<_Rep2, _Period2>>::type > operator-(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() - __cd(__rhs).count()); > } > > template<typename _Rep1, typename _Rep2, bool = > is_convertible<_Rep2, > typename common_type<_Rep1, _Rep2>::type>::value> > struct __common_rep_type { }; > > template<typename _Rep1, typename _Rep2> > struct __common_rep_type<_Rep1, _Rep2, true> > { typedef typename common_type<_Rep1, _Rep2>::type type; }; > > template<typename _Rep1, typename _Period, typename _Rep2> > constexpr > duration<typename __common_rep_type<_Rep1, _Rep2>::type, _Period> > operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() * __s); > } > > template<typename _Rep1, typename _Rep2, typename _Period> > constexpr > duration<typename __common_rep_type<_Rep2, _Rep1>::type, _Period> > operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) > { return __d * __s; } > > template<typename _Rep1, typename _Period, typename _Rep2> > constexpr duration<typename __common_rep_type<_Rep1, typename > enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period> > operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() / __s); > } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr typename common_type<_Rep1, _Rep2>::type > operator/(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__lhs).count() / __cd(__rhs).count(); > } > > > template<typename _Rep1, typename _Period, typename _Rep2> > constexpr duration<typename __common_rep_type<_Rep1, typename > enable_if<!__is_duration<_Rep2>::value, _Rep2>::type>::type, _Period> > operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) > { > typedef duration<typename common_type<_Rep1, _Rep2>::type, _Period> > __cd; > return __cd(__cd(__d).count() % __s); > } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr typename common_type<duration<_Rep1, _Period1>, > duration<_Rep2, _Period2>>::type > operator%(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __cd; > return __cd(__cd(__lhs).count() % __cd(__rhs).count()); > } > > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator==(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __ct; > return __ct(__lhs).count() == __ct(__rhs).count(); > } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator<(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<__dur1,__dur2>::type __ct; > return __ct(__lhs).count() < __ct(__rhs).count(); > } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator!=(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { return !(__lhs == __rhs); } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator<=(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { return !(__rhs < __lhs); } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator>(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { return __rhs < __lhs; } > > template<typename _Rep1, typename _Period1, > typename _Rep2, typename _Period2> > constexpr bool > operator>=(const duration<_Rep1, _Period1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { return !(__lhs < __rhs); } > > > typedef duration<int64_t, nano> nanoseconds; > > > typedef duration<int64_t, micro> microseconds; > > > typedef duration<int64_t, milli> milliseconds; > > > typedef duration<int64_t> seconds; > > > typedef duration<int, ratio< 60>> minutes; > > > typedef duration<int, ratio<3600>> hours; > > > template<typename _Clock, typename _Dur> > struct time_point > { > typedef _Clock clock; > typedef _Dur duration; > typedef typename duration::rep rep; > typedef typename duration::period period; > > constexpr time_point() : __d(duration::zero()) > { } > > constexpr explicit time_point(const duration& __dur) > : __d(__dur) > { } > > > template<typename _Dur2> > constexpr time_point(const time_point<clock, _Dur2>& __t) > : __d(__t.time_since_epoch()) > { } > > > constexpr duration > time_since_epoch() const > { return __d; } > > > time_point& > operator+=(const duration& __dur) > { > __d += __dur; > return *this; > } > > time_point& > operator-=(const duration& __dur) > { > __d -= __dur; > return *this; > } > > > static constexpr time_point > min() > { return time_point(duration::min()); } > > static constexpr time_point > max() > { return time_point(duration::max()); } > > private: > duration __d; > }; > > > template<typename _ToDur, typename _Clock, typename _Dur> > constexpr typename enable_if<__is_duration<_ToDur>::value, > time_point<_Clock, _ToDur>>::type > time_point_cast(const time_point<_Clock, _Dur>& __t) > { > typedef time_point<_Clock, _ToDur> __time_point; > return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); > } > > template<typename _Clock, typename _Dur1, > typename _Rep2, typename _Period2> > constexpr time_point<_Clock, > typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> > operator+(const time_point<_Clock, _Dur1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<_Dur1,__dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__lhs.time_since_epoch() + __rhs); > } > > template<typename _Rep1, typename _Period1, > typename _Clock, typename _Dur2> > constexpr time_point<_Clock, > typename common_type<duration<_Rep1, _Period1>, _Dur2>::type> > operator+(const duration<_Rep1, _Period1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { > typedef duration<_Rep1, _Period1> __dur1; > typedef typename common_type<__dur1,_Dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__rhs.time_since_epoch() + __lhs); > } > > template<typename _Clock, typename _Dur1, > typename _Rep2, typename _Period2> > constexpr time_point<_Clock, > typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> > operator-(const time_point<_Clock, _Dur1>& __lhs, > const duration<_Rep2, _Period2>& __rhs) > { > typedef duration<_Rep2, _Period2> __dur2; > typedef typename common_type<_Dur1,__dur2>::type __ct; > typedef time_point<_Clock, __ct> __time_point; > return __time_point(__lhs.time_since_epoch() -__rhs); > } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr typename common_type<_Dur1, _Dur2>::type > operator-(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator==(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator!=(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return !(__lhs == __rhs); } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator<(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator<=(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return !(__rhs < __lhs); } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator>(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return __rhs < __lhs; } > > template<typename _Clock, typename _Dur1, typename _Dur2> > constexpr bool > operator>=(const time_point<_Clock, _Dur1>& __lhs, > const time_point<_Clock, _Dur2>& __rhs) > { return !(__lhs < __rhs); } ># 708 "/usr/include/c++/4.8.2/chrono" 3 > inline namespace _V2 { > > > > > > > struct system_clock > { > typedef chrono::nanoseconds duration; > typedef duration::rep rep; > typedef duration::period period; > typedef chrono::time_point<system_clock, duration> time_point; > > static_assert(system_clock::duration::min() > < system_clock::duration::zero(), > "a clock's minimum duration cannot be less than its epoch"); > > static constexpr bool is_steady = false; > > static time_point > now() noexcept; > > > static std::time_t > to_time_t(const time_point& __t) noexcept > { > return std::time_t(duration_cast<chrono::seconds> > (__t.time_since_epoch()).count()); > } > > static time_point > from_time_t(std::time_t __t) noexcept > { > typedef chrono::time_point<system_clock, seconds> __from; > return time_point_cast<system_clock::duration> > (__from(chrono::seconds(__t))); > } > }; > > > > > > > > struct steady_clock > { > typedef chrono::nanoseconds duration; > typedef duration::rep rep; > typedef duration::period period; > typedef chrono::time_point<steady_clock, duration> time_point; > > static constexpr bool is_steady = true; > > static time_point > now() noexcept; > }; ># 775 "/usr/include/c++/4.8.2/chrono" 3 > using high_resolution_clock = system_clock; > > } > > > } > > >} ># 40 "/usr/include/c++/4.8.2/mutex" 2 3 > > > ># 1 "/usr/include/c++/4.8.2/system_error" 1 3 ># 32 "/usr/include/c++/4.8.2/system_error" 3 > ># 33 "/usr/include/c++/4.8.2/system_error" 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/error_constants.h" 1 3 ># 34 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/error_constants.h" 3 ># 1 "/usr/include/c++/4.8.2/cerrno" 1 3 ># 39 "/usr/include/c++/4.8.2/cerrno" 3 > ># 40 "/usr/include/c++/4.8.2/cerrno" 3 > ># 1 "/usr/include/errno.h" 1 3 4 ># 42 "/usr/include/c++/4.8.2/cerrno" 2 3 ># 35 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/error_constants.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > enum class errc > { > address_family_not_supported = 97, > address_in_use = 98, > address_not_available = 99, > already_connected = 106, > argument_list_too_long = 7, > argument_out_of_domain = 33, > bad_address = 14, > bad_file_descriptor = 9, > > > bad_message = 74, > > > broken_pipe = 32, > connection_aborted = 103, > connection_already_in_progress = 114, > connection_refused = 111, > connection_reset = 104, > cross_device_link = 18, > destination_address_required = 89, > device_or_resource_busy = 16, > directory_not_empty = 39, > executable_format_error = 8, > file_exists = 17, > file_too_large = 27, > filename_too_long = 36, > function_not_supported = 38, > host_unreachable = 113, > > > identifier_removed = 43, > > > illegal_byte_sequence = 84, > inappropriate_io_control_operation = 25, > interrupted = 4, > invalid_argument = 22, > invalid_seek = 29, > io_error = 5, > is_a_directory = 21, > message_size = 90, > network_down = 100, > network_reset = 102, > network_unreachable = 101, > no_buffer_space = 105, > no_child_process = 10, > > > no_link = 67, > > > no_lock_available = 37, > > > no_message_available = 61, > > > no_message = 42, > no_protocol_option = 92, > no_space_on_device = 28, > > > no_stream_resources = 63, > > > no_such_device_or_address = 6, > no_such_device = 19, > no_such_file_or_directory = 2, > no_such_process = 3, > not_a_directory = 20, > not_a_socket = 88, > > > not_a_stream = 60, > > > not_connected = 107, > not_enough_memory = 12, > > > not_supported = 95, > > > > operation_canceled = 125, > > > operation_in_progress = 115, > operation_not_permitted = 1, > operation_not_supported = 95, > operation_would_block = 11, > > > owner_dead = 130, > > > permission_denied = 13, > > > protocol_error = 71, > > > protocol_not_supported = 93, > read_only_file_system = 30, > resource_deadlock_would_occur = 35, > resource_unavailable_try_again = 11, > result_out_of_range = 34, > > > state_not_recoverable = 131, > > > > stream_timeout = 62, > > > > text_file_busy = 26, > > > timed_out = 110, > too_many_files_open_in_system = 23, > too_many_files_open = 24, > too_many_links = 31, > too_many_symbolic_link_levels = 40, > > > value_too_large = 75, > > > wrong_protocol_type = 91 > }; > > >} ># 40 "/usr/include/c++/4.8.2/system_error" 2 3 > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > class error_code; > class error_condition; > class error_category; > 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 { }; > > > > class error_category > { > protected: > error_category() noexcept; > > public: > virtual ~error_category() noexcept; > > error_category(const error_category&) = delete; > error_category& operator=(const error_category&) = delete; > > virtual const char* > name() const noexcept = 0; > > virtual string > message(int) const = 0; > > 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; > > string > message() const > { return category().message(value()); } > > explicit operator bool() const noexcept > { return _M_value != 0 ? true : false; } > > > 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; } > > string > message() const > { return category().message(value()); } > > explicit operator bool() const noexcept > { return _M_value != 0 ? true : false; } > > > 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) { } ># 332 "/usr/include/c++/4.8.2/system_error" 3 > 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) { } > > 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); > } > }; > > >} ># 44 "/usr/include/c++/4.8.2/mutex" 2 3 > > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > > class __mutex_base > { > protected: > typedef __gthread_mutex_t __native_type; > > > __native_type _M_mutex = { { 0, 0, 0, 0, 0, 0, 0, { 0, 0 } } }; > > constexpr __mutex_base() noexcept = default; ># 77 "/usr/include/c++/4.8.2/mutex" 3 > __mutex_base(const __mutex_base&) = delete; > __mutex_base& operator=(const __mutex_base&) = delete; > }; > > > class __recursive_mutex_base > { > protected: > typedef __gthread_recursive_mutex_t __native_type; > > __recursive_mutex_base(const __recursive_mutex_base&) = delete; > __recursive_mutex_base& operator=(const __recursive_mutex_base&) = delete; > > > __native_type _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0, { 0, 0 } } }; > > __recursive_mutex_base() = default; ># 106 "/usr/include/c++/4.8.2/mutex" 3 > }; ># 117 "/usr/include/c++/4.8.2/mutex" 3 > class mutex : private __mutex_base > { > public: > typedef __native_type* native_handle_type; > > > constexpr > > mutex() noexcept = default; > ~mutex() = default; > > mutex(const mutex&) = delete; > mutex& operator=(const mutex&) = delete; > > void > lock() > { > int __e = __gthread_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > bool > try_lock() noexcept > { > > return !__gthread_mutex_trylock(&_M_mutex); > } > > void > unlock() > { > > __gthread_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() > { return &_M_mutex; } > }; > > > class recursive_mutex : private __recursive_mutex_base > { > public: > typedef __native_type* native_handle_type; > > recursive_mutex() = default; > ~recursive_mutex() = default; > > recursive_mutex(const recursive_mutex&) = delete; > recursive_mutex& operator=(const recursive_mutex&) = delete; > > void > lock() > { > int __e = __gthread_recursive_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > bool > try_lock() noexcept > { > > return !__gthread_recursive_mutex_trylock(&_M_mutex); > } > > void > unlock() > { > > __gthread_recursive_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() > { return &_M_mutex; } > }; > > > > class timed_mutex : private __mutex_base > { > > typedef chrono::steady_clock __clock_t; > > > > > public: > typedef __native_type* native_handle_type; > > timed_mutex() = default; > ~timed_mutex() = default; > > timed_mutex(const timed_mutex&) = delete; > timed_mutex& operator=(const timed_mutex&) = delete; > > void > lock() > { > int __e = __gthread_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > bool > try_lock() noexcept > { > > return !__gthread_mutex_trylock(&_M_mutex); > } > > template <class _Rep, class _Period> > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { return _M_try_lock_for(__rtime); } > > template <class _Clock, class _Duration> > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_until(__atime); } > > void > unlock() > { > > __gthread_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() > { return &_M_mutex; } > > private: > template<typename _Rep, typename _Period> > bool > _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { > auto __rt = chrono::duration_cast<__clock_t::duration>(__rtime); > if (ratio_greater<__clock_t::period, _Period>()) > ++__rt; > > return _M_try_lock_until(__clock_t::now() + __rt); > } > > template<typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<__clock_t, > _Duration>& __atime) > { > chrono::time_point<__clock_t, chrono::seconds> __s = > chrono::time_point_cast<chrono::seconds>(__atime); > > chrono::nanoseconds __ns = > chrono::duration_cast<chrono::nanoseconds>(__atime - __s); > > __gthread_time_t __ts = { > static_cast<std::time_t>(__s.time_since_epoch().count()), > static_cast<long>(__ns.count()) > }; > > return !__gthread_mutex_timedlock(native_handle(), &__ts); > } > > template<typename _Clock, typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_for(__atime - _Clock::now()); } > }; > > > class recursive_timed_mutex : private __recursive_mutex_base > { > > typedef chrono::steady_clock __clock_t; > > > > > public: > typedef __native_type* native_handle_type; > > recursive_timed_mutex() = default; > ~recursive_timed_mutex() = default; > > recursive_timed_mutex(const recursive_timed_mutex&) = delete; > recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; > > void > lock() > { > int __e = __gthread_recursive_mutex_lock(&_M_mutex); > > > if (__e) > __throw_system_error(__e); > } > > bool > try_lock() noexcept > { > > return !__gthread_recursive_mutex_trylock(&_M_mutex); > } > > template <class _Rep, class _Period> > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { return _M_try_lock_for(__rtime); } > > template <class _Clock, class _Duration> > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_until(__atime); } > > void > unlock() > { > > __gthread_recursive_mutex_unlock(&_M_mutex); > } > > native_handle_type > native_handle() > { return &_M_mutex; } > > private: > template<typename _Rep, typename _Period> > bool > _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { > auto __rt = chrono::duration_cast<__clock_t::duration>(__rtime); > if (ratio_greater<__clock_t::period, _Period>()) > ++__rt; > > return _M_try_lock_until(__clock_t::now() + __rt); > } > > template<typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<__clock_t, > _Duration>& __atime) > { > chrono::time_point<__clock_t, chrono::seconds> __s = > chrono::time_point_cast<chrono::seconds>(__atime); > > chrono::nanoseconds __ns = > chrono::duration_cast<chrono::nanoseconds>(__atime - __s); > > __gthread_time_t __ts = { > static_cast<std::time_t>(__s.time_since_epoch().count()), > static_cast<long>(__ns.count()) > }; > > return !__gthread_mutex_timedlock(native_handle(), &__ts); > } > > template<typename _Clock, typename _Duration> > bool > _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { return _M_try_lock_for(__atime - _Clock::now()); } > }; > > > > > struct defer_lock_t { }; > > > struct try_to_lock_t { }; > > > > struct adopt_lock_t { }; > > constexpr defer_lock_t defer_lock { }; > constexpr try_to_lock_t try_to_lock { }; > constexpr adopt_lock_t adopt_lock { }; > > > > > template<typename _Mutex> > class lock_guard > { > public: > typedef _Mutex mutex_type; > > explicit lock_guard(mutex_type& __m) : _M_device(__m) > { _M_device.lock(); } > > lock_guard(mutex_type& __m, adopt_lock_t) : _M_device(__m) > { } > > ~lock_guard() > { _M_device.unlock(); } > > lock_guard(const lock_guard&) = delete; > lock_guard& operator=(const lock_guard&) = delete; > > private: > mutex_type& _M_device; > }; > > > template<typename _Mutex> > class unique_lock > { > public: > typedef _Mutex mutex_type; > > unique_lock() noexcept > : _M_device(0), _M_owns(false) > { } > > explicit unique_lock(mutex_type& __m) > : _M_device(&__m), _M_owns(false) > { > lock(); > _M_owns = true; > } > > unique_lock(mutex_type& __m, defer_lock_t) noexcept > : _M_device(&__m), _M_owns(false) > { } > > unique_lock(mutex_type& __m, try_to_lock_t) > : _M_device(&__m), _M_owns(_M_device->try_lock()) > { } > > unique_lock(mutex_type& __m, adopt_lock_t) > : _M_device(&__m), _M_owns(true) > { > > } > > template<typename _Clock, typename _Duration> > unique_lock(mutex_type& __m, > const chrono::time_point<_Clock, _Duration>& __atime) > : _M_device(&__m), _M_owns(_M_device->try_lock_until(__atime)) > { } > > template<typename _Rep, typename _Period> > unique_lock(mutex_type& __m, > const chrono::duration<_Rep, _Period>& __rtime) > : _M_device(&__m), _M_owns(_M_device->try_lock_for(__rtime)) > { } > > ~unique_lock() > { > if (_M_owns) > unlock(); > } > > unique_lock(const unique_lock&) = delete; > unique_lock& operator=(const unique_lock&) = delete; > > unique_lock(unique_lock&& __u) noexcept > : _M_device(__u._M_device), _M_owns(__u._M_owns) > { > __u._M_device = 0; > __u._M_owns = false; > } > > unique_lock& operator=(unique_lock&& __u) noexcept > { > if(_M_owns) > unlock(); > > unique_lock(std::move(__u)).swap(*this); > > __u._M_device = 0; > __u._M_owns = false; > > return *this; > } > > void > lock() > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_device->lock(); > _M_owns = true; > } > } > > bool > try_lock() > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock(); > return _M_owns; > } > } > > template<typename _Clock, typename _Duration> > bool > try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock_until(__atime); > return _M_owns; > } > } > > template<typename _Rep, typename _Period> > bool > try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) > { > if (!_M_device) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_owns) > __throw_system_error(int(errc::resource_deadlock_would_occur)); > else > { > _M_owns = _M_device->try_lock_for(__rtime); > return _M_owns; > } > } > > void > unlock() > { > if (!_M_owns) > __throw_system_error(int(errc::operation_not_permitted)); > else if (_M_device) > { > _M_device->unlock(); > _M_owns = false; > } > } > > void > swap(unique_lock& __u) noexcept > { > std::swap(_M_device, __u._M_device); > std::swap(_M_owns, __u._M_owns); > } > > mutex_type* > release() noexcept > { > mutex_type* __ret = _M_device; > _M_device = 0; > _M_owns = false; > return __ret; > } > > bool > owns_lock() const noexcept > { return _M_owns; } > > explicit operator bool() const noexcept > { return owns_lock(); } > > mutex_type* > mutex() const noexcept > { return _M_device; } > > private: > mutex_type* _M_device; > bool _M_owns; > }; > > > template<typename _Mutex> > inline void > swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept > { __x.swap(__y); } > > template<int _Idx> > struct __unlock_impl > { > template<typename... _Lock> > static void > __do_unlock(tuple<_Lock&...>& __locks) > { > std::get<_Idx>(__locks).unlock(); > __unlock_impl<_Idx - 1>::__do_unlock(__locks); > } > }; > > template<> > struct __unlock_impl<-1> > { > template<typename... _Lock> > static void > __do_unlock(tuple<_Lock&...>&) > { } > }; > > template<typename _Lock> > unique_lock<_Lock> > __try_to_lock(_Lock& __l) > { return unique_lock<_Lock>(__l, try_to_lock); } > > template<int _Idx, bool _Continue = true> > struct __try_lock_impl > { > template<typename... _Lock> > static void > __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) > { > __idx = _Idx; > auto __lock = __try_to_lock(std::get<_Idx>(__locks)); > if (__lock.owns_lock()) > { > __try_lock_impl<_Idx + 1, _Idx + 2 < sizeof...(_Lock)>:: > __do_try_lock(__locks, __idx); > if (__idx == -1) > __lock.release(); > } > } > }; > > template<int _Idx> > struct __try_lock_impl<_Idx, false> > { > template<typename... _Lock> > static void > __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) > { > __idx = _Idx; > auto __lock = __try_to_lock(std::get<_Idx>(__locks)); > if (__lock.owns_lock()) > { > __idx = -1; > __lock.release(); > } > } > }; ># 682 "/usr/include/c++/4.8.2/mutex" 3 > template<typename _Lock1, typename _Lock2, typename... _Lock3> > int > try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3) > { > int __idx; > auto __locks = std::tie(__l1, __l2, __l3...); > try > { __try_lock_impl<0>::__do_try_lock(__locks, __idx); } > catch(...) > { } > return __idx; > } ># 706 "/usr/include/c++/4.8.2/mutex" 3 > template<typename _L1, typename _L2, typename ..._L3> > void > lock(_L1& __l1, _L2& __l2, _L3&... __l3) > { > while (true) > { > unique_lock<_L1> __first(__l1); > int __idx; > auto __locks = std::tie(__l2, __l3...); > __try_lock_impl<0, sizeof...(_L3)>::__do_try_lock(__locks, __idx); > if (__idx == -1) > { > __first.release(); > return; > } > } > } > > > > struct once_flag > { > private: > typedef __gthread_once_t __native_type; > __native_type _M_once = 0; > > public: > > constexpr once_flag() noexcept = default; > > > once_flag(const once_flag&) = delete; > > once_flag& operator=(const once_flag&) = delete; > > template<typename _Callable, typename... _Args> > friend void > call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); > }; > > > extern __thread void* __once_callable; > extern __thread void (*__once_call)(); > > template<typename _Callable> > inline void > __once_call_impl() > { > (*(_Callable*)__once_callable)(); > } ># 766 "/usr/include/c++/4.8.2/mutex" 3 > extern "C" void __once_proxy(void); > > > template<typename _Callable, typename... _Args> > void > call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) > { > > auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f), > std::forward<_Args>(__args)...); > __once_callable = &__bound_functor; > __once_call = &__once_call_impl<decltype(__bound_functor)>; ># 786 "/usr/include/c++/4.8.2/mutex" 3 > int __e = __gthread_once(&(__once._M_once), &__once_proxy); > > > > > > > if (__e) > __throw_system_error(__e); > } > > > > >} ># 23 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 1 "/usr/include/c++/4.8.2/thread" 1 3 ># 32 "/usr/include/c++/4.8.2/thread" 3 > ># 33 "/usr/include/c++/4.8.2/thread" 3 ># 47 "/usr/include/c++/4.8.2/thread" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 60 "/usr/include/c++/4.8.2/thread" 3 > class thread > { > public: > typedef __gthread_t native_handle_type; > struct _Impl_base; > typedef shared_ptr<_Impl_base> __shared_base_type; > > > class id > { > native_handle_type _M_thread; > > public: > id() noexcept : _M_thread() { } > > explicit > id(native_handle_type __id) : _M_thread(__id) { } > > private: > friend class thread; > friend class hash<thread::id>; > > friend bool > operator==(thread::id __x, thread::id __y) noexcept > { return __gthread_equal(__x._M_thread, __y._M_thread); } > > friend bool > operator<(thread::id __x, thread::id __y) noexcept > { return __x._M_thread < __y._M_thread; } > > template<class _CharT, class _Traits> > friend basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id); > }; > > > > struct _Impl_base > { > __shared_base_type _M_this_ptr; > > inline virtual ~_Impl_base(); > > virtual void _M_run() = 0; > }; > > template<typename _Callable> > struct _Impl : public _Impl_base > { > _Callable _M_func; > > _Impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f)) > { } > > void > _M_run() { _M_func(); } > }; > > private: > id _M_id; > > public: > thread() noexcept = default; > > > thread(thread&) = delete; > thread(const thread&) = delete; > > thread(thread&& __t) noexcept > { swap(__t); } > > template<typename _Callable, typename... _Args> > explicit > thread(_Callable&& __f, _Args&&... __args) > { > _M_start_thread(_M_make_routine(std::__bind_simple( > std::forward<_Callable>(__f), > std::forward<_Args>(__args)...))); > } > > ~thread() > { > if (joinable()) > std::terminate(); > } > > thread& operator=(const thread&) = delete; > > thread& operator=(thread&& __t) noexcept > { > if (joinable()) > std::terminate(); > swap(__t); > return *this; > } > > void > swap(thread& __t) noexcept > { std::swap(_M_id, __t._M_id); } > > bool > joinable() const noexcept > { return !(_M_id == id()); } > > void > join(); > > void > detach(); > > thread::id > get_id() const noexcept > { return _M_id; } > > > > native_handle_type > native_handle() > { return _M_id._M_thread; } > > > static unsigned int > hardware_concurrency() noexcept; > > private: > void > _M_start_thread(__shared_base_type); > > template<typename _Callable> > shared_ptr<_Impl<_Callable>> > _M_make_routine(_Callable&& __f) > { > > return std::make_shared<_Impl<_Callable>>(std::forward<_Callable>(__f)); > } > }; > > inline thread::_Impl_base::~_Impl_base() = default; > > inline void > swap(thread& __x, thread& __y) noexcept > { __x.swap(__y); } > > inline bool > operator!=(thread::id __x, thread::id __y) noexcept > { return !(__x == __y); } > > inline bool > operator<=(thread::id __x, thread::id __y) noexcept > { return !(__y < __x); } > > inline bool > operator>(thread::id __x, thread::id __y) noexcept > { return __y < __x; } > > inline bool > operator>=(thread::id __x, thread::id __y) noexcept > { return !(__x < __y); } > > > > template<> > struct hash<thread::id> > : public __hash_base<size_t, thread::id> > { > size_t > operator()(const thread::id& __id) const noexcept > { return std::_Hash_impl::hash(__id._M_thread); } > }; > > template<class _CharT, class _Traits> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id) > { > if (__id == thread::id()) > return __out << "thread::id of a non-executing thread"; > else > return __out << __id._M_thread; > } > > > > > > > > namespace this_thread > { > > > > inline thread::id > get_id() noexcept { return thread::id(__gthread_self()); } > > > inline void > yield() noexcept > { > > > > } > > void > __sleep_for(chrono::seconds, chrono::nanoseconds); > > > template<typename _Rep, typename _Period> > inline void > sleep_for(const chrono::duration<_Rep, _Period>& __rtime) > { > auto __s = chrono::duration_cast<chrono::seconds>(__rtime); > auto __ns = chrono::duration_cast<chrono::nanoseconds>(__rtime - __s); ># 281 "/usr/include/c++/4.8.2/thread" 3 > __sleep_for(__s, __ns); > > } > > > template<typename _Clock, typename _Duration> > inline void > sleep_until(const chrono::time_point<_Clock, _Duration>& __atime) > { sleep_for(__atime - _Clock::now()); } > > > } > > > >} ># 24 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 >extern "C" { ># 35 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" ># 1 "/usr/include/unistd.h" 1 3 4 ># 27 "/usr/include/unistd.h" 3 4 >extern "C" { ># 202 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/posix_opt.h" 1 3 4 ># 203 "/usr/include/unistd.h" 2 3 4 > > > ># 1 "/usr/include/bits/environments.h" 1 3 4 ># 22 "/usr/include/bits/environments.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 23 "/usr/include/bits/environments.h" 2 3 4 ># 207 "/usr/include/unistd.h" 2 3 4 ># 226 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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 ># 25 "/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 (); ># 646 "/usr/include/unistd.h" 3 4 >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 (); ># 672 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) throw (); ># 689 "/usr/include/unistd.h" 3 4 >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))); ># 893 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/getopt.h" 1 3 4 ># 49 "/usr/include/getopt.h" 3 4 >extern "C" { ># 58 "/usr/include/getopt.h" 3 4 >extern char *optarg; ># 72 "/usr/include/getopt.h" 3 4 >extern int optind; > > > > >extern int opterr; > > > >extern int optopt; ># 151 "/usr/include/getopt.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) > throw (); ># 186 "/usr/include/getopt.h" 3 4 >} ># 894 "/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 (); ># 1015 "/usr/include/unistd.h" 3 4 >extern int truncate (const char *__file, __off_t __length) > throw () __attribute__ ((__nonnull__ (1))) ; ># 1027 "/usr/include/unistd.h" 3 4 >extern int truncate64 (const char *__file, __off64_t __length) > throw () __attribute__ ((__nonnull__ (1))) ; ># 1038 "/usr/include/unistd.h" 3 4 >extern int ftruncate (int __fd, __off_t __length) throw () ; ># 1048 "/usr/include/unistd.h" 3 4 >extern int ftruncate64 (int __fd, __off64_t __length) throw () ; ># 1059 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) throw () ; > > > > > >extern void *sbrk (intptr_t __delta) throw (); ># 1080 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) throw (); ># 1103 "/usr/include/unistd.h" 3 4 >extern int lockf (int __fd, int __cmd, __off_t __len) ; ># 1113 "/usr/include/unistd.h" 3 4 >extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; ># 1134 "/usr/include/unistd.h" 3 4 >extern int fdatasync (int __fildes); > > > > > > > >extern char *crypt (const char *__key, const char *__salt) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > >extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); > > > > > > >extern void swab (const void *__restrict __from, void *__restrict __to, > ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); ># 1172 "/usr/include/unistd.h" 3 4 >} ># 36 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 49 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" 1 ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" 1 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osi_warnings.h" 1 ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 1 ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" ># 1 "/usr/include/memory.h" 1 3 4 ># 29 "/usr/include/memory.h" 3 4 ># 1 "/usr/include/string.h" 1 3 4 ># 27 "/usr/include/string.h" 3 4 >extern "C" { > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 33 "/usr/include/string.h" 2 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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * >memchr (void *__s, int __c, size_t __n) throw () >{ > return __builtin_memchr (__s, __c, __n); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * >memchr (const void *__s, int __c, size_t __n) throw () >{ > return __builtin_memchr (__s, __c, __n); >} > >} > > > > > > > > > > >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))); > > > > > > > > > >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))); > ># 162 "/usr/include/string.h" 3 4 >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))); ># 207 "/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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >strchr (char *__s, int __c) throw () >{ > return __builtin_strchr (__s, __c); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >strchr (const char *__s, int __c) throw () >{ > return __builtin_strchr (__s, __c); >} > >} > > > > > > >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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >strrchr (char *__s, int __c) throw () >{ > return __builtin_strrchr (__s, __c); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >strrchr (const char *__s, int __c) throw () >{ > return __builtin_strrchr (__s, __c); >} > >} > > > > > > > > > > >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))); > > > > > > > > > >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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >strpbrk (char *__s, const char *__accept) throw () >{ > return __builtin_strpbrk (__s, __accept); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >strpbrk (const char *__s, const char *__accept) throw () >{ > return __builtin_strpbrk (__s, __accept); >} > >} > > > > > > >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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >strstr (char *__haystack, const char *__needle) throw () >{ > return __builtin_strstr (__haystack, __needle); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >strstr (const char *__haystack, const char *__needle) throw () >{ > return __builtin_strstr (__haystack, __needle); >} > >} > > > > > > > >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))); ># 378 "/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 (); > ># 434 "/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 (); > > > > > >extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); > > > >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 int bcmp (const void *__s1, const void *__s2, size_t __n) > throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); > > > >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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >index (char *__s, int __c) throw () >{ > return __builtin_index (__s, __c); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >index (const char *__s, int __c) throw () >{ > return __builtin_index (__s, __c); >} > >} > > > > > > > >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))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * >rindex (char *__s, int __c) throw () >{ > return __builtin_rindex (__s, __c); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * >rindex (const char *__s, int __c) throw () >{ > return __builtin_rindex (__s, __c); >} > >} > > > > > > > >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))); > > > > > >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))); ># 642 "/usr/include/string.h" 3 4 >} ># 30 "/usr/include/memory.h" 2 3 4 ># 11 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h" 1 3 4 ># 12 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 > > > ># 1 "/usr/include/sys/stat.h" 1 3 4 ># 104 "/usr/include/sys/stat.h" 3 4 >extern "C" { > ># 1 "/usr/include/bits/stat.h" 1 3 4 ># 46 "/usr/include/bits/stat.h" 3 4 >struct stat > { > __dev_t st_dev; > > > > > __ino_t st_ino; > > > > > > > > __nlink_t st_nlink; > __mode_t st_mode; > > __uid_t st_uid; > __gid_t st_gid; > > int __pad0; > > __dev_t st_rdev; > > > > > __off_t st_size; > > > > __blksize_t st_blksize; > > __blkcnt_t st_blocks; ># 91 "/usr/include/bits/stat.h" 3 4 > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 106 "/usr/include/bits/stat.h" 3 4 > __syscall_slong_t __unused[3]; ># 115 "/usr/include/bits/stat.h" 3 4 > }; > > > >struct stat64 > { > __dev_t st_dev; > > __ino64_t st_ino; > __nlink_t st_nlink; > __mode_t st_mode; > > > > > > > __uid_t st_uid; > __gid_t st_gid; > > int __pad0; > __dev_t st_rdev; > __off_t st_size; > > > > > > __blksize_t st_blksize; > __blkcnt64_t st_blocks; > > > > > > > > struct timespec st_atim; > struct timespec st_mtim; > struct timespec st_ctim; ># 164 "/usr/include/bits/stat.h" 3 4 > __syscall_slong_t __unused[3]; > > > > }; ># 107 "/usr/include/sys/stat.h" 2 3 4 ># 210 "/usr/include/sys/stat.h" 3 4 >extern int stat (const char *__restrict __file, > struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); > > > >extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2))); ># 229 "/usr/include/sys/stat.h" 3 4 >extern int stat64 (const char *__restrict __file, > struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); >extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); > > > > > > > >extern int fstatat (int __fd, const char *__restrict __file, > struct stat *__restrict __buf, int __flag) > throw () __attribute__ ((__nonnull__ (2, 3))); ># 254 "/usr/include/sys/stat.h" 3 4 >extern int fstatat64 (int __fd, const char *__restrict __file, > struct stat64 *__restrict __buf, int __flag) > throw () __attribute__ ((__nonnull__ (2, 3))); > > > > > > > >extern int lstat (const char *__restrict __file, > struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); ># 277 "/usr/include/sys/stat.h" 3 4 >extern int lstat64 (const char *__restrict __file, > struct stat64 *__restrict __buf) > throw () __attribute__ ((__nonnull__ (1, 2))); > > > > > >extern int chmod (const char *__file, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int lchmod (const char *__file, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (1))); > > > > >extern int fchmod (int __fd, __mode_t __mode) throw (); > > > > > >extern int fchmodat (int __fd, const char *__file, __mode_t __mode, > int __flag) > throw () __attribute__ ((__nonnull__ (2))) ; > > > > > > >extern __mode_t umask (__mode_t __mask) throw (); > > > > >extern __mode_t getumask (void) throw (); > > > >extern int mkdir (const char *__path, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int mkdirat (int __fd, const char *__path, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (2))); > > > > > > >extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) > throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int mknodat (int __fd, const char *__path, __mode_t __mode, > __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); > > > > > >extern int mkfifo (const char *__path, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (1))); > > > > > >extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) > throw () __attribute__ ((__nonnull__ (2))); > > > > > >extern int utimensat (int __fd, const char *__path, > const struct timespec __times[2], > int __flags) > throw () __attribute__ ((__nonnull__ (2))); > > > > >extern int futimens (int __fd, const struct timespec __times[2]) throw (); ># 400 "/usr/include/sys/stat.h" 3 4 >extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) > throw () __attribute__ ((__nonnull__ (3))); >extern int __xstat (int __ver, const char *__filename, > struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); >extern int __lxstat (int __ver, const char *__filename, > struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); >extern int __fxstatat (int __ver, int __fildes, const char *__filename, > struct stat *__stat_buf, int __flag) > throw () __attribute__ ((__nonnull__ (3, 4))); ># 433 "/usr/include/sys/stat.h" 3 4 >extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) > throw () __attribute__ ((__nonnull__ (3))); >extern int __xstat64 (int __ver, const char *__filename, > struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); >extern int __lxstat64 (int __ver, const char *__filename, > struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); >extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, > struct stat64 *__stat_buf, int __flag) > throw () __attribute__ ((__nonnull__ (3, 4))); > >extern int __xmknod (int __ver, const char *__path, __mode_t __mode, > __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); > >extern int __xmknodat (int __ver, int __fd, const char *__path, > __mode_t __mode, __dev_t *__dev) > throw () __attribute__ ((__nonnull__ (3, 5))); > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) stat (const char *__path, struct stat *__statbuf) throw () >{ > return __xstat (1, __path, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) lstat (const char *__path, struct stat *__statbuf) throw () >{ > return __lxstat (1, __path, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) fstat (int __fd, struct stat *__statbuf) throw () >{ > return __fxstat (1, __fd, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag) throw () > >{ > return __fxstatat (1, __fd, __filename, __statbuf, __flag); >} > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev) throw () >{ > return __xmknod (0, __path, __mode, &__dev); >} > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) throw () > >{ > return __xmknodat (0, __fd, __path, __mode, &__dev); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) stat64 (const char *__path, struct stat64 *__statbuf) throw () >{ > return __xstat64 (1, __path, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf) throw () >{ > return __lxstat64 (1, __path, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) throw () >{ > return __fxstat64 (1, __fd, __statbuf); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag) throw () > >{ > return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); >} > > > > > > >} ># 16 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 > > > ># 1 "/usr/include/sys/time.h" 1 3 4 ># 28 "/usr/include/sys/time.h" 3 4 ># 1 "/usr/include/bits/time.h" 1 3 4 ># 29 "/usr/include/sys/time.h" 2 3 4 ># 38 "/usr/include/sys/time.h" 3 4 >extern "C" { ># 56 "/usr/include/sys/time.h" 3 4 >struct timezone > { > int tz_minuteswest; > int tz_dsttime; > }; > >typedef struct timezone *__restrict __timezone_ptr_t; ># 72 "/usr/include/sys/time.h" 3 4 >extern int gettimeofday (struct timeval *__restrict __tv, > __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1))); > > > > >extern int settimeofday (const struct timeval *__tv, > const struct timezone *__tz) > throw (); > > > > > >extern int adjtime (const struct timeval *__delta, > struct timeval *__olddelta) throw (); > > > > >enum __itimer_which > { > > ITIMER_REAL = 0, > > > ITIMER_VIRTUAL = 1, > > > > ITIMER_PROF = 2 > > }; > > > >struct itimerval > { > > struct timeval it_interval; > > struct timeval it_value; > }; > > > > > > >typedef int __itimer_which_t; > > > > >extern int getitimer (__itimer_which_t __which, > struct itimerval *__value) throw (); > > > > >extern int setitimer (__itimer_which_t __which, > const struct itimerval *__restrict __new, > struct itimerval *__restrict __old) throw (); > > > > >extern int utimes (const char *__file, const struct timeval __tvp[2]) > throw () __attribute__ ((__nonnull__ (1))); > > > >extern int lutimes (const char *__file, const struct timeval __tvp[2]) > throw () __attribute__ ((__nonnull__ (1))); > > >extern int futimes (int __fd, const struct timeval __tvp[2]) throw (); > > > > > > >extern int futimesat (int __fd, const char *__file, > const struct timeval __tvp[2]) throw (); ># 190 "/usr/include/sys/time.h" 3 4 >} ># 20 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/usr/include/netdb.h" 1 3 4 ># 27 "/usr/include/netdb.h" 3 4 ># 1 "/usr/include/netinet/in.h" 1 3 4 ># 24 "/usr/include/netinet/in.h" 3 4 ># 1 "/usr/include/sys/socket.h" 1 3 4 ># 25 "/usr/include/sys/socket.h" 3 4 >extern "C" { > ># 1 "/usr/include/sys/uio.h" 1 3 4 ># 26 "/usr/include/sys/uio.h" 3 4 >extern "C" { > > ># 1 "/usr/include/bits/uio.h" 1 3 4 ># 43 "/usr/include/bits/uio.h" 3 4 >struct iovec > { > void *iov_base; > size_t iov_len; > }; ># 56 "/usr/include/bits/uio.h" 3 4 >extern "C" { > > >extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, > unsigned long int __liovcnt, > const struct iovec *__rvec, > unsigned long int __riovcnt, > unsigned long int __flags) > throw (); > > >extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, > unsigned long int __liovcnt, > const struct iovec *__rvec, > unsigned long int __riovcnt, > unsigned long int __flags) > throw (); > >} ># 30 "/usr/include/sys/uio.h" 2 3 4 ># 40 "/usr/include/sys/uio.h" 3 4 >extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) > ; ># 51 "/usr/include/sys/uio.h" 3 4 >extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) > ; ># 66 "/usr/include/sys/uio.h" 3 4 >extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, > __off_t __offset) ; ># 78 "/usr/include/sys/uio.h" 3 4 >extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, > __off_t __offset) ; ># 104 "/usr/include/sys/uio.h" 3 4 >extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, > __off64_t __offset) ; ># 116 "/usr/include/sys/uio.h" 3 4 >extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, > __off64_t __offset) ; > > > >} ># 28 "/usr/include/sys/socket.h" 2 3 4 > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 30 "/usr/include/sys/socket.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 33 "/usr/include/sys/socket.h" 2 3 4 > > > > > > ># 1 "/usr/include/bits/socket.h" 1 3 4 ># 28 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 29 "/usr/include/bits/socket.h" 2 3 4 ># 39 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/bits/socket_type.h" 1 3 4 ># 24 "/usr/include/bits/socket_type.h" 3 4 >enum __socket_type >{ > SOCK_STREAM = 1, > > > SOCK_DGRAM = 2, > > > SOCK_RAW = 3, > > SOCK_RDM = 4, > > SOCK_SEQPACKET = 5, > > > SOCK_DCCP = 6, > > SOCK_PACKET = 10, > > > > > > > > SOCK_CLOEXEC = 02000000, > > > SOCK_NONBLOCK = 00004000 > > >}; ># 40 "/usr/include/bits/socket.h" 2 3 4 ># 151 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/bits/sockaddr.h" 1 3 4 ># 28 "/usr/include/bits/sockaddr.h" 3 4 >typedef unsigned short int sa_family_t; ># 152 "/usr/include/bits/socket.h" 2 3 4 > > >struct sockaddr > { > sa_family_t sa_family; > char sa_data[14]; > }; ># 167 "/usr/include/bits/socket.h" 3 4 >struct sockaddr_storage > { > sa_family_t ss_family; > char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))]; > unsigned long int __ss_align; > }; > > > >enum > { > MSG_OOB = 0x01, > > MSG_PEEK = 0x02, > > MSG_DONTROUTE = 0x04, > > > > MSG_TRYHARD = MSG_DONTROUTE, > > > MSG_CTRUNC = 0x08, > > MSG_PROXY = 0x10, > > MSG_TRUNC = 0x20, > > MSG_DONTWAIT = 0x40, > > MSG_EOR = 0x80, > > MSG_WAITALL = 0x100, > > MSG_FIN = 0x200, > > MSG_SYN = 0x400, > > MSG_CONFIRM = 0x800, > > MSG_RST = 0x1000, > > MSG_ERRQUEUE = 0x2000, > > MSG_NOSIGNAL = 0x4000, > > MSG_MORE = 0x8000, > > MSG_WAITFORONE = 0x10000, > > MSG_FASTOPEN = 0x20000000, > > > MSG_CMSG_CLOEXEC = 0x40000000 > > > > }; > > > > >struct msghdr > { > void *msg_name; > socklen_t msg_namelen; > > struct iovec *msg_iov; > size_t msg_iovlen; > > void *msg_control; > size_t msg_controllen; > > > > > int msg_flags; > }; > > >struct cmsghdr > { > size_t cmsg_len; > > > > > int cmsg_level; > int cmsg_type; > > > > }; ># 277 "/usr/include/bits/socket.h" 3 4 >extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, > struct cmsghdr *__cmsg) throw (); > > > > >extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr * >__attribute__ ((__leaf__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) throw () >{ > if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) > > return (struct cmsghdr *) 0; > > __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg > + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); > if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control > + __mhdr->msg_controllen) > || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) > > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) > > return (struct cmsghdr *) 0; > return __cmsg; >} > > > > >enum > { > SCM_RIGHTS = 0x01 > > > , SCM_CREDENTIALS = 0x02 > > > }; > > > >struct ucred >{ > pid_t pid; > uid_t uid; > gid_t gid; >}; ># 350 "/usr/include/bits/socket.h" 3 4 ># 1 "/usr/include/asm/socket.h" 1 3 4 ># 1 "/usr/include/asm-generic/socket.h" 1 3 4 > > > ># 1 "/usr/include/asm/sockios.h" 1 3 4 ># 1 "/usr/include/asm-generic/sockios.h" 1 3 4 ># 1 "/usr/include/asm/sockios.h" 2 3 4 ># 5 "/usr/include/asm-generic/socket.h" 2 3 4 ># 1 "/usr/include/asm/socket.h" 2 3 4 ># 351 "/usr/include/bits/socket.h" 2 3 4 ># 384 "/usr/include/bits/socket.h" 3 4 >struct linger > { > int l_onoff; > int l_linger; > }; ># 40 "/usr/include/sys/socket.h" 2 3 4 > > > > >struct osockaddr > { > unsigned short int sa_family; > unsigned char sa_data[14]; > }; > > > > >enum >{ > SHUT_RD = 0, > > SHUT_WR, > > SHUT_RDWR > >}; ># 102 "/usr/include/sys/socket.h" 3 4 >struct mmsghdr > { > struct msghdr msg_hdr; > unsigned int msg_len; > > }; > > > > > > >extern int socket (int __domain, int __type, int __protocol) throw (); > > > > > >extern int socketpair (int __domain, int __type, int __protocol, > int __fds[2]) throw (); > > >extern int bind (int __fd, const struct sockaddr * __addr, socklen_t __len) > throw (); > > >extern int getsockname (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __len) throw (); ># 138 "/usr/include/sys/socket.h" 3 4 >extern int connect (int __fd, const struct sockaddr * __addr, socklen_t __len); > > > >extern int getpeername (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __len) throw (); > > > > > > >extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); > > > > > > >extern ssize_t sendto (int __fd, const void *__buf, size_t __n, > int __flags, const struct sockaddr * __addr, > socklen_t __addr_len); ># 175 "/usr/include/sys/socket.h" 3 4 >extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, > int __flags, struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len); > > > > > > > >extern ssize_t sendmsg (int __fd, const struct msghdr *__message, > int __flags); > > > > > > > >extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, > unsigned int __vlen, int __flags); > > > > > > > >extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); > > > > > > > >extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, > unsigned int __vlen, int __flags, > const struct timespec *__tmo); > > > > > > >extern int getsockopt (int __fd, int __level, int __optname, > void *__restrict __optval, > socklen_t *__restrict __optlen) throw (); > > > > >extern int setsockopt (int __fd, int __level, int __optname, > const void *__optval, socklen_t __optlen) throw (); > > > > > >extern int listen (int __fd, int __n) throw (); ># 244 "/usr/include/sys/socket.h" 3 4 >extern int accept (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len); > > > > > > >extern int accept4 (int __fd, struct sockaddr *__restrict __addr, > socklen_t *__restrict __addr_len, int __flags); ># 262 "/usr/include/sys/socket.h" 3 4 >extern int shutdown (int __fd, int __how) throw (); > > > > >extern int sockatmark (int __fd) throw (); > > > > > > > >extern int isfdtype (int __fd, int __fdtype) throw (); ># 284 "/usr/include/sys/socket.h" 3 4 >} ># 25 "/usr/include/netinet/in.h" 2 3 4 > > > >extern "C" { > > >typedef uint32_t in_addr_t; >struct in_addr > { > in_addr_t s_addr; > }; > > ># 1 "/usr/include/bits/in.h" 1 3 4 ># 148 "/usr/include/bits/in.h" 3 4 >struct ip_opts > { > struct in_addr ip_dst; > char ip_opts[40]; > }; > > >struct ip_mreqn > { > struct in_addr imr_multiaddr; > struct in_addr imr_address; > int imr_ifindex; > }; > > >struct in_pktinfo > { > int ipi_ifindex; > struct in_addr ipi_spec_dst; > struct in_addr ipi_addr; > }; ># 39 "/usr/include/netinet/in.h" 2 3 4 > > >enum > { > IPPROTO_IP = 0, > > IPPROTO_ICMP = 1, > > IPPROTO_IGMP = 2, > > IPPROTO_IPIP = 4, > > IPPROTO_TCP = 6, > > IPPROTO_EGP = 8, > > IPPROTO_PUP = 12, > > IPPROTO_UDP = 17, > > IPPROTO_IDP = 22, > > IPPROTO_TP = 29, > > IPPROTO_DCCP = 33, > > IPPROTO_IPV6 = 41, > > IPPROTO_RSVP = 46, > > IPPROTO_GRE = 47, > > IPPROTO_ESP = 50, > > IPPROTO_AH = 51, > > IPPROTO_MTP = 92, > > IPPROTO_BEETPH = 94, > > IPPROTO_ENCAP = 98, > > IPPROTO_PIM = 103, > > IPPROTO_COMP = 108, > > IPPROTO_SCTP = 132, > > IPPROTO_UDPLITE = 136, > > IPPROTO_MPLS = 137, > > IPPROTO_RAW = 255, > > IPPROTO_MAX > }; > > > > > >enum > { > IPPROTO_HOPOPTS = 0, > > IPPROTO_ROUTING = 43, > > IPPROTO_FRAGMENT = 44, > > IPPROTO_ICMPV6 = 58, > > IPPROTO_NONE = 59, > > IPPROTO_DSTOPTS = 60, > > IPPROTO_MH = 135 > > }; > > > >typedef uint16_t in_port_t; > > >enum > { > IPPORT_ECHO = 7, > IPPORT_DISCARD = 9, > IPPORT_SYSTAT = 11, > IPPORT_DAYTIME = 13, > IPPORT_NETSTAT = 15, > IPPORT_FTP = 21, > IPPORT_TELNET = 23, > IPPORT_SMTP = 25, > IPPORT_TIMESERVER = 37, > IPPORT_NAMESERVER = 42, > IPPORT_WHOIS = 43, > IPPORT_MTP = 57, > > IPPORT_TFTP = 69, > IPPORT_RJE = 77, > IPPORT_FINGER = 79, > IPPORT_TTYLINK = 87, > IPPORT_SUPDUP = 95, > > > IPPORT_EXECSERVER = 512, > IPPORT_LOGINSERVER = 513, > IPPORT_CMDSERVER = 514, > IPPORT_EFSSERVER = 520, > > > IPPORT_BIFFUDP = 512, > IPPORT_WHOSERVER = 513, > IPPORT_ROUTESERVER = 520, > > > IPPORT_RESERVED = 1024, > > > IPPORT_USERRESERVED = 5000 > }; ># 212 "/usr/include/netinet/in.h" 3 4 >struct in6_addr > { > union > { > uint8_t __u6_addr8[16]; > > uint16_t __u6_addr16[8]; > uint32_t __u6_addr32[4]; > > } __in6_u; > > > > > > }; > > >extern const struct in6_addr in6addr_any; >extern const struct in6_addr in6addr_loopback; ># 240 "/usr/include/netinet/in.h" 3 4 >struct sockaddr_in > { > sa_family_t sin_family; > in_port_t sin_port; > struct in_addr sin_addr; > > > unsigned char sin_zero[sizeof (struct sockaddr) - > (sizeof (unsigned short int)) - > sizeof (in_port_t) - > sizeof (struct in_addr)]; > }; > > > >struct sockaddr_in6 > { > sa_family_t sin6_family; > in_port_t sin6_port; > uint32_t sin6_flowinfo; > struct in6_addr sin6_addr; > uint32_t sin6_scope_id; > }; > > > > >struct ip_mreq > { > > struct in_addr imr_multiaddr; > > > struct in_addr imr_interface; > }; > >struct ip_mreq_source > { > > struct in_addr imr_multiaddr; > > > struct in_addr imr_interface; > > > struct in_addr imr_sourceaddr; > }; > > > > >struct ipv6_mreq > { > > struct in6_addr ipv6mr_multiaddr; > > > unsigned int ipv6mr_interface; > }; > > > > >struct group_req > { > > uint32_t gr_interface; > > > struct sockaddr_storage gr_group; > }; > >struct group_source_req > { > > uint32_t gsr_interface; > > > struct sockaddr_storage gsr_group; > > > struct sockaddr_storage gsr_source; > }; > > > >struct ip_msfilter > { > > struct in_addr imsf_multiaddr; > > > struct in_addr imsf_interface; > > > uint32_t imsf_fmode; > > > uint32_t imsf_numsrc; > > struct in_addr imsf_slist[1]; > }; > > > > > >struct group_filter > { > > uint32_t gf_interface; > > > struct sockaddr_storage gf_group; > > > uint32_t gf_fmode; > > > uint32_t gf_numsrc; > > struct sockaddr_storage gf_slist[1]; >}; ># 377 "/usr/include/netinet/in.h" 3 4 >extern uint32_t ntohl (uint32_t __netlong) throw () __attribute__ ((__const__)); >extern uint16_t ntohs (uint16_t __netshort) > throw () __attribute__ ((__const__)); >extern uint32_t htonl (uint32_t __hostlong) > throw () __attribute__ ((__const__)); >extern uint16_t htons (uint16_t __hostshort) > throw () __attribute__ ((__const__)); > > > > ># 1 "/usr/include/bits/byteswap.h" 1 3 4 ># 389 "/usr/include/netinet/in.h" 2 3 4 ># 504 "/usr/include/netinet/in.h" 3 4 >extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) throw (); > > >extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) > throw (); ># 534 "/usr/include/netinet/in.h" 3 4 >struct cmsghdr; > > > >struct in6_pktinfo > { > struct in6_addr ipi6_addr; > unsigned int ipi6_ifindex; > }; > > >struct ip6_mtuinfo > { > struct sockaddr_in6 ip6m_addr; > uint32_t ip6m_mtu; > }; > > > >extern int inet6_option_space (int __nbytes) > throw () __attribute__ ((__deprecated__)); >extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, > int __type) throw () __attribute__ ((__deprecated__)); >extern int inet6_option_append (struct cmsghdr *__cmsg, > const uint8_t *__typep, int __multx, > int __plusy) throw () __attribute__ ((__deprecated__)); >extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, > int __multx, int __plusy) > throw () __attribute__ ((__deprecated__)); >extern int inet6_option_next (const struct cmsghdr *__cmsg, > uint8_t **__tptrp) > throw () __attribute__ ((__deprecated__)); >extern int inet6_option_find (const struct cmsghdr *__cmsg, > uint8_t **__tptrp, int __type) > throw () __attribute__ ((__deprecated__)); > > > >extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) throw (); >extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, > uint8_t __type, socklen_t __len, uint8_t __align, > void **__databufp) throw (); >extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) > throw (); >extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, > socklen_t __vallen) throw (); >extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, > uint8_t *__typep, socklen_t *__lenp, > void **__databufp) throw (); >extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, > uint8_t __type, socklen_t *__lenp, > void **__databufp) throw (); >extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, > socklen_t __vallen) throw (); > > > >extern socklen_t inet6_rth_space (int __type, int __segments) throw (); >extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, > int __segments) throw (); >extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) throw (); >extern int inet6_rth_reverse (const void *__in, void *__out) throw (); >extern int inet6_rth_segments (const void *__bp) throw (); >extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) > throw (); > > > > > >extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, > struct in_addr __group, uint32_t *__fmode, > uint32_t *__numsrc, struct in_addr *__slist) > throw (); > > >extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, > struct in_addr __group, uint32_t __fmode, > uint32_t __numsrc, > const struct in_addr *__slist) > throw (); > > > >extern int getsourcefilter (int __s, uint32_t __interface_addr, > const struct sockaddr *__group, > socklen_t __grouplen, uint32_t *__fmode, > uint32_t *__numsrc, > struct sockaddr_storage *__slist) throw (); > > >extern int setsourcefilter (int __s, uint32_t __interface_addr, > const struct sockaddr *__group, > socklen_t __grouplen, uint32_t __fmode, > uint32_t __numsrc, > const struct sockaddr_storage *__slist) throw (); > > >} ># 28 "/usr/include/netdb.h" 2 3 4 > > > > ># 1 "/usr/include/rpc/netdb.h" 1 3 4 ># 42 "/usr/include/rpc/netdb.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 43 "/usr/include/rpc/netdb.h" 2 3 4 > >extern "C" { > >struct rpcent >{ > char *r_name; > char **r_aliases; > int r_number; >}; > >extern void setrpcent (int __stayopen) throw (); >extern void endrpcent (void) throw (); >extern struct rpcent *getrpcbyname (const char *__name) throw (); >extern struct rpcent *getrpcbynumber (int __number) throw (); >extern struct rpcent *getrpcent (void) throw (); > > >extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, > char *__buffer, size_t __buflen, > struct rpcent **__result) throw (); > >extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, > char *__buffer, size_t __buflen, > struct rpcent **__result) throw (); > >extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, > size_t __buflen, struct rpcent **__result) throw (); > > >} ># 33 "/usr/include/netdb.h" 2 3 4 > > > > ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 24 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 2 3 4 > > > > > > > >typedef union sigval > { > int sival_int; > void *sival_ptr; > } sigval_t; ># 301 "/usr/include/bits/siginfo.h" 3 4 >typedef struct sigevent > { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > > union > { > int _pad[((64 / sizeof (int)) - 4)]; > > > > __pid_t _tid; > > struct > { > void (*_function) (sigval_t); > pthread_attr_t *_attribute; > } _sigev_thread; > } _sigev_un; > } sigevent_t; > > > > > > >enum >{ > SIGEV_SIGNAL = 0, > > SIGEV_NONE, > > SIGEV_THREAD, > > > SIGEV_THREAD_ID = 4 > >}; ># 38 "/usr/include/netdb.h" 2 3 4 > > > > ># 1 "/usr/include/bits/netdb.h" 1 3 4 ># 26 "/usr/include/bits/netdb.h" 3 4 >struct netent >{ > char *n_name; > char **n_aliases; > int n_addrtype; > uint32_t n_net; >}; ># 43 "/usr/include/netdb.h" 2 3 4 ># 53 "/usr/include/netdb.h" 3 4 >extern "C" { > > > > > > > >extern int *__h_errno_location (void) throw () __attribute__ ((__const__)); ># 92 "/usr/include/netdb.h" 3 4 >extern void herror (const char *__str) throw (); > > >extern const char *hstrerror (int __err_num) throw (); > > > > >struct hostent >{ > char *h_name; > char **h_aliases; > int h_addrtype; > int h_length; > char **h_addr_list; > > > >}; > > > > > > >extern void sethostent (int __stay_open); > > > > > >extern void endhostent (void); > > > > > > >extern struct hostent *gethostent (void); > > > > > > >extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, > int __type); > > > > > >extern struct hostent *gethostbyname (const char *__name); ># 155 "/usr/include/netdb.h" 3 4 >extern struct hostent *gethostbyname2 (const char *__name, int __af); ># 167 "/usr/include/netdb.h" 3 4 >extern int gethostent_r (struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, > int __type, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyname_r (const char *__restrict __name, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); > >extern int gethostbyname2_r (const char *__restrict __name, int __af, > struct hostent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct hostent **__restrict __result, > int *__restrict __h_errnop); ># 198 "/usr/include/netdb.h" 3 4 >extern void setnetent (int __stay_open); > > > > > >extern void endnetent (void); > > > > > > >extern struct netent *getnetent (void); > > > > > > >extern struct netent *getnetbyaddr (uint32_t __net, int __type); > > > > > >extern struct netent *getnetbyname (const char *__name); ># 237 "/usr/include/netdb.h" 3 4 >extern int getnetent_r (struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > >extern int getnetbyaddr_r (uint32_t __net, int __type, > struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > >extern int getnetbyname_r (const char *__restrict __name, > struct netent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct netent **__restrict __result, > int *__restrict __h_errnop); > > > > >struct servent >{ > char *s_name; > char **s_aliases; > int s_port; > char *s_proto; >}; > > > > > > >extern void setservent (int __stay_open); > > > > > >extern void endservent (void); > > > > > > >extern struct servent *getservent (void); > > > > > > >extern struct servent *getservbyname (const char *__name, const char *__proto); > > > > > > >extern struct servent *getservbyport (int __port, const char *__proto); ># 308 "/usr/include/netdb.h" 3 4 >extern int getservent_r (struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > >extern int getservbyname_r (const char *__restrict __name, > const char *__restrict __proto, > struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > >extern int getservbyport_r (int __port, const char *__restrict __proto, > struct servent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct servent **__restrict __result); > > > > >struct protoent >{ > char *p_name; > char **p_aliases; > int p_proto; >}; > > > > > > >extern void setprotoent (int __stay_open); > > > > > >extern void endprotoent (void); > > > > > > >extern struct protoent *getprotoent (void); > > > > > >extern struct protoent *getprotobyname (const char *__name); > > > > > >extern struct protoent *getprotobynumber (int __proto); ># 374 "/usr/include/netdb.h" 3 4 >extern int getprotoent_r (struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); > >extern int getprotobyname_r (const char *__restrict __name, > struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); > >extern int getprotobynumber_r (int __proto, > struct protoent *__restrict __result_buf, > char *__restrict __buf, size_t __buflen, > struct protoent **__restrict __result); ># 395 "/usr/include/netdb.h" 3 4 >extern int setnetgrent (const char *__netgroup); > > > > > > > >extern void endnetgrent (void); ># 412 "/usr/include/netdb.h" 3 4 >extern int getnetgrent (char **__restrict __hostp, > char **__restrict __userp, > char **__restrict __domainp); ># 423 "/usr/include/netdb.h" 3 4 >extern int innetgr (const char *__netgroup, const char *__host, > const char *__user, const char *__domain); > > > > > > > >extern int getnetgrent_r (char **__restrict __hostp, > char **__restrict __userp, > char **__restrict __domainp, > char *__restrict __buffer, size_t __buflen); ># 451 "/usr/include/netdb.h" 3 4 >extern int rcmd (char **__restrict __ahost, unsigned short int __rport, > const char *__restrict __locuser, > const char *__restrict __remuser, > const char *__restrict __cmd, int *__restrict __fd2p); ># 463 "/usr/include/netdb.h" 3 4 >extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, > const char *__restrict __locuser, > const char *__restrict __remuser, > const char *__restrict __cmd, int *__restrict __fd2p, > sa_family_t __af); ># 479 "/usr/include/netdb.h" 3 4 >extern int rexec (char **__restrict __ahost, int __rport, > const char *__restrict __name, > const char *__restrict __pass, > const char *__restrict __cmd, int *__restrict __fd2p); ># 491 "/usr/include/netdb.h" 3 4 >extern int rexec_af (char **__restrict __ahost, int __rport, > const char *__restrict __name, > const char *__restrict __pass, > const char *__restrict __cmd, int *__restrict __fd2p, > sa_family_t __af); ># 505 "/usr/include/netdb.h" 3 4 >extern int ruserok (const char *__rhost, int __suser, > const char *__remuser, const char *__locuser); ># 515 "/usr/include/netdb.h" 3 4 >extern int ruserok_af (const char *__rhost, int __suser, > const char *__remuser, const char *__locuser, > sa_family_t __af); ># 528 "/usr/include/netdb.h" 3 4 >extern int iruserok (uint32_t __raddr, int __suser, > const char *__remuser, const char *__locuser); ># 539 "/usr/include/netdb.h" 3 4 >extern int iruserok_af (const void *__raddr, int __suser, > const char *__remuser, const char *__locuser, > sa_family_t __af); ># 551 "/usr/include/netdb.h" 3 4 >extern int rresvport (int *__alport); ># 560 "/usr/include/netdb.h" 3 4 >extern int rresvport_af (int *__alport, sa_family_t __af); > > > > > > >struct addrinfo >{ > int ai_flags; > int ai_family; > int ai_socktype; > int ai_protocol; > socklen_t ai_addrlen; > struct sockaddr *ai_addr; > char *ai_canonname; > struct addrinfo *ai_next; >}; > > > >struct gaicb >{ > const char *ar_name; > const char *ar_service; > const struct addrinfo *ar_request; > struct addrinfo *ar_result; > > int __return; > int __unused[5]; >}; ># 662 "/usr/include/netdb.h" 3 4 >extern int getaddrinfo (const char *__restrict __name, > const char *__restrict __service, > const struct addrinfo *__restrict __req, > struct addrinfo **__restrict __pai); > > >extern void freeaddrinfo (struct addrinfo *__ai) throw (); > > >extern const char *gai_strerror (int __ecode) throw (); > > > > > >extern int getnameinfo (const struct sockaddr *__restrict __sa, > socklen_t __salen, char *__restrict __host, > socklen_t __hostlen, char *__restrict __serv, > socklen_t __servlen, int __flags); ># 692 "/usr/include/netdb.h" 3 4 >extern int getaddrinfo_a (int __mode, struct gaicb *__list[], > int __ent, struct sigevent *__restrict __sig); ># 703 "/usr/include/netdb.h" 3 4 >extern int gai_suspend (const struct gaicb *const __list[], int __ent, > const struct timespec *__timeout); > > >extern int gai_error (struct gaicb *__req) throw (); > > >extern int gai_cancel (struct gaicb *__gaicbp) throw (); > > >} ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 > > > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osiconst.h" 1 ># 29 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osiretcodes.h" 1 ># 16 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osiretcodes.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" 1 ># 102 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef char OSI_BOOL; ># 118 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef char OSI_CHAR; > > > > > typedef char* OSI_STRING; > > > > > > > ># 1 "/usr/include/inttypes.h" 1 3 4 ># 267 "/usr/include/inttypes.h" 3 4 >extern "C" { > > > > >typedef struct > { > long int quot; > long int rem; > } imaxdiv_t; ># 291 "/usr/include/inttypes.h" 3 4 >extern intmax_t imaxabs (intmax_t __n) throw () __attribute__ ((__const__)); > > >extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) > throw () __attribute__ ((__const__)); > > >extern intmax_t strtoimax (const char *__restrict __nptr, > char **__restrict __endptr, int __base) throw (); > > >extern uintmax_t strtoumax (const char *__restrict __nptr, > char ** __restrict __endptr, int __base) throw (); > > >extern intmax_t wcstoimax (const wchar_t *__restrict __nptr, > wchar_t **__restrict __endptr, int __base) > throw (); > > >extern uintmax_t wcstoumax (const wchar_t *__restrict __nptr, > wchar_t ** __restrict __endptr, int __base) > throw (); > > > > > >extern long int __strtol_internal (const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern __inline __attribute__ ((__gnu_inline__)) intmax_t >__attribute__ ((__leaf__)) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base) throw () > >{ > return __strtol_internal (nptr, endptr, base, 0); >} > >extern unsigned long int __strtoul_internal (const char *__restrict __nptr, > char ** __restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern __inline __attribute__ ((__gnu_inline__)) uintmax_t >__attribute__ ((__leaf__)) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) throw () > >{ > return __strtoul_internal (nptr, endptr, base, 0); >} > >extern long int __wcstol_internal (const wchar_t * __restrict __nptr, > wchar_t **__restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern __inline __attribute__ ((__gnu_inline__)) intmax_t >__attribute__ ((__leaf__)) wcstoimax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () > >{ > return __wcstol_internal (nptr, endptr, base, 0); >} > >extern unsigned long int __wcstoul_internal (const wchar_t * > __restrict __nptr, > wchar_t ** > __restrict __endptr, > int __base, int __group) > throw () __attribute__ ((__nonnull__ (1))) ; > >extern __inline __attribute__ ((__gnu_inline__)) uintmax_t >__attribute__ ((__leaf__)) wcstoumax (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () > >{ > return __wcstoul_internal (nptr, endptr, base, 0); >} ># 433 "/usr/include/inttypes.h" 3 4 >} ># 132 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" 2 > > typedef int8_t OSI_INT8; > > > > > > typedef int16_t OSI_INT16; > > > > > > typedef int32_t OSI_INT32; > > > > > > typedef int64_t OSI_INT64; ># 162 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef uint8_t OSI_UINT8; > > > > > typedef uint16_t OSI_UINT16; > > > > > typedef uint32_t OSI_UINT32; > > > > > typedef uint64_t OSI_UINT64; ># 300 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef float OSI_FLOAT; > > > > > typedef double OSI_DOUBLE; > > > > > > > > typedef OSI_UINT8 OSI_BIT; > > > > > typedef OSI_UINT8 OSI_BYTE; > > > > > typedef OSI_UINT16 OSI_HALF_WORD; > > > > > typedef OSI_UINT32 OSI_WORD; > > > > > typedef OSI_UINT64 OSI_LONG_WORD; > > > > > > > > typedef char* OSI_POINTER; > > > > > typedef void* OSI_VOIDPTR; > > > > > > typedef OSI_INT64 OSI_INTPTR; ># 365 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_INT16 OSI_DATABASE; > > > > > typedef OSI_INT16 OSI_OBJECT; > > > > > typedef OSI_INT16 OSI_FIELD; > > > > > typedef OSI_UINT32 OSI_RECORD; > > > > > typedef OSI_UINT16 OSI_INDEX; > > > > > typedef OSI_INT16 OSI_INSTANCE; > > > > > > typedef struct > { > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; > OSI_INDEX I; > OSI_RECORD R; > } > OSI_DOFRI_STR; > > > > > > typedef struct > { > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; > OSI_INDEX I; > OSI_RECORD R; > OSI_BOOL useRecordRange; > OSI_RECORD RStop; > OSI_BOOL useIndexRange; > OSI_INDEX IStop; > OSI_INSTANCE Instance; > } > OSI_DOFRI_EXT_STR; ># 434 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_INT32 OSI_RETCODE; > typedef OSI_RETCODE LOADER_ERROR; ># 450 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_UINT16 OSI_PORT; ># 464 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_INT32 OSI_SOCKET; > > > > > > typedef OSI_BYTE OSI_IPV6ADDR[ 16 ]; ># 491 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef pthread_mutex_t OSI_MUTEX; ># 508 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef struct > { > unsigned int count; > unsigned int maxCount; > pthread_mutex_t mutex; > pthread_cond_t cond; > } OSI_SEMAPHORE; ># 531 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef struct > { > unsigned char manual; > unsigned char state; > pthread_mutex_t mutex; > pthread_cond_t cond; > } OSI_EVENT; ># 547 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef struct > { > OSI_MUTEX mutex; > OSI_UINT32 count; > OSI_UINT32 max; > OSI_UINT32 last; > OSI_UINT32 first; > OSI_SEMAPHORE sem; > void **table; > OSI_SEMAPHORE *sems; > OSI_BOOL *wait; > > } OSI_SIGQUEUE; ># 591 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef struct > { > pthread_mutex_t lock; > pthread_cond_t read; > pthread_cond_t write; > OSI_UINT32 readers; > OSI_UINT32 writers; > OSI_UINT32 read_waiters; > OSI_UINT32 write_waiters; > } OSI_LOCKS; ># 617 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef pthread_t OSI_THREAD; ># 628 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_INT8 OSI_MODE; ># 645 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" > typedef OSI_INT8 OSI_STATUS; ># 686 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositypes.h" >typedef OSI_INT16 osiDatabase; >typedef OSI_INT16 osiObject; >typedef OSI_INT16 osiField; >typedef OSI_UINT16 osiRecord; >typedef OSI_UINT16 osiIndex; >typedef OSI_INT16 osiInstance; > >typedef OSI_UINT8 C_TINYINT; >typedef OSI_BYTE C_BYTE; >typedef OSI_BOOL C_BOOL; >typedef OSI_CHAR C_CHAR; >typedef OSI_FLOAT C_REAL; >typedef OSI_INT16 C_SHORT; >typedef OSI_UINT16 C_USHORT; >typedef OSI_INT32 C_INT; >typedef OSI_INT32 C_LONG; >typedef OSI_UINT32 C_ULONG; >typedef OSI_RETCODE C_RETCODE; >typedef OSI_UINT32 C_UINT; >typedef OSI_FLOAT C_FLOAT; > > > >typedef OSI_INT32 long_t; > > > > >struct dbms_dofri_rec >{ > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; > OSI_INDEX I; > OSI_RECORD R; >}; > > >typedef struct >{ > OSI_DATABASE db; > OSI_OBJECT obj; > OSI_FIELD field; > OSI_INDEX idx; >} dofi; ># 17 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osiretcodes.h" 2 ># 30 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 1 > > > > > ># 1 "/usr/include/errno.h" 1 3 4 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 ># 1 "/usr/include/sys/timeb.h" 1 3 4 ># 27 "/usr/include/sys/timeb.h" 3 4 >extern "C" { > > > >struct timeb > { > time_t time; > unsigned short int millitm; > short int timezone; > short int dstflag; > }; > > > >extern int ftime (struct timeb *__timebuf); > >} ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 ># 199 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/endn.h" 1 ># 69 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/endn.h" >typedef unsigned char osi_u_int8_t; >typedef unsigned short osi_u_int16_t; >typedef unsigned int osi_u_int32_t; ># 93 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/endn.h" >typedef struct { unsigned char c[8]; } osi_int64_t; ># 200 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 > > > ># 1 "/usr/include/arpa/inet.h" 1 3 4 ># 30 "/usr/include/arpa/inet.h" 3 4 >extern "C" { > > > >extern in_addr_t inet_addr (const char *__cp) throw (); > > >extern in_addr_t inet_lnaof (struct in_addr __in) throw (); > > > >extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) > throw (); > > >extern in_addr_t inet_netof (struct in_addr __in) throw (); > > > >extern in_addr_t inet_network (const char *__cp) throw (); > > > >extern char *inet_ntoa (struct in_addr __in) throw (); > > > > >extern int inet_pton (int __af, const char *__restrict __cp, > void *__restrict __buf) throw (); > > > > >extern const char *inet_ntop (int __af, const void *__restrict __cp, > char *__restrict __buf, socklen_t __len) > throw (); > > > > > > >extern int inet_aton (const char *__cp, struct in_addr *__inp) throw (); > > > >extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) throw (); > > > > >extern char *inet_net_ntop (int __af, const void *__cp, int __bits, > char *__buf, size_t __len) throw (); > > > > >extern int inet_net_pton (int __af, const char *__cp, > void *__buf, size_t __len) throw (); > > > > >extern unsigned int inet_nsap_addr (const char *__cp, > unsigned char *__buf, int __len) throw (); > > > >extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp, > char *__buf) throw (); > > >} ># 204 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 > > > > > > > typedef ushort ushort_t; ># 227 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" ># 1 "/usr/include/sys/ipc.h" 1 3 4 ># 28 "/usr/include/sys/ipc.h" 3 4 ># 1 "/usr/include/bits/ipctypes.h" 1 3 4 ># 28 "/usr/include/bits/ipctypes.h" 3 4 >typedef int __ipc_pid_t; ># 29 "/usr/include/sys/ipc.h" 2 3 4 ># 1 "/usr/include/bits/ipc.h" 1 3 4 ># 42 "/usr/include/bits/ipc.h" 3 4 >struct ipc_perm > { > __key_t __key; > __uid_t uid; > __gid_t gid; > __uid_t cuid; > __gid_t cgid; > unsigned short int mode; > unsigned short int __pad1; > unsigned short int __seq; > unsigned short int __pad2; > __syscall_ulong_t __unused1; > __syscall_ulong_t __unused2; > }; ># 30 "/usr/include/sys/ipc.h" 2 3 4 ># 51 "/usr/include/sys/ipc.h" 3 4 >extern "C" { > > >extern key_t ftok (const char *__pathname, int __proj_id) throw (); > >} ># 228 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 > typedef key_t C_KEY_T; > typedef pid_t C_PID_T; ># 238 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 1 3 4 ># 34 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 1 3 4 ># 168 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 3 4 ># 1 "/usr/include/limits.h" 1 3 4 ># 144 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/posix1_lim.h" 1 3 4 ># 160 "/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 ># 161 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 145 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/posix2_lim.h" 1 3 4 ># 149 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/xopen_lim.h" 1 3 4 ># 33 "/usr/include/bits/xopen_lim.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 34 "/usr/include/bits/xopen_lim.h" 2 3 4 ># 153 "/usr/include/limits.h" 2 3 4 ># 169 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 2 3 4 ># 8 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/syslimits.h" 2 3 4 ># 35 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 2 3 4 ># 239 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" 2 ># 330 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/port.h" > typedef struct stat osi_stat_struct; > typedef struct timeb osi_timeb_struct; > > > > > typedef struct statfs osi_statfs_struct; ># 32 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osi_time.h" 1 ># 26 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osi_time.h" >typedef struct >{ > OSI_INT32 tv_sec; > OSI_INT32 tv_usec; >} >OSI_TIME_STR; > >typedef struct >{ > OSI_INT64 tv_sec; > OSI_INT64 tv_usec; >} >OSI_TIME_STR64; > > > >typedef struct osi_time_rec >{ > OSI_INT32 year; > OSI_INT32 month; > OSI_INT32 day_of_month; > OSI_INT32 day_of_week; > OSI_INT32 days; > OSI_INT32 hours; > OSI_INT32 minutes; > OSI_INT32 seconds; > OSI_INT32 millisec; > OSI_INT32 CalendarTime; > OSI_BOOL IsDaylightSavings; > OSI_BOOL IsLeapYear; >} >OSI_TIME_EXT_STR, MSTIME_STR; > >typedef struct osi_time_rec64 >{ > OSI_INT64 CalendarTime; > OSI_INT32 year; > OSI_INT32 month; > OSI_INT32 day_of_month; > OSI_INT32 day_of_week; > OSI_INT32 days; > OSI_INT32 hours; > OSI_INT32 minutes; > OSI_INT32 seconds; > OSI_INT32 millisec; > OSI_BOOL IsDaylightSavings; > OSI_BOOL IsLeapYear; >} >OSI_TIME_EXT_STR64, MSTIME_STR64; > > >extern "C" { > > > >extern OSI_INT32 osi_mktime( OSI_TIME_EXT_STR* ext_time_str ); >extern OSI_TIME_EXT_STR* osi_gmtime( const time_t * timet ); >extern OSI_TIME_EXT_STR* osi_gmtime_r( const time_t * timet, OSI_TIME_EXT_STR *ret ); >extern OSI_TIME_EXT_STR* osi_localtime( const time_t * timet ); >extern OSI_TIME_EXT_STR* osi_localtime_r( const time_t * timet, OSI_TIME_EXT_STR *ret ); >extern OSI_STRING osi_asctime( OSI_TIME_EXT_STR* ext_time_str ); >extern OSI_STRING osi_asctime_r( OSI_STRING buffer, size_t sizeInBytes, OSI_TIME_EXT_STR* ext_time_str ); > >extern OSI_INT64 osi_mktime64( OSI_TIME_EXT_STR64* ext_time_str ); >extern OSI_TIME_EXT_STR64* osi_gmtime64( const time_t * timet ); >extern OSI_TIME_EXT_STR64* osi_gmtime64_r( const time_t * timet, OSI_TIME_EXT_STR64 * ret_val ); >extern OSI_TIME_EXT_STR64* osi_localtime64( const time_t * timet ); >extern OSI_TIME_EXT_STR64* osi_localtime64_r( const time_t * timet, OSI_TIME_EXT_STR64 * ret_val ); >extern OSI_STRING osi_asctime64( const OSI_TIME_EXT_STR64* ext_time_str ); >extern OSI_STRING osi_asctime64_r( OSI_STRING buffer, size_t sizeInBytes, const OSI_TIME_EXT_STR64* ext_time_str ); > > > >OSI_UINT8 osi_time_hours_in_day_from_tmstr(const OSI_TIME_EXT_STR * day_in); >OSI_UINT8 osi_time_hours_in_day_from_timet(const time_t day_in); >OSI_UINT8 osi_time_hours_in_today(); >OSI_UINT8 osi_time_hours_in_tomorrow(); > >OSI_UINT8 osi_time_hours_in_day_from_tmstr64(const OSI_TIME_EXT_STR64 * day_in); >OSI_UINT8 osi_time_hours_in_day_from_timet64(const time_t day_in); >OSI_UINT8 osi_time_hours_in_today64(); >OSI_UINT8 osi_time_hours_in_tomorrow64(); > > > > > > >OSI_RETCODE osi_time_add_days_tmstr(const OSI_TIME_EXT_STR * day_in, OSI_TIME_EXT_STR * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_sub_days_tmstr(const OSI_TIME_EXT_STR * day_in, OSI_TIME_EXT_STR * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_add_days_timet(const time_t * day_in, time_t * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_sub_days_timet(const time_t * day_in, time_t * day_out, OSI_UINT16 days); > >OSI_RETCODE osi_time_add_days_tmstr64(const OSI_TIME_EXT_STR64 * day_in, OSI_TIME_EXT_STR64 * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_sub_days_tmstr64(const OSI_TIME_EXT_STR64 * day_in, OSI_TIME_EXT_STR64 * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_add_days_timet64(const time_t * day_in, time_t * day_out, OSI_UINT16 days); >OSI_RETCODE osi_time_sub_days_timet64(const time_t * day_in, time_t * day_out, OSI_UINT16 days); > > > >OSI_RETCODE osi_time_timet_to_repeated( time_t ts, OSI_TIME_EXT_STR *tm_in, OSI_BOOL *repeated); >OSI_RETCODE osi_time_tmstr_to_timet(OSI_TIME_EXT_STR *tm_in, OSI_BOOL repeated, time_t * ts); >OSI_RETCODE osi_time_gm_tmstr_to_timet(OSI_TIME_EXT_STR *tm_in, time_t * ts); > >OSI_RETCODE osi_time_timet_to_repeated64( time_t ts, OSI_TIME_EXT_STR64 *tm_in, OSI_BOOL *repeated); >OSI_RETCODE osi_time_tmstr_to_timet64(OSI_TIME_EXT_STR64 *tm_in, OSI_BOOL repeated, time_t * ts); >OSI_RETCODE osi_time_gm_tmstr_to_timet64(OSI_TIME_EXT_STR64 *tm_in, time_t * ts); > > > >OSI_BOOL osi_time_is_repeated_hour(time_t ts); > >OSI_BOOL osi_time_is_repeated_hour64(time_t ts); > > > >OSI_INT32 osi_time_current_UTC_offset_sec(); >OSI_INT32 osi_time_current_UTC_offset(); >OSI_INT32 osi_time_standard_UTC_offset(); >OSI_INT32 osi_time_standard_UTC_offset_sec(); > >OSI_INT64 osi_time_current_UTC_offset_sec64(); >OSI_INT64 osi_time_current_UTC_offset64(); >OSI_INT64 osi_time_standard_UTC_offset64(); >OSI_INT64 osi_time_standard_UTC_offset_sec64(); > > > >OSI_BOOL osi_time_is_leap_year(OSI_INT16 year); >OSI_INT8 osi_time_standard_days_in_month(OSI_INT16 month); >OSI_INT8 osi_time_days_in_month(OSI_INT16 month, OSI_INT16 year); >OSI_INT32 osi_time_days_in_year( OSI_INT16 year); >OSI_INT32 osi_time_tmstr_sub(OSI_TIME_EXT_STR a, OSI_TIME_EXT_STR b); >OSI_INT32 osi_time_dst_shift(); > >OSI_INT64 osi_time_tmstr_sub64(OSI_TIME_EXT_STR64 a, OSI_TIME_EXT_STR64 b); >OSI_INT64 osi_time_dst_shift64(); > > > > } ># 33 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osi_tcpip.h" 1 ># 19 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osi_tcpip.h" >OSI_RETCODE osi_raw_ping( OSI_STRING host, OSI_UINT32 timeoutsec ); > > >OSI_CHAR * get_tcpip_error( int errorcode ); ># 34 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/baseversion.h" 1 ># 20 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/baseversion.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit.h" 1 ># 17 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit_headers.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit_python.h" 1 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit_headers.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit_secure_sockets.h" 1 ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit_headers.h" 2 ># 18 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/ositoolkit.h" 2 ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/baseversion.h" 2 ># 35 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/erc.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 1 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/erc.h" 2 ># 143 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/erc.h" >extern void *osi_erc_open( OSI_STRING file_name, OSI_RETCODE *ret ); > extern OSI_RETCODE osi_erc_get_option( void *handle, OSI_STRING category, OSI_STRING option, OSI_STRING value ); >extern OSI_RETCODE osi_erc_get_option_n( void *handle, OSI_STRING category, OSI_STRING option, OSI_STRING value, OSI_UINT32 valueSz ); >extern OSI_RETCODE osi_erc_close( void *handle ); ># 36 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" 1 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 1 ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" 2 ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >typedef void* OSI_HASHTABLE_HANDLE; > >typedef void* OSI_HASHTABLE_ITER_HANDLE; > > >typedef struct osi_table_entry >{ > > void * key; > > void * data; > >} OSI_HASHTABLE_ENTRY; ># 48 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >typedef int ( *NODE_COMP_FUNC )( const void *entry1, const void *entry2 ); > > > > > > > >typedef OSI_UINT32 ( *NODE_HASH_FUNC )( const void *key, void *userdata ); ># 65 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >typedef void ( *NODE_HASH_FREE_FUNC )( void *user, void *key, void *data ); ># 78 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern int osi_hash_compare_u32( const void *v1, const void *v2 ); ># 89 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern int osi_hash_compare_u64( const void *v1, const void *v2 ); > > > > > > > >extern OSI_UINT32 osi_hash_count( OSI_HASHTABLE_HANDLE h ); > > > > > >extern void osi_hash_destroy( OSI_HASHTABLE_HANDLE h ); ># 112 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_UINT32 osi_hash_hash_u32( const void *key, void *userdata ); ># 121 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_UINT32 osi_hash_hash_u64( const void *key, void *userdata ); ># 155 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_HASHTABLE_ITER_HANDLE osi_hash_iter( OSI_HASHTABLE_HANDLE h ); ># 167 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_RETCODE osi_hash_iter_next( OSI_HASHTABLE_ITER_HANDLE h, OSI_HASHTABLE_ENTRY *info ); > > > > > >extern void osi_hash_iter_destroy( OSI_HASHTABLE_ITER_HANDLE h ); ># 184 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_RETCODE osi_hash_lookup( OSI_HASHTABLE_HANDLE h, const void *key, void **data ); ># 196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_RETCODE osi_hash_remove( OSI_HASHTABLE_HANDLE h, void **key, void **data ); ># 205 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_UINT32 osi_hash_string( const void *kptr, void *unused ); ># 220 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" > extern OSI_RETCODE osi_hash_resize( OSI_HASHTABLE_HANDLE *h, OSI_INT32 new_buckets ); ># 239 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" > extern OSI_HASHTABLE_HANDLE osi_hash_init( OSI_UINT32 buckets, NODE_HASH_FUNC h, NODE_COMP_FUNC match, NODE_HASH_FREE_FUNC destroy, void *h_user, void *d_user ); ># 259 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" > extern OSI_RETCODE osi_hash_insert( OSI_HASHTABLE_HANDLE h, const void *key, const void *data ); ># 278 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/hash.h" >extern OSI_RETCODE osi_hash_resize_storage( OSI_HASHTABLE_HANDLE h, OSI_UINT32 buckets ); ># 37 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" 2 ># 89 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >typedef void* OSICRYPT_HANDLE; > > > >typedef void * OSI_KVPLIST_HANDLE; ># 449 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >typedef struct hostent OSI_HOSTENT; > > > >typedef struct >{ > OSI_SOCKET sockNo; > OSI_INT32 numConn; > OSI_CHAR sockSvc[ 10 + 2 ]; > OSI_CHAR hostName[ 256 + 2 ]; > OSI_BYTE spare[2]; > time_t lastTime; > void (*closeCallback)( OSI_SOCKET ); >} >ConnInfo; > > > > > > >typedef struct >{ > OSI_CHAR key[ 64 ]; > OSI_CHAR value[ 512 ]; > OSI_UINT32 flags; >} >ParmEntry; > > >typedef struct >{ > OSI_UINT32 size; > OSI_UINT32 maxSize; > OSI_INT32 found; > ParmEntry* list; > OSI_UINT32 getNextIndex; > OSICRYPT_HANDLE hCryptErc; >} >ParmList; > > > > > >typedef struct >{ > OSI_INT32 state; > OSI_INT32 sequence; > OSI_INT32 exit_code; > OSI_THREAD id; > void (* function )( void* ); > void* arguments; > > > >} >THREAD_INFO_STR; > > > >struct partime >{ > > > > > > > > struct tm tm; > > > > > > int ymodulus; > > > > > > > > int yweek; > > > > > long zone; >}; > > > > > > >typedef struct >{ > void *ptr; > size_t size; > >} OSI_MEM_STR; > > >typedef struct OSI_LIST_ELEM_STR_ >{ > void *data; > struct OSI_LIST_ELEM_STR_ *prev; > struct OSI_LIST_ELEM_STR_ *next; > >} OSI_LIST_ELEM_STR; > > >typedef struct >{ > int count; > void (*destroy)(void *data); > OSI_LIST_ELEM_STR *head; > OSI_LIST_ELEM_STR *tail; > >} OSI_LIST_STR; ># 582 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >typedef struct >{ > OSI_CHAR opaque[ 384 ]; > >} OSI_READDIR_STR; > > > > > > >typedef void * OSI_SHLIB_HANDLE; > > >typedef void * OSI_SHLIB_FUNC; ># 621 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >struct option >{ > OSI_STRING name; > OSI_INT32 has_arg; > OSI_INT32* flag; > OSI_INT32 val; >}; > > > >typedef struct >{ > OSI_CHAR custID[ 256 ]; > OSI_BYTE e[ 256 ][ 6 ]; > OSI_BYTE version; > OSI_BYTE cards; > OSI_UINT32 expydate; > OSI_UINT16 users; > OSI_CHAR spare[ 2 ]; >} >ethertype; > > > > >typedef struct _osi_tr_str * OSI_TR_HANDLE; > > >typedef struct _osi_tr_str >{ > > void *h; ># 663 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" > OSI_STRING (*snprintf)( OSI_TR_HANDLE h, OSI_STRING buffer, size_t sz, OSI_STRING fmt_id, OSI_STRING format, ... ); ># 674 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" > OSI_STRING (*vsnprintf)( OSI_TR_HANDLE h, OSI_STRING buffer, size_t sz, OSI_STRING fmt_id, OSI_STRING format, va_list args ); ># 684 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" > union { > void (*destroy)( OSI_TR_HANDLE h ); > void (*destory)( OSI_TR_HANDLE h ); > }; > > > > >} OSI_TR_STR; > >typedef struct _osi_tr_init_str >{ > > OSI_STRING language; > > OSI_UINT32 buckets; > > OSI_UINT32 token_length; > > OSI_UINT32 param_count; > > OSI_BOOL disable_logging; > >} OSI_TR_INIT_STR; ># 729 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >typedef struct osi_email_str >{ > OSI_UINT32 port; > OSI_BOOL use_mime; > OSI_BOOL debug; > > OSI_CHAR server[ 256 ]; > > OSI_CHAR from[ ( 999 + 2 ) ]; > OSI_CHAR to[ ( 999 + 2 ) ]; > OSI_CHAR subject[ ( 999 + 2 ) ]; > > OSI_CHAR mime_version[ 8 ]; > OSI_CHAR encoding[ 100 ]; > OSI_CHAR content_type[ 100 ]; > > const OSI_CHAR *data; > > > > const OSI_CHAR *message; >} OSI_EMAIL_STR; > > > > > > > extern "C" { > > >extern OSI_CHAR syslog_hostname[]; >extern OSI_CHAR syslog_program[]; >extern OSI_CHAR syslib_error[]; > > >extern OSI_TR_HANDLE tr_base; >extern OSI_BOOL static_linkage; ># 776 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern OSI_CHAR* optarg; ># 792 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern OSI_INT32 optind; > > > > > >extern OSI_INT32 opterr; > > > > >extern OSI_INT32 optopt; > > >extern OSI_CHAR NetAddr[]; > > >extern OSI_CHAR NetIsChild; > > > > > > >extern OSI_BOOL ParmFullMatch; > > > > >extern OSI_RETCODE __osi_library_loader( OSI_RETCODE * ec ); >extern OSI_STRING __osi_library_loader_get_error( OSI_RETCODE errorCode ); > >extern OSI_INT64 osi_ato64( const OSI_CHAR *str ); >extern OSI_INT32 osi_background( const OSI_CHAR *program ); >extern OSI_UINT32 osi_xtoi( const OSI_STRING str ); > >extern time_t osi_cal_add_day( time_t time1, OSI_INT32 add ); >extern time_t osi_cal_add_month( time_t time1, OSI_INT32 add ); >extern OSI_INT32 osi_cal_compare_day( time_t time1, time_t time2 ); >extern OSI_INT32 osi_cal_compare_hour( time_t time1, time_t time2 ); >extern OSI_INT32 osi_cal_compare_month( time_t time1, time_t time2 ); >extern OSI_INT32 osi_cal_days_in_month( OSI_INT32 year, OSI_INT32 month ); >extern OSI_BOOL osi_cal_has_date_past( const OSI_CHAR *buffer ); >extern time_t osi_cal_parse_date_str( const OSI_CHAR *buffer ); >extern time_t osi_cal_top_of_day( time_t time1, OSI_INT32 add ); >extern time_t osi_cal_top_of_hour( time_t time1, OSI_INT32 add ); >extern time_t osi_cal_top_of_month( time_t time1, OSI_INT32 add ); > >extern OSI_INT32 osi_checkport( const OSI_CHAR *s, OSI_INT32 port, OSI_INT32 timeoutsec ); >extern void osi_closedir( void ); >extern void osi_closedir_ext( OSI_READDIR_STR *opaque ); > >extern OSI_RETCODE osi_console_set_log( OSI_BOOL val ); >extern OSI_RETCODE osi_console_get_line( OSI_STRING prompt, OSI_STRING buffer, OSI_INT32 size, OSI_UINT32 mode ); >extern OSI_BOOL osi_console_get_mode( void ); >extern OSI_UINT32 osi_console_printf( const OSI_STRING format, ... ); >extern OSI_RETCODE osi_console_set_mode( OSI_BOOL mode ); >extern OSI_UINT32 osi_console_vprintf( const OSI_STRING format, va_list marker ); > >extern OSI_CHAR osi_copyfile( const OSI_CHAR *from, const OSI_CHAR *to, OSI_CHAR background ); >extern OSI_RETCODE osi_crc_file( const OSI_CHAR *filename, OSI_UINT32 *val ); >extern OSI_RETCODE osi_create_path( const OSI_STRING path ); >extern OSI_RETCODE osi_delete_path( const OSI_CHAR *path ); >extern OSI_RETCODE osi_delete_file( OSI_STRING fileName ); >extern OSI_RETCODE osi_remove_file( const OSI_STRING filename, OSI_UINT32 attempts, OSI_UINT32 delay ); >extern OSI_RETCODE osi_remove_file_ext( const OSI_STRING filename, OSI_UINT32 attempts, OSI_UINT32 delay ); >extern OSI_RETCODE osi_rename_file( const OSI_STRING filename, const OSI_STRING newFileName, OSI_UINT32 attempts, OSI_UINT32 delay ); >extern OSI_RETCODE osi_basename( const OSI_CHAR *pPathName, OSI_STRING output_buffer, size_t output_buffer_size ); >extern OSI_RETCODE osi_dirname( const OSI_CHAR *pPathName, OSI_STRING output_buffer, size_t output_buffer_size ); >extern OSI_UINT64 osi_double_to_u64( OSI_DOUBLE value ); >extern OSI_RETCODE osi_email( const char *server, OSI_UINT16 port, const char *from, const char *to, const char *subject, const char *message ); >extern OSI_RETCODE osi_email_ext( const OSI_EMAIL_STR *msg ); >extern void osi_putenv_ext( const OSI_CHAR *variable ); >extern OSI_STRING osi_getenv( const OSI_CHAR *variable ); >extern void osi_unsetenv( const OSI_CHAR *variable ); > extern OSI_STRING osi_envsub( OSI_STRING string ); > extern OSI_STRING osi_envsub_ext( OSI_STRING string ); >extern OSI_INT32 osi_findPipe( OSI_INT32 isFirstPipe ); >extern void osi_fix_path_separator( OSI_STRING s ); >extern OSI_BYTE osi_float_check(OSI_FLOAT fval); >extern OSI_BYTE osi_double_check(OSI_DOUBLE dval); >extern OSI_STRING osi_format_version_string( OSI_STRING program, OSI_STRING version, OSI_STRING date, OSI_STRING other, OSI_STRING buf ); >extern void osi_freeparm( ParmList* parameter_list ); >extern OSI_RETCODE osi_free_memory( OSI_MEM_STR *mem ); >extern int osi_getEchoPort( void ); >extern OSI_STRING osi_gethostname( OSI_STRING host_name, OSI_UINT32 size ); >extern OSI_STRING osi_getfullhostname( OSI_STRING host_name, OSI_UINT32 size ); >extern OSI_RETCODE osi_gethostbyname(const char *hostname, OSI_HOSTENT *result, char **buf); >extern OSI_STRING osi_getparm( ParmList* parameter_list, OSI_STRING search_key, OSI_STRING default_value ); >extern ParmEntry* osi_getnextparm( ParmList* parameter_list, OSI_BOOL is_start ); >extern OSI_STRING osi_getparm_ext_r( ParmList* parameter_list, OSI_STRING search_key, OSI_STRING default_value, OSI_STRING result, size_t size, OSI_BOOL* encrypted ); > extern OSI_STRING osi_getparm_ext( ParmList* parameter_list, OSI_STRING search_key, OSI_STRING default_value, OSI_BOOL* encrypted ); >extern OSI_BOOL osi_getparm_bool( ParmList* parameter_list, OSI_STRING search_key, OSI_BOOL default_value ); >extern OSI_INT32 osi_getparm_int32( ParmList* parameter_list, OSI_STRING search_key, OSI_INT32 default_value ); >extern OSI_INT16 osi_getparm_int16( ParmList* parameter_list, OSI_STRING search_key, OSI_INT16 default_value ); >extern OSI_INT8 osi_getparm_int8( ParmList* parameter_list, OSI_STRING search_key, OSI_INT8 default_value ); >extern OSI_DOUBLE osi_getparm_double( ParmList* parameter_list, OSI_STRING search_key, OSI_DOUBLE default_value ); >extern OSI_FLOAT osi_getparm_float( ParmList* parameter_list, OSI_STRING search_key, OSI_FLOAT default_value ); >extern OSI_BYTE osi_getparm_byte( ParmList* parameter_list, OSI_STRING search_key, OSI_BYTE default_value ); >extern OSI_INT64 osi_getparm_long( ParmList* parameter_list, OSI_STRING search_key, OSI_INT64 default_value ); > > >extern OSI_INT32 osi_getparm_int32_index( ParmList* parameter_list, OSI_STRING search_key, OSI_INT32 default_value, OSI_INT32 idx ); >extern OSI_INT16 osi_getparm_int16_index( ParmList* parameter_list, OSI_STRING search_key, OSI_INT16 default_value, OSI_INT32 idx ); >extern OSI_INT8 osi_getparm_int8_index( ParmList* parameter_list, OSI_STRING search_key, OSI_INT8 default_value, OSI_INT32 idx ); >extern OSI_DOUBLE osi_getparm_double_index( ParmList* parameter_list, OSI_STRING search_key, OSI_DOUBLE default_value, OSI_INT32 idx ); >extern OSI_FLOAT osi_getparm_float_index( ParmList* parameter_list, OSI_STRING search_key, OSI_FLOAT default_value, OSI_INT32 idx ); >extern OSI_BYTE osi_getparm_byte_index( ParmList* parameter_list, OSI_STRING search_key, OSI_BYTE default_value, OSI_INT32 idx ); >extern OSI_INT64 osi_getparm_long_index( ParmList* parameter_list, OSI_STRING search_key, OSI_INT64 default_value, OSI_INT32 idx ); >extern OSI_STRING osi_getparm_string_index( ParmList* parameter_list, OSI_STRING search_key, OSI_STRING default_value, OSI_INT32 idx ); > >extern int osi_get_error_code( void ); >extern OSI_STRING osi_get_error_text( int error_code, OSI_STRING error_text, size_t size ); > > >extern int osi_getraidmode( char *path ); >extern OSI_RETCODE osi_get_cpu_utilization( OSI_UINT8* cpu_percent ); >extern OSI_STRING osi_get_error_string( int err, OSI_INT32 unused, size_t size, OSI_STRING buf ); >extern OSI_RETCODE osi_get_memory( OSI_MEM_STR *mem, size_t size ); >extern OSI_RETCODE osi_get_memory_utilization( OSI_UINT8* mem_percent, OSI_UINT8* vmem_percent ); >extern OSI_RETCODE osi_get_os_user( OSI_STRING user, OSI_UINT32 usize, OSI_STRING domain, OSI_UINT32 dsize ); >extern OSI_RETCODE osi_get_partition_free_space( OSI_STRING partition, OSI_UINT32* free_space ); > extern OSI_RETCODE osi_get_temp_dir( OSI_STRING dirname ); >extern OSI_RETCODE osi_get_temp_dir_s( OSI_STRING dirname, size_t d_sz ); >extern int osi_hexprint( char *obuf, size_t obufl, const unsigned char *ibuf, size_t count, int chunksize ); >extern OSI_UINT32 osi_host2ip( const OSI_CHAR *host ); >extern OSI_STRING osi_ip2host( OSI_UINT32 ip ); >extern OSI_STRING osi_ip2host_ext( OSI_UINT32 ip ); >extern OSI_STRING osi_ip2string( OSI_UINT32 ip ); >extern OSI_BOOL osi_is_float_valid(OSI_FLOAT fval); >extern OSI_BOOL osi_is_double_valid(OSI_DOUBLE fval); >extern OSI_INT32 osi_is_running( OSI_STRING program ); >extern OSI_INT32 osi_is_running_ext( OSI_STRING program ); > >extern OSI_KVPLIST_HANDLE osi_kvplist_init( void ); >extern OSI_INT32 osi_kvplist_add( OSI_KVPLIST_HANDLE hKvpList, const OSI_CHAR *pKey, const OSI_CHAR *pValue ); >extern OSI_INT32 osi_kvplist_count( OSI_KVPLIST_HANDLE hKvpList ); >extern void osi_kvplist_destroy( OSI_KVPLIST_HANDLE hKvpList ); >extern OSI_RETCODE osi_kvplist_get_kvp( OSI_KVPLIST_HANDLE hKvpList, OSI_INT32 index, OSI_STRING key, size_t keySize, OSI_STRING value, size_t valueSize ); >extern OSI_STRING osi_kvplist_string_replace( OSI_KVPLIST_HANDLE hKvpList, OSI_STRING outbuf, size_t outbufSize, OSI_BOOL caseSensitive, const OSI_CHAR *pFormat ); > >extern OSI_RETCODE osi_list_destroy( OSI_LIST_STR *list ); >extern OSI_RETCODE osi_list_init( OSI_LIST_STR *list, void (*destroy)(void *data) ); >extern OSI_RETCODE osi_list_ins_next( OSI_LIST_STR *list, OSI_LIST_ELEM_STR *element, void *data ); >extern OSI_RETCODE osi_list_ins_prev( OSI_LIST_STR *list, OSI_LIST_ELEM_STR *element, void *data ); >extern OSI_RETCODE osi_list_remove( OSI_LIST_STR *list, OSI_LIST_ELEM_STR *element, void **data ); >extern OSI_UINT32 osi_loadparm( ParmList* parameter_list, OSI_STRING resource_file, OSI_STRING search_path, OSI_UINT32 max_parameters, OSI_STRING valid_separators ); >extern OSI_UINT32 osi_loadparm_legacy( ParmList *parameter_list, const OSI_CHAR *resource_file, const OSI_CHAR *search_path, OSI_UINT32 max_parameters, const OSI_CHAR *valid_separators ); >extern OSI_RETCODE osi_locks_destroy( OSI_LOCKS *locks ); >extern OSI_RETCODE osi_locks_get_info( OSI_LOCKS* locks, OSI_INT32 *count, OSI_BOOL *write ); >extern OSI_RETCODE osi_locks_init( OSI_LOCKS *locks ); >extern OSI_RETCODE osi_locks_release( OSI_LOCKS* locks ); >extern OSI_RETCODE osi_locks_wait( OSI_LOCKS *locks, OSI_BOOL write ); > > >extern OSI_RETCODE osi_lpv_get_user( const OSI_CHAR * product, const OSI_CHAR * tag, OSI_CHAR * user, const size_t user_sz ); >extern OSI_RETCODE osi_lpv_get_password( const OSI_CHAR * product, const OSI_CHAR * tag, OSI_CHAR * pass, const size_t pass_sz ); >extern OSI_RETCODE osi_lpv_get_credentials( const OSI_CHAR * product, const OSI_CHAR * tag, OSI_CHAR * user, const size_t user_sz, OSI_CHAR * pass, const size_t pass_sz ); > >extern OSI_RETCODE osi_mutex_destroy( OSI_MUTEX* mutex ); >extern OSI_RETCODE osi_mutex_init( OSI_MUTEX* mutex ); >extern OSI_RETCODE osi_mutex_notify( OSI_MUTEX* mutex ); >extern OSI_RETCODE osi_mutex_trylock( OSI_MUTEX* mutex ); >extern OSI_RETCODE osi_mutex_wait( OSI_MUTEX* mutex ); > >extern char osi_rcopy( char *FromNode, char *FromFile, char *ToNode, char *ToFile ); >extern OSI_STRING osi_readdir( OSI_STRING directory ); >extern OSI_STRING osi_readdir_ext( OSI_STRING directory, OSI_READDIR_STR *opaque ); >extern OSI_DOUBLE osi_round_double( OSI_DOUBLE dval ); >extern OSI_FLOAT osi_round_float( OSI_FLOAT fval ); > > >extern OSI_RETCODE osi_semaphore_destroy( OSI_SEMAPHORE* semaphore ); >extern OSI_RETCODE osi_semaphore_init( OSI_SEMAPHORE* semaphore, OSI_UINT32 initial, OSI_UINT32 max ); ># 975 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern OSI_RETCODE osi_semaphore_signal( OSI_SEMAPHORE* semaphore ); >extern OSI_RETCODE osi_semaphore_wait( OSI_SEMAPHORE* semaphore ); > >extern OSI_RETCODE osi_semclose( OSI_INT32 id ); >extern OSI_INT32 osi_semcreate( C_KEY_T key, OSI_INT32 initval ); >extern OSI_RETCODE osi_semop( OSI_INT32 id, OSI_INT32 value ); >extern OSI_RETCODE osi_semop_ext( OSI_INT32 id, OSI_INT32 value, OSI_INT32 timeout ); >extern OSI_INT32 osi_semopen( C_KEY_T key ); >extern OSI_RETCODE osi_semsignal( OSI_INT32 id ); >extern OSI_RETCODE osi_semsignal_ext( OSI_INT32 id, OSI_INT32 timeout ); >extern OSI_RETCODE osi_semwait( OSI_INT32 id ); >extern OSI_RETCODE osi_semwait_ext( OSI_INT32 id, OSI_INT32 timeout ); >extern OSI_RETCODE osi_semrm( OSI_INT32 id ); >extern OSI_RETCODE osi_semrmkey( C_KEY_T key ); > >extern OSI_RETCODE osi_shlib_close( OSI_SHLIB_HANDLE h ); >extern OSI_SHLIB_FUNC osi_shlib_get_function( OSI_SHLIB_HANDLE h, const OSI_STRING function_name ); >extern OSI_SHLIB_HANDLE osi_shlib_open( const OSI_STRING shlib_name ); >extern OSI_RETCODE osi_sigqueue_finish( OSI_SIGQUEUE *sigqueue, OSI_UINT32 finish ); >extern OSI_RETCODE osi_sigqueue_destroy( OSI_SIGQUEUE *sigqueue ); >extern OSI_RETCODE osi_sigqueue_get_info( OSI_SIGQUEUE *sigqueue, OSI_UINT32 *count, OSI_UINT32 *max ); >extern OSI_RETCODE osi_sigqueue_init( OSI_SIGQUEUE *sigqueue, OSI_UINT32 max ); >extern OSI_RETCODE osi_sigqueue_signal( OSI_SIGQUEUE *sigqueue, void *val, OSI_UINT32 flags ); >extern void *osi_sigqueue_wait( OSI_SIGQUEUE *sigqueue, OSI_UINT32 *finish ); >extern void osi_sleep( OSI_UINT32 msec ); > > >extern OSI_RETCODE osi_socket_accept( OSI_SOCKET socket_id, OSI_SOCKET* new_socket_id ); >extern OSI_RETCODE osi_socket_accept_ext( OSI_SOCKET socket_id, OSI_SOCKET* new_socket_id, OSI_UINT32* new_socket_ip ); >extern OSI_RETCODE osi_socket_accept_ipv4( OSI_SOCKET socket_id, OSI_SOCKET* new_socket_id, OSI_UINT32 *new_socket_ip ); >extern OSI_RETCODE osi_socket_accept_ipv6( OSI_SOCKET socket_id, OSI_SOCKET* new_socket_id, OSI_IPV6ADDR *new_socket_ip ); >extern OSI_RETCODE osi_socket_bind( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_bind_ipv4( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_bind_ipv6( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_check( OSI_SOCKET socket_id, OSI_UINT32 msec_timeout ); >extern OSI_RETCODE osi_socket_close( OSI_SOCKET socket_id ); >extern OSI_RETCODE osi_socket_connect( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_connect_ipv4( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_connect_ipv6( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port ); >extern OSI_RETCODE osi_socket_connect_timed( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port, OSI_INT32 msec ); >extern OSI_RETCODE osi_socket_connect_timed_ipv4( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port, OSI_INT32 msec ); >extern OSI_RETCODE osi_socket_connect_timed_ipv6( OSI_SOCKET* socket_id, const OSI_CHAR *host, OSI_PORT port, OSI_INT32 msec ); >extern OSI_RETCODE osi_socket_listen( OSI_SOCKET socket_id ); >extern OSI_RETCODE osi_socket_open( OSI_SOCKET* socket_id ); >extern OSI_RETCODE osi_socket_open_ext( OSI_SOCKET* socket_id, OSI_UINT32 socket_options ); >extern OSI_RETCODE osi_socket_open_ipv4( OSI_SOCKET* socket_id, OSI_UINT32 socket_options ); >extern OSI_RETCODE osi_socket_open_ipv6( OSI_SOCKET* socket_id, OSI_UINT32 socket_options ); >extern OSI_RETCODE osi_socket_peek( OSI_SOCKET socket_id, OSI_POINTER buffer, OSI_UINT32 buffer_length, OSI_UINT32* bytes_read, OSI_UINT32 msec_timeout ); >extern OSI_RETCODE osi_socket_read( OSI_SOCKET socket_id, OSI_POINTER buffer, OSI_UINT32 buffer_length, OSI_UINT32* bytes_read, OSI_UINT32 msec_timeout ); >extern OSI_RETCODE osi_socket_read_ext( OSI_SOCKET socket_id, OSI_POINTER buffer, OSI_UINT32 buffer_length, OSI_UINT32* bytes_read, OSI_UINT32 msec_timeout, OSI_BOOL partial ); >extern OSI_RETCODE osi_socket_write( OSI_SOCKET socket_id, OSI_POINTER xmitbuf, OSI_UINT32 xmitlen ); >extern OSI_RETCODE osi_socket_write_ext( OSI_SOCKET socket_id, OSI_POINTER xmitbuf, OSI_UINT32 xmitlen, OSI_UINT32* bytes_written, OSI_UINT32 msec_timeout ); >extern OSI_RETCODE osi_socket_writeto( OSI_SOCKET socket_id, OSI_POINTER msg, OSI_UINT32 len, const OSI_CHAR *host, OSI_PORT port, OSI_UINT32 *bytes_written ); >extern OSI_RETCODE osi_socket_open_udp( OSI_SOCKET* socket_id ); > > > > > >extern OSI_STRING osi_string_begin( const OSI_CHAR *string, const OSI_CHAR *substring ); >extern OSI_UINT32 osi_strnlen( const OSI_CHAR *source, OSI_UINT32 len ); >extern OSI_CHAR * osi_strnchr( const OSI_CHAR *source, OSI_CHAR c, OSI_UINT32 len ); >extern size_t osi_strncat( OSI_CHAR * dest, size_t destSize, const OSI_CHAR *str, size_t nFromStr); >extern size_t osi_string_cat( OSI_CHAR *dst, const OSI_CHAR *src, size_t dstSize ); >extern OSI_INT32 osi_string_compare( const OSI_CHAR *cs1, const OSI_CHAR *cs2 ); >extern OSI_INT32 osi_string_compare_ext( const OSI_CHAR *cs1, const OSI_CHAR *cs2, OSI_INT32 n ); >extern OSI_STRING osi_string_copy( OSI_STRING destination, const OSI_CHAR *source, OSI_UINT32 n_plus_one ); >extern OSI_STRING osi_string_end( const OSI_CHAR *string, const OSI_CHAR *substring ); >extern OSI_STRING osi_string_extract( OSI_STRING subs, const OSI_CHAR *orig, OSI_INT32 pos, OSI_INT32 n ); >extern OSI_STRING osi_string_list_build( OSI_STRING strbuf, OSI_INT32* pbufSize, OSI_INT32 nargs, ... ); >extern OSI_STRING osi_string_list_vbuild( OSI_STRING strbuf, OSI_INT32* pbufSize, OSI_INT32 nargs, va_list marker ); >extern OSI_RETCODE osi_string_list_split( OSI_STRING strbuf, OSI_INT32 bufLen, OSI_INT32 maxStrSize, OSI_INT32 nargs, ... ); >extern OSI_RETCODE osi_string_list_vsplit( OSI_STRING strbuf, OSI_INT32 bufLen, OSI_INT32 maxStrSize, OSI_INT32 nargs, va_list marker ); >extern OSI_STRING osi_string_lower( OSI_STRING string ); >extern OSI_STRING osi_string_strip( OSI_STRING string, const OSI_CHAR *set ); >extern OSI_STRING osi_string_strip_leading( const OSI_CHAR *string, const OSI_CHAR *set ); >extern OSI_STRING osi_string_strip_trailing( OSI_STRING string, const OSI_CHAR *set ); >extern OSI_STRING osi_string_token( OSI_STRING string, const OSI_CHAR *set, OSI_STRING* rest ); >extern OSI_STRING osi_string_token_all( OSI_STRING string, const OSI_CHAR *set, OSI_STRING* rest ); >extern OSI_STRING osi_string_upper( OSI_STRING string ); >extern size_t osi_string_cat_n(OSI_CHAR * dest, size_t destSize, const OSI_CHAR *str, size_t nFromStr); >extern OSI_UINT32 osi_string_catf(OSI_CHAR * dest, size_t destSize, const OSI_CHAR * fmt, ...); >extern OSI_UINT32 osi_string_vcatf(OSI_CHAR *dest, size_t destSize, const OSI_CHAR *fmt, va_list args); >extern OSI_STRING osi_string_copy_n(OSI_STRING dest, size_t destSize, const OSI_CHAR *src, size_t nFromSrc); >extern OSI_RETCODE osi_vsnprintf( char *buf, size_t buffSize, const char *fmt, va_list argptr ); >extern OSI_RETCODE osi_snprintf( char *buf, size_t buffSize, const char *fmt, ... ); >extern OSI_STRING osi_string_replace( OSI_STRING outbuf, size_t outbufSize, OSI_BOOL caseSensitive, const OSI_CHAR *pFormat, const OSI_CHAR *pKey, const OSI_CHAR *pValue ); > >extern OSI_RETCODE osi_syslog( OSI_INT32 report_file, OSI_STRING file, OSI_INT32 line, OSI_STRING format, ... ); >extern OSI_RETCODE osi_vsyslog( OSI_INT32 report_file, OSI_STRING file, OSI_INT32 line, OSI_STRING format, va_list marker ); > >extern OSI_RETCODE osi_syslog_ext( OSI_STRING log_file, OSI_STRING format, ... ); >extern OSI_RETCODE osi_vsyslog_ext( OSI_STRING log_file, OSI_STRING format, va_list marker ); > >extern OSI_RETCODE osi_syslog_init( OSI_STRING program ); > >extern OSI_RETCODE osi_system( OSI_STRING command ); >extern OSI_RETCODE osi_system_ext( OSI_STRING command, OSI_UINT32 timeout ); >extern OSI_RETCODE osi_system_waitaction( OSI_STRING command, OSI_UINT32 timeout, OSI_UINT32 freq_ms, void (* callback)( void * ), void * cb_args ); >extern OSI_RETCODE osi_system_windows( OSI_STRING command, OSI_UINT32 timeout, OSI_BYTE options ); >extern OSI_RETCODE osi_process_kill_by_pid( OSI_UINT32 pid ); >extern OSI_RETCODE osi_process_start_ext( const OSI_CHAR *command, OSI_UINT32 timeout, OSI_BYTE options, OSI_UINT32 *ppid, OSI_INT32 *exitcode ); >extern OSI_RETCODE osi_process_start_callback_env_ext( const char *command, OSI_UINT32 timeout, OSI_BYTE options, OSI_UINT32 *ppid, OSI_INT32 *exitcode, void (* callback)( void * ), void * cb_args, OSI_UINT32 numenv, const OSI_STRING envp[] ); > >extern OSI_STRING osi_tempnam( const OSI_CHAR *Directory, const OSI_CHAR *FileXPointer ); > >extern OSI_RETCODE osi_thread_assign_signal( OSI_BOOL accept_sig ); >extern void osi_thread_cleanup( void ); >extern OSI_INT32 osi_thread_create( void ( *thread_function )( void* ), void* arguments ); >extern OSI_INT32 osi_thread_get_exitcode( OSI_INT32 index ); >extern OSI_THREAD osi_thread_get_id( void ); >extern OSI_THREAD osi_thread_get_idbyindex( OSI_INT32 index ); >extern OSI_INT32 osi_thread_get_index( void ); >extern OSI_INT32 osi_thread_get_option( OSI_INT32 option ); >extern OSI_INT32 osi_thread_get_sequence( OSI_INT32 index ); >extern OSI_INT32 osi_thread_get_state( OSI_INT32 index ); >extern void osi_thread_exit( OSI_INT32 exit_code ); >extern OSI_RETCODE osi_thread_kill( OSI_INT32 index ); >extern OSI_RETCODE osi_thread_set_option( OSI_INT32 option, OSI_INT32 value ); >extern void osi_thread_yield( void ); > > extern OSI_TIME_EXT_STR* osi_gmtime( const time_t * timet ); > extern OSI_TIME_EXT_STR* osi_localtime( const time_t * timet ); > extern OSI_STRING osi_asctime( OSI_TIME_EXT_STR* ext_time_str ); > >extern OSI_INT32 osi_time_diff( OSI_TIME_STR A, OSI_TIME_STR B ); >extern OSI_INT32 osi_time_diff_ext( OSI_TIME_EXT_STR A, OSI_TIME_EXT_STR B ); >extern OSI_RETCODE osi_time_get( OSI_TIME_STR* time_str ); >extern OSI_RETCODE osi_time_get_ext( OSI_TIME_EXT_STR* ext_time_str ); > >extern OSI_INT64 osi_time_diff64( OSI_TIME_STR64 A, OSI_TIME_STR64 B ); >extern OSI_INT64 osi_time_diff_ext64( OSI_TIME_EXT_STR64 A, OSI_TIME_EXT_STR64 B ); >extern OSI_RETCODE osi_time_get64( OSI_TIME_STR64* time_str ); >extern OSI_RETCODE osi_time_get_ext64( OSI_TIME_EXT_STR64* ext_time_str ); > >extern OSI_BOOL osi_timer_expired( OSI_TIME_STR timer ); >extern OSI_UINT32 osi_timer_periodic( OSI_TIME_STR* timer, OSI_UINT32 msec_period, OSI_UINT32 msec_offset ); >extern OSI_UINT32 osi_timer_remaining( OSI_TIME_STR timer ); >extern OSI_RETCODE osi_timer_start( OSI_TIME_STR* timer, OSI_UINT32 msec_duration ); > >extern OSI_BOOL osi_timer_expired64( OSI_TIME_STR64 timer ); >extern OSI_UINT32 osi_timer_periodic64( OSI_TIME_STR64* timer, OSI_UINT32 msec_period, OSI_UINT32 msec_offset ); >extern OSI_UINT32 osi_timer_remaining64( OSI_TIME_STR64 timer ); >extern OSI_RETCODE osi_timer_start64( OSI_TIME_STR64* timer, OSI_UINT32 msec_duration ); > >extern OSI_INT32 osi_truncLL( OSI_INT64 valin, OSI_INT32 *valout, OSI_BOOL *overflow ); >extern OSI_INT64 osi_truncLL_ext( OSI_INT64 valin, OSI_INT64 max, OSI_INT64 min, OSI_INT64 *valout, OSI_BOOL *overflow ); >extern OSI_UINT32 osi_truncULL( OSI_UINT64 valin, OSI_UINT32 *valout, OSI_BOOL *overflow ); >extern OSI_UINT64 osi_truncULL_ext( OSI_UINT64 valin, OSI_UINT64 max, OSI_UINT64 *valout, OSI_BOOL *overflow ); ># 1132 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern OSI_STRING osi_ts_envsub( const OSI_STRING string, OSI_STRING result ); > >extern OSI_STRING osi_ts_envsub_ext( const OSI_STRING string, OSI_STRING result ); > >extern OSI_STRING osi_ts_nenvsub( const OSI_CHAR *string, OSI_STRING result, OSI_UINT32 result_size, OSI_UINT32 *required_size ); >extern OSI_STRING osi_ts_nenvsub_ext( const OSI_CHAR *string, OSI_STRING result, OSI_UINT32 result_size, OSI_UINT32 *required_size_hint ); > >extern OSI_DOUBLE osi_u64_to_double( OSI_UINT64 value ); > >extern OSI_RETCODE osi_winsock_init( void ); >extern int osi_writePipe( char *msg, int msgSize, int pipeId ); >extern OSI_RETCODE osi_zlib_uncompress_file( const char * filein, const char * fileout) ; >extern OSI_RETCODE osi_zlib_compress_file( const char * filein, const char * fileout, int level) ; > > > >OSI_TR_HANDLE osi_tr_init_ext( const OSI_CHAR *basename, OSI_TR_INIT_STR *options, OSI_RETCODE * ret ); > > > > > > >extern void osi_simsleep( OSI_INT32 ms ); >extern time_t osi_simtime_convert( time_t t_in ); >extern OSI_RETCODE osi_simtime_convert_timestr( OSI_TIME_STR t_in, OSI_TIME_STR *t_out ); >extern OSI_BOOL osi_simtime_is_enabled( void ); > >extern OSI_RETCODE osi_simtime_get( OSI_TIME_STR* time_str ); >extern OSI_RETCODE osi_simtime_get_ext( OSI_TIME_EXT_STR* ext_time_str ); >extern time_t osi_simtime( time_t* tmt); >extern OSI_BOOL osi_simtimer_expired( OSI_TIME_STR timer ); >extern OSI_UINT32 osi_simtimer_periodic( OSI_TIME_STR* timer, OSI_UINT32 msec_period, OSI_UINT32 msec_offset ); >extern OSI_UINT32 osi_simtimer_remaining( OSI_TIME_STR timer ); >extern OSI_RETCODE osi_simtimer_start( OSI_TIME_STR* timer, OSI_UINT32 msec_duration ); > >extern OSI_RETCODE osi_simtime_get64( OSI_TIME_STR64* time_str ); >extern OSI_RETCODE osi_simtime_get_ext64( OSI_TIME_EXT_STR64* ext_time_str ); >extern time_t osi_simtime64( time_t* tmt ); >extern OSI_BOOL osi_simtimer_expired64( OSI_TIME_STR64 timer ); >extern OSI_UINT32 osi_simtimer_periodic64( OSI_TIME_STR64* timer, OSI_UINT32 msec_period, OSI_UINT32 msec_offset ); >extern OSI_UINT32 osi_simtimer_remaining64( OSI_TIME_STR64 timer ); >extern OSI_RETCODE osi_simtimer_start64( OSI_TIME_STR64* timer, OSI_UINT32 msec_duration ); > > > >extern OSI_RETCODE osi_bin_to_base64( OSI_BYTE *source, OSI_STRING buffer, OSI_INT32 len, OSI_INT32 *size ); >extern OSI_RETCODE osi_base64_to_bin( OSI_STRING source, OSI_BYTE *buffer, OSI_INT32 len, OSI_INT32 *size ); > > > >extern OSI_UINT64 hton64( OSI_UINT64 data ); >extern OSI_UINT64 ntoh64( OSI_UINT64 data ); > > > >extern OSI_STRING parzone( OSI_STRING s, long *zone ); >extern struct tm* time2tm( time_t, int ); >extern time_t difftm( struct tm *, struct tm * ); >extern time_t str2loctime( OSI_STRING asctime_a ); >extern time_t str2time( OSI_STRING source, time_t default_time, long default_zone ); >extern time_t tm2time( struct tm *, int ); >extern void adjzone( struct tm *, long ); >extern time_t osi_str2time( OSI_STRING buf, time_t default_time, long default_zone ); >extern OSI_STRING OSI_TimeToLogDate( time_t log_time, OSI_INT32 size ); ># 1211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern void OSI_RuntimeInit(int *argc, char *argv[]); > > > > > > >extern OSI_BOOL OSI_IsRuntimeInitialized(void); ># 1227 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern void OSI_RuntimeCleanup(void); > >extern long NetRead( int sp, char *Buffer, long BufSize, long WaitSec ); >extern long NetWrite( int sp, char *Buffer, long BufSize, long WaitSec ); >extern void NetInit( OSI_STRING userName, OSI_INT32 opts ); >extern void NetFinish( void ); >extern int NetOpen( char *HostName, char *ServiceName ); >extern int NetAdd( char *HostName, char *ServiceName, OSI_SOCKET sock, void (*fail_callback)( OSI_SOCKET ) ); >extern void NetClose( int sp, int mode ); >extern int NetListen( char *ServiceName, OSI_INT32 ( *pReceiveFn )( OSI_INT32 Sock) ); >extern int NetOnlineListen( char *ServiceName, OSI_INT32 ( *pReceiveFn )( OSI_INT32 Sock, void* pBuf ), OSI_INT32 ( *pOnlineFn )( OSI_INT32 Sock, void* Buf ), int bufSize ); >extern OSI_BOOL NetIsConnect( OSI_INT32 sp ); >extern int NetTest( char* hostName, char* serviceName ); ># 1284 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" > extern int getopt(int argc, char *const *argv, const char *shortopts); ># 1301 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern int getopt_long( int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind ); ># 1310 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" >extern int getopt_long_only( int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind ); > > >extern int _getopt_internal(int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only ); ># 1337 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/syslib.h" > } ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" 2 ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >typedef struct >{ > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; >} >DBMS_DOF_STR; > > >typedef struct >{ > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; > OSI_RECORD R; > OSI_RECORD num; >} >DBMS_DOFR_STR; > > >typedef struct >{ > OSI_DATABASE D; > OSI_OBJECT O; > OSI_FIELD F; > OSI_INDEX I; >} >DBMS_DOFI_STR; > > >typedef struct >{ > OSI_RECORD* sort_array; > OSI_RECORD num_sorted; >} >DBMS_SORT_STR; > > >typedef struct >{ > OSI_RECORD outer_rec; > OSI_RECORD inner_rec; >} >DBMS_SEARCH_STR; > > >typedef struct >{ > OSI_UINT8 auth_method; > OSI_BOOL force; > OSI_UINT8 auto_login; > OSI_BOOL def_user; > OSI_CHAR realm[ 508 ]; >} >USER_SECURITY_INFO_STR; > > >typedef struct { > OSI_INT64 pid; > OSI_INT64 timestamp; >} OSI_DB_LOCK_ENTRY; > > > >typedef struct _server_health_struct * SERVERHEALTH_HANDLE; > > > >typedef struct _server_health_struct >{ > OSI_CHAR name[ 64 ]; > OSI_DOUBLE health; >} serverHealth; ># 103 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >typedef struct _dbms_sync_health_struct * DBMS_SYNC_HEALTH_HANDLE; >typedef struct _dbms_sync_health_struct >{ > OSI_CHAR name[ 64 ]; > OSI_BYTE type; > OSI_UINT16 tolerance; > OSI_DOUBLE value; >} DBMS_SYNC_HEALTH_STRUCT; > > > > > > > extern "C" { > > >typedef struct _dbms_copy_info_str { > OSI_DATABASE dbnum; > OSI_INSTANCE instnum; > OSI_CHAR base_name[ 30 ]; > OSI_BOOL no_execute; > OSI_BOOL echo; > > char save_time[ 256 ]; > OSI_CHAR loc[ 100 ]; > OSI_CHAR name[ 100 ]; > OSI_UINT32 bytes_written; > OSI_INT32 error_code; >} DBMS_COPY_INFO_STR; > > > >extern OSI_RETCODE DBMS_copy_savecase( DBMS_COPY_INFO_STR * info, OSI_INT32 max_copies ); > > >extern OSI_RETCODE DBMS_activate_fields( OSI_UINT16 setID, OSI_BOOL active ); >extern OSI_RETCODE DBMS_add_object( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_add_to_record_list( OSI_UINT16 setID, OSI_DATABASE D, OSI_OBJECT O, OSI_FIELD F, OSI_RECORD R, OSI_RECORD num ); >extern OSI_RETCODE DBMS_cache_define( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern void DBMS_cache_method_cleanup( void ); >extern OSI_INT32 DBMS_cache_read( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno ); >extern OSI_RETCODE DBMS_cache_swap( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_POINTER objBuf, OSI_RECORD numRec ); >extern OSI_RETCODE DBMS_change_cache_method( OSI_DATABASE D, OSI_OBJECT O, OSI_FIELD F, OSI_INT8 cache_type, OSI_RECORD num_rec ); >extern OSI_RETCODE DBMS_change_record( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno ); >extern OSI_BOOL DBMS_check_endian( OSI_POINTER header ); >extern OSI_RETCODE DBMS_cleanup_locks( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_clear( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_close( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_close_object( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_close_object_ext( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_MODE sendCloseNetObjHeader ); >extern OSI_RETCODE DBMS_close_locks( void ); >extern OSI_RETCODE DBMS_commit_master( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_compare( OSI_STRING file1, OSI_STRING file2, OSI_DATABASE DBno, OSI_STRING name1, OSI_STRING name2, OSI_STRING report ); >extern OSI_RETCODE DBMS_copy( OSI_DATABASE DBno, OSI_BYTE lock_flag, OSI_STRING filename, OSI_UINT32* bytes_written, OSI_INT32* error_code ); >extern OSI_RETCODE DBMS_copy_ext( OSI_DATABASE DBno, OSI_BYTE lock_flag, OSI_STRING filename, OSI_STRING temp_prefix, OSI_UINT32* bytes_written, OSI_INT32* error_code ); >extern OSI_RETCODE DBMS_copy_object( OSI_DATABASE fDBno, OSI_OBJECT fOBJno, OSI_RECORD fRECno, OSI_DATABASE tDBno, OSI_OBJECT tOBJno, OSI_RECORD tRECno ); >extern OSI_RETCODE DBMS_create_db( OSI_STRING DBname, OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_create_master( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_create_record_list( OSI_UINT16 setID, OSI_UINT32 maxNumDOFR ); >extern OSI_RETCODE DBMS_create_remote_dir( OSI_STRING host, OSI_STRING directory ); >extern OSI_RETCODE DBMS_delete_case( OSI_DATABASE DBno, OSI_INSTANCE INSTno, OSI_STRING path ); >extern OSI_RETCODE DBMS_delete_fields( OSI_UINT16 setID ); >extern OSI_RETCODE DBMS_delete_object( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno ); >extern OSI_RETCODE DBMS_envsub( OSI_STRING node, OSI_STRING inputString, OSI_STRING return_string, OSI_UINT32 return_size ); >extern OSI_RETCODE DBMS_file_get( OSI_STRING source_node, OSI_STRING source_path, OSI_STRING target_path, OSI_BOOL is_text ); >extern OSI_RETCODE DBMS_file_info( OSI_STRING filename, OSI_POINTER pFileBuf ); >extern OSI_RETCODE DBMS_file_read_object( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_INSTANCE INSTno, OSI_STRING filename ); >extern OSI_RETCODE DBMS_file_write_object( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_INSTANCE INSTno, OSI_STRING filename ); >extern OSI_DOFRI_STR DBMS_find_index( OSI_STRING DOFRIstring, OSI_INDEX end_index, OSI_STRING key, OSI_STRING filter, OSI_INT8 direction, OSI_INSTANCE INSTno, OSI_INDEX start_index ); >extern OSI_RECORD DBMS_find_record( OSI_STRING DOFRIstring, OSI_RECORD end_record, OSI_STRING key, OSI_STRING filter, OSI_INT8 direction, OSI_INSTANCE INSTno ); >extern DBMS_SEARCH_STR DBMS_find_record2( OSI_STRING DOFRIstring, OSI_RECORD end_record, OSI_STRING key, OSI_STRING filter, OSI_INT8 direction, OSI_INSTANCE INSTno, OSI_RECORD start_rec ); >extern OSI_RETCODE DBMS_flush( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_free_locks( OSI_POINTER lock_table ); >extern OSI_RETCODE DBMS_getdbhostname( OSI_DATABASE DBno, OSI_STRING server_name ); >extern OSI_RETCODE DBMS_get_ADS_TAG( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno, OSI_BIT* T, OSI_BIT* L, OSI_BIT* Q, OSI_INSTANCE INSTno ); >extern OSI_INDEX DBMS_get_array_length( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_INDEX DBMS_get_array_size( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_INSTANCE INSTno ); >extern OSI_BIT DBMS_get_bit( OSI_POINTER baseAddr, OSI_UINT32 bitOfs ); >extern OSI_STRING DBMS_get_case_list( OSI_DATABASE DBno, OSI_INSTANCE INSTno, OSI_STRING path, OSI_UINT32 name_size, OSI_INT32* num_items ); >extern OSI_RETCODE DBMS_get_client_mode( OSI_DATABASE DBno, OSI_CHAR *perm ); >extern OSI_RETCODE DBMS_get_checkpoint( OSI_DATABASE DBno, OSI_BYTE *value ); >extern OSI_RETCODE DBMS_get_database_load_time( OSI_DATABASE DBno, time_t *time ); >extern OSI_STRING DBMS_get_database_name( OSI_DATABASE DBno ); >extern OSI_DATABASE DBMS_get_database_number( const OSI_STRING DBname ); >extern OSI_STATUS DBMS_get_database_status( OSI_DATABASE DBno ); >extern OSI_STATUS DBMS_get_database_status_nosite( OSI_DATABASE DBno ); >extern OSI_STATUS DBMS_get_database_status_ext( OSI_DATABASE DBno ); >extern OSI_STATUS DBMS_get_site_status( void ); >extern OSI_STATUS DBMS_get_site_status_ext( OSI_BOOL useDesiredStatus ); >extern OSI_STATUS DBMS_get_site_desired_status( void ); >extern OSI_STATUS DBMS_get_site_database_status( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_get_db_config_type( OSI_DATABASE DBno, OSI_MODE* dbType ); >extern OSI_RETCODE DBMS_get_db_name( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_get_db_names( OSI_DATABASE DBno ); >extern OSI_STRING DBMS_get_description( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_RECORD DBMS_get_empty_record( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_get_field( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno ); >extern OSI_RETCODE DBMS_file_get_record( OSI_STRING filename, OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno, void *recPtr, OSI_UINT64 size ); >extern OSI_RETCODE DBMS_file_put_record( OSI_STRING filename, OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno, void *recPtr, OSI_UINT64 size ); >extern OSI_STRING DBMS_get_field_flags( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_STRING DBMS_get_field_name( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_RETCODE DBMS_get_field_remote( OSI_STRING node, OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno, OSI_POINTER value ); >extern OSI_INT32 DBMS_get_field_time( void ); >extern OSI_CHAR DBMS_get_field_type( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_RETCODE DBMS_get_group( OSI_DATABASE DBno, OSI_UINT8* group ); >extern OSI_RETCODE DBMS_get_header( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_get_info( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno, OSI_INSTANCE INSTno, OSI_STRING DBname, OSI_STRING OBJname, OSI_STRING FLDname, OSI_STRING RECname, OSI_STRING STATEname, OSI_POINTER value, OSI_CHAR* format ); >extern OSI_FIELD DBMS_get_key_fldno( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_STRING DBMS_get_limit_string( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_POINTER DBMS_get_locks( OSI_BOOL mode ); >extern OSI_RETCODE DBMS_get_lock_flag( OSI_DATABASE DBno, OSI_BYTE *lock_flag ); >extern OSI_STRING DBMS_get_name( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno, OSI_STRING field_name, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_get_name_link( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_DATABASE* nameDBno, OSI_OBJECT* nameOBJno, OSI_FIELD* nameFLDno ); >extern OSI_FIELD DBMS_get_num_fields( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_OBJECT DBMS_get_num_objects( OSI_DATABASE DBno ); >extern OSI_RECORD DBMS_get_num_records( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_POINTER DBMS_get_object( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno ); >extern OSI_STRING DBMS_get_object_name( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_get_object_name_info( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_DATABASE* nameDBno, OSI_OBJECT* nameOBJno, OSI_FIELD* nameFLDno ); >extern OSI_INT32 DBMS_get_option( OSI_INT32 option ); >extern OSI_RECORD DBMS_get_R( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_STRING value, OSI_STRING field_name, OSI_INSTANCE INSTno, OSI_RECORD record_guess ); >extern OSI_RETCODE DBMS_get_source( OSI_DATABASE DBno ); >extern OSI_INT32 DBMS_get_state_link( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_UINT32 DBMS_get_string_size( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); >extern OSI_RETCODE DBMS_get_TAG( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno, OSI_BIT* T, OSI_BIT* L, OSI_BIT* Q, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_get_type( OSI_DATABASE DBno, OSI_STRING name ); >extern OSI_RETCODE DBMS_get_type_ext( OSI_DATABASE DBno ); >extern OSI_BOOL DBMS_global_isdblocked( OSI_DATABASE DBno, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_global_unlockdb( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_init( OSI_STRING program_name ); >extern OSI_BOOL DBMS_is_configured( OSI_DATABASE DBno ); >extern OSI_BOOL DBMS_is_local_mode( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_load_case( OSI_DATABASE DBno, OSI_INSTANCE INSTno, OSI_STRING path ); >extern OSI_RETCODE DBMS_load_file( OSI_DATABASE DBno, OSI_INSTANCE INSTno, OSI_STRING filename ); >extern OSI_RETCODE DBMS_load_master( OSI_DATABASE DBno, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_lock( OSI_DATABASE DBno ); >extern OSI_BOOL DBMS_locked( OSI_DATABASE DBno ); >extern OSI_BOOL DBMS_master_exists( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_mem_copy( OSI_DATABASE DBno, OSI_BYTE lock_flag ); >extern OSI_RETCODE DBMS_mod_object( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_open( OSI_DATABASE DBno, OSI_BYTE lock_flag, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_open_locks( void ); >extern OSI_RETCODE DBMS_open_object( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_populate( FILE* input, OSI_INSTANCE INSTno, OSI_BYTE options ); >extern OSI_RETCODE DBMS_optimize_record_list( OSI_UINT16 setID ); >extern OSI_RETCODE DBMS_prime_field( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno ); >extern OSI_RETCODE DBMS_put_cache( OSI_DATABASE D, OSI_OBJECT O, OSI_FIELD F, OSI_RECORD R, OSI_INDEX I, OSI_INSTANCE INSTno, OSI_POINTER data ); >extern OSI_RETCODE DBMS_put_field( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno ); >extern OSI_RETCODE DBMS_put_field_remote( OSI_STRING node, OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno, OSI_RECORD RECno, OSI_INDEX INDXno, OSI_POINTER value, OSI_UINT32 size ); >extern OSI_RETCODE DBMS_put_file( OSI_STRING sourcePath, OSI_STRING targetNode, OSI_STRING targetPath, OSI_BOOL isText ); >extern OSI_RETCODE DBMS_put_object( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_put_records( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_put_source( OSI_DATABASE DBno ); >extern OSI_INT32 DBMS_refresh_cache( OSI_DATABASE DBno, OSI_OBJECT OBJno ); >extern OSI_RETCODE DBMS_refresh_DOFR( OSI_DATABASE D, OSI_OBJECT O, OSI_FIELD F, OSI_RECORD R, OSI_INSTANCE I, OSI_BOOL useGroups ); >extern OSI_RETCODE DBMS_refresh_thread_pause( OSI_BOOL pause ); >extern OSI_STRING DBMS_remotedir( OSI_STRING remote_node, OSI_STRING path, OSI_BOOL tree ); >extern OSI_RETCODE DBMS_reset_mem( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_save_case( OSI_DATABASE DBno, OSI_INSTANCE INSTno, OSI_STRING path, OSI_STRING subpath, OSI_STRING filename ); >extern OSI_RETCODE DBMS_save_master( OSI_DATABASE DBno, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_select_fields( OSI_UINT16 setID, OSI_UINT32 numPoints, DBMS_DOF_STR* DOFList ); >extern OSI_RETCODE DBMS_select_load( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_select_load_ext( OSI_DATABASE DBno, OSI_BOOL passiveOpen ); >extern OSI_RETCODE DBMS_set_bit( OSI_POINTER baseAddr, OSI_UINT32 bitOfs, OSI_BIT bitVal ); >extern OSI_RETCODE DBMS_set_checkpoint( OSI_DATABASE DBno, OSI_BYTE value ); >extern OSI_RETCODE DBMS_set_end( OSI_UINT16 setID ); >extern OSI_RETCODE DBMS_set_file( OSI_STRING path, OSI_STRING filename, OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_set_database_load_time( OSI_DATABASE DBno, time_t time ); >extern OSI_RETCODE DBMS_set_disclaim_memory(OSI_BOOL disclaim); >extern OSI_RETCODE DBMS_set_option( OSI_INT32 option, OSI_POINTER value ); >extern OSI_RETCODE DBMS_set_port( OSI_INT32 port ); >extern OSI_RETCODE DBMS_set_records( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD count ); >extern OSI_RETCODE DBMS_set_start( OSI_UINT16 setID ); >extern OSI_RETCODE DBMS_shm_close( OSI_DATABASE DBno ); >extern OSI_INT32 DBMS_shm_count( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_shm_open( OSI_DATABASE DBno, OSI_STRING path , OSI_BYTE lock_flag, time_t *db_load_time ); >extern OSI_RETCODE DBMS_shm_open_objects( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_shm_refresh( OSI_DATABASE DBno, OSI_STRING filename, time_t *db_load_time ); >extern OSI_INT32 DBMS_shm_size( OSI_DATABASE DBno ); >extern DBMS_SORT_STR* DBMS_sort( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD* field_list, OSI_FIELD num_fields, OSI_INT8 which_way, OSI_BOOL write ); >extern OSI_RETCODE DBMS_swap_field_data( OSI_POINTER field_data, OSI_CHAR field_format ); >extern OSI_RETCODE DBMS_test_nlock( OSI_DATABASE DBno, OSI_INSTANCE INSTno ); >extern OSI_RETCODE DBMS_unlock( OSI_DATABASE DBno ); >extern OSI_RETCODE DBMS_verify_file( OSI_STRING filename, OSI_UINT32* comp_bytes, OSI_UINT32* act_bytes, time_t* mod_time ); >extern OSI_RETCODE DBMS_verify_file_ext( OSI_DATABASE DBno, OSI_STRING file ); >extern OSI_RETCODE DBMS_verify_memory( OSI_DATABASE DBno ); >extern OSI_STRING DBMS_version( void ); >extern OSI_INT32 DBMS_version_no( void ); >extern OSI_RETCODE DBMS_WriteSortedOrder( DBMS_SORT_STR* order, OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_FIELD FLDno ); > >extern OSI_INT64 DBMS_get_lock_pid(OSI_DATABASE DBno, OSI_INSTANCE INSTno); >extern OSI_INT64 DBMS_get_lock_time(OSI_DATABASE DBno, OSI_INSTANCE INSTno ); >extern OSI_BOOL DBMS_own_lock( OSI_DATABASE DBno ); >extern OSI_BOOL DBMS_renew_lock( OSI_DATABASE DBno ); >extern OSI_DB_LOCK_ENTRY * DBMS_get_lock_entry( OSI_DATABASE DBno, OSI_INSTANCE INSTno ) ; > >extern OSI_RETCODE DBMS_parse_dofri_string( const OSI_STRING source, OSI_DOFRI_EXT_STR *dofri, OSI_STRING *remainder ); >extern OSI_RETCODE DBMS_parse_dofri_argv( const OSI_STRING argv[], const OSI_INT32 argc, OSI_DOFRI_EXT_STR *dofri, OSI_INT32 *offset ); >extern OSI_RETCODE DBMS_parse_dofki_argv( const OSI_STRING argv[], const OSI_INT32 argc, OSI_DOFRI_EXT_STR *dofri, OSI_CHAR *key, OSI_INT32 *offset ); >extern OSI_RETCODE DBMS_dofri_str_to_ext( const OSI_DOFRI_STR *in, OSI_DOFRI_EXT_STR *out ); >extern OSI_RETCODE DBMS_dofri_ext_to_str( const OSI_DOFRI_EXT_STR *in, OSI_DOFRI_STR *out ); >extern OSI_RETCODE DBMS_parse_dofri_argv_limited( const OSI_STRING argv[], const OSI_INT32 argc, OSI_DOFRI_EXT_STR *dofri, OSI_INT32 *offset, > int dbcount, int * dbrange, int objcount, int *objrange ); ># 332 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_RETCODE DBMS_get_op_flag( const OSI_CHAR* const flag_name, OSI_UINT32* value ); ># 359 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_RETCODE DBMS_get_op_flag_by_record( OSI_RECORD* record, OSI_UINT32* value, const OSI_CHAR* const name ); ># 382 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_RETCODE DBMS_set_op_flag( const OSI_CHAR* const flag_name, OSI_UINT32 value ); ># 411 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_RETCODE DBMS_set_op_flag_by_record( OSI_RECORD* record, OSI_UINT32 value, const OSI_CHAR* const name ); ># 434 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_RETCODE DBMS_get_op_flag_record( const OSI_CHAR * const flag_name, OSI_RECORD* record ); > > >extern OSI_RETCODE osi_get_ovuser_security_info( USER_SECURITY_INFO_STR *info ); >extern OSI_RETCODE osi_db2inet( OSI_STRING database_name, OSI_STRING host_name ); >extern OSI_RETCODE osi_db2inet_ext( OSI_STRING database_name, OSI_STRING host_name, OSI_DATABASE *database, OSI_STATUS *status ); >extern OSI_RETCODE osi_heartbeat( OSI_STATUS status ); >extern void osi_heartbeatinit( OSI_DATABASE DBno ); >extern OSI_RETCODE osi_heartbeatmode( OSI_BYTE mode, OSI_INT32 arg ); >extern OSI_RETCODE osi_heartbeat_udp( OSI_STATUS status ); >extern OSI_BOOL osi_is_database_online( OSI_DATABASE DBno ); >extern OSI_BOOL osi_is_login_alarm_required( OSI_INT32 authStatus, const OSI_CHAR *username ); >extern OSI_STATUS osi_net_status( OSI_STRING nodename, OSI_DATABASE DBno, OSI_UINT32* accTime, OSI_BYTE stat_mode ); >extern OSI_RETCODE osi_user_get_info( OSI_STRING username, OSI_RECORD *dyn_user, OSI_RECORD *static_user ); >extern OSI_INT32 osi_user_get_slot( OSI_STRING username, OSI_STRING program, OSI_INT32 slot ); >extern OSI_INT32 osi_user_login_heartbeat( OSI_STRING username, OSI_STRING password, OSI_STRING program, OSI_INT32 slot, OSI_BOOL logging_in ); >extern OSI_BOOL osi_user_slot_valid( OSI_INT32 slot ); >extern OSI_RETCODE osi_verify_kerb_passwd( const OSI_STRING user, const OSI_STRING password ); >extern OSI_RETCODE osi_verify_radius_passwd ( const OSI_STRING user, const OSI_STRING password ); >extern OSI_BOOL osi_verify_ovdefuser( const OSI_STRING user ); >extern OSI_INT32 osi_verify_ovpasswd( const OSI_STRING user, const OSI_STRING password ); >extern OSI_RECORD osi_verify_ovosuser( void ); >extern OSI_BOOL osi_wait_for_online( OSI_DATABASE DBno ); >extern OSI_BOOL osi_wait_for_online_callback( OSI_DATABASE DBno, void ( *callback )( void* ), void *param, OSI_UINT32 period ); > >extern OSI_RECORD osi_getEmbeddedHeartbeatRecord( OSI_STRING process, OSI_INT32 hbid, OSI_INT32 dbnum ); ># 483 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" > } ># 699 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" > extern "C" { > > >extern FILE* statDBMS_file[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_CHAR statDBNAME[ ( OSI_DATABASE )500 + 1 ][ 30 ]; >extern OSI_CHAR statDBPATH[ ( OSI_DATABASE )500 + 1 ][ 100 ]; >extern OSI_CHAR statDBNAME_I[ ( OSI_DATABASE )500 + 1 ][ 30 ]; >extern OSI_CHAR statDBPATH_I[ ( OSI_DATABASE )500 + 1 ][ 100 ]; >extern OSI_POINTER statOBJ_mem_ptr[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_INSTANCE statDB_instance [ ( OSI_DATABASE )500 + 1 ]; > >extern FILE** DBMS_file; >extern OSI_STRING DBNAME[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_STRING DBPATH[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_STRING DBNAME_I[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_STRING DBPATH_I[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_POINTER* OBJ_mem_ptr[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_INSTANCE* DB_instance; > >extern OSI_POINTER* DB_shmad[ ( OSI_DATABASE )500 + 1 ]; > >extern OSI_RECORD OBJ_mx_urs[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_RECORD OBJ_no_urs[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_UINT32 OBJ_mx_byte[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_BOOL OBJ_lock[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_BOOL OBJ_write[ ( OSI_DATABASE )500 + 1 ][ ( OSI_OBJECT)120 + 1 ]; >extern OSI_MODE DB_type[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_BOOL DB_open[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_BOOL DB_snapshot[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_INT32 DB_renew_count[ ( OSI_DATABASE )500 + 1 ]; >extern OSI_INT32 DB_renew_max[ ( OSI_DATABASE )500 + 1 ]; > > >typedef struct object0 >{ > OSI_BOOL lock; > OSI_BOOL write; > OSI_RECORD mx_urs; > OSI_RECORD no_urs; > OSI_UINT32 mx_byte; > OSI_UINT32 field_offset[ ( OSI_FIELD )120 ]; > OSI_UINT32 field_bytes[ ( OSI_FIELD )120 ]; > OSI_CHAR field_format[ ( OSI_FIELD )120 ]; >} >OBJECT_ZERO_STR; >extern OBJECT_ZERO_STR* OBJ0; > > >typedef union >{ > OSI_CHAR* c; > OSI_BYTE* h; > OSI_INT16* s; > OSI_UINT16* u; > OSI_INT32* l; > OSI_FLOAT* f; > OSI_DOUBLE* d; > OSI_UINT32* w; > OSI_INT64* e; > OSI_UINT64* g; > OSI_DOFRI_STR* n; >} >DBMS_DATA_STR; >extern DBMS_DATA_STR DBMS_data; > >extern OSI_CHAR DBMS_field_format; >extern OSI_UINT32 DBMS_field_bytes; >extern OSI_BYTE DBMS_byte; >extern OSI_BIT DBMS_bits[]; > >extern OSI_BOOL dbfields_first_time; >extern OSI_CHAR DBMSError[]; > > >extern OSI_UINT32 _DBMS_cache_size; > > >extern OSI_BYTE DBMS_field_method; > >extern OSI_UINT32 NetReadCount; >extern OSI_UINT32 NetWriteCount; >extern OSI_UINT32 NetTripsCount; > >extern OSI_CHAR admin[]; > > >extern DBMS_DOFI_STR username; >extern DBMS_DOFI_STR password; > > >extern OSI_CHAR DBMS_local_hostname[ 256 ]; ># 846 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" >extern OSI_CHAR OSI_GetMyName( void ); >extern OSI_STATUS OSI_GetMyStatus( void ); >extern OSI_STATUS osi_get_node_status( void ); > extern OSI_BOOL osi_is_online( void ); >extern OSI_RETCODE osi_pmswitch( OSI_STRING process_name, OSI_STATUS status, OSI_BOOL toggle ); >extern OSI_RETCODE osi_set_online( OSI_STATUS status, OSI_UINT8 server ); >extern OSI_RETCODE osi_wait4_online( OSI_DATABASE DBno, OSI_BYTE options ); >extern OSI_RETCODE osi_wait4_raidonline( OSI_STRING path ); ># 874 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" > } ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/license.h" 1 > > > > > > >typedef void* LIC_HANDLE; ># 119 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/license.h" >typedef struct _osi_lic_init_str { > OSI_CHAR program_name[ 256 ]; > OSI_CHAR hostname[ 256 ]; >} OSI_LICENSE_INIT_STR; ># 144 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/license.h" > extern "C" { > > >extern LIC_HANDLE osi_license_open_safe( OSI_LICENSE_INIT_STR *init_str, OSI_RETCODE *ret ); >extern LIC_HANDLE osi_license_open( OSI_RETCODE *ret ); > > extern OSI_RETCODE osi_license_get_option( LIC_HANDLE handle, OSI_STRING category, OSI_STRING option, OSI_STRING value, OSI_BOOL *printable ); >extern OSI_RETCODE osi_license_get_option_s( LIC_HANDLE handle, OSI_STRING category, OSI_STRING option, OSI_STRING value, size_t v_sz, OSI_BOOL *printable ); > > extern OSI_RETCODE osi_license_get_computer_option( LIC_HANDLE handle, OSI_STRING computer, OSI_STRING option, OSI_STRING value ); >extern OSI_RETCODE osi_license_get_computer_option_s( LIC_HANDLE handle, OSI_STRING computer, OSI_STRING option, OSI_STRING value, size_t value_sz ); > >extern OSI_RETCODE osi_license_close( LIC_HANDLE h ); >extern OSI_BOOL osi_license_is_host_server(OSI_STRING computer); >extern OSI_BOOL osi_license_is_server(); >extern OSI_BOOL osi_license_is_computer_present( LIC_HANDLE handle, const OSI_STRING computer ); > > > } ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" 2 ># 113 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" >enum UMONNetCmds >{ > UMON_NET_LOGON = 1, > UMON_NET_GET_MSG = 2, > UMON_NET_SEND_MSG = 3, > UMON_NET_LOGOFF = 4, > UMON_NET_FINAL = 5 > >}; > >enum UMONErrorCodes >{ > UMON_SUCCESS = (( OSI_RETCODE )1), > UMON_FAILURE = (( OSI_RETCODE )0), > UMON_EOM = -1, > UMON_NO_REPLY = -2, > UMON_INVALID_PARM = -3, > UMON_DUP_ID = -4, > UMON_CONN_ERROR = -5, > UMON_INVALID_USER = -6, > UMON_NO_LICENSE = -7, > UMON_CONN_CLOSED = -8, > UMON_DB_FAIL = -9, > UMON_PROTOCOL_ERR = -10, > UMON_UNKNOWN_ID = -11, > UMON_CRITICAL = -99 >}; > > > > >typedef union >{ > OSI_CHAR char_buf[ 250 ]; >} >COM_BUF_STR; > >typedef struct >{ > OSI_UINT8 command; > OSI_UINT8 buf_len; > COM_BUF_STR com_buf; >} >APPS_COM_STR; > >typedef struct osi_file_str >{ > OSI_UINT32 modTime; > OSI_UINT32 fileSize; >} >osi_file_rec; > >typedef struct osi_file_str64 >{ > OSI_INT64 modTime; > OSI_UINT64 fileSize; >} >osi_file_rec64; > >typedef struct HashRec >{ > OSI_CHAR key[ 64 ]; > OSI_RECORD r; > struct HashRec* next; > struct HashRec* prev; >} >*HashPtr; > >typedef struct HashTableRec >{ > HashPtr* table; > OSI_UINT32 numBuckets; > OSI_DATABASE dbnum; > OSI_OBJECT objnum; > OSI_FIELD fldnum; >} >*HashTablePtr; > >typedef struct >{ > OSI_UINT64 sig; > OSI_UINT32 i1; > OSI_UINT32 i2; > OSI_UINT32 length; > OSI_UINT32 cmd; > OSI_UINT32 subcmd; > OSI_UINT32 status; > >} UMON_NET_STR; > >typedef void * UMON_HANDLE; >typedef OSI_RETCODE UMON_RETCODE; ># 214 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osilib.h" > extern "C" { > > >extern APPS_COM_STR ComBuff[]; >extern OSI_CHAR ToOVNode[]; >extern OSI_INT32 ToOVPID; >extern OSI_INT16 ComBuffSize; >extern OSI_UINT32 osi_broadcast_sleep; > >extern OSI_CHAR osi_host_name[]; >extern OSI_CHAR osi_node_name[]; > > > > >extern OSI_RETCODE DBMS_backup( OSI_DATABASE DBno, OSI_OBJECT OBJno, OSI_RECORD RECno ); > >extern OSI_UINT32 osi_checkmail( OSI_STRING node_a, OSI_STRING prog_a, OSI_INT32 copy, OSI_UINT32 wait ); >extern OSI_RETCODE osi_checksched( OSI_STRING argnode_a ); >extern OSI_RETCODE osi_exec( OSI_STRING argFromNode, OSI_STRING frprog_a, OSI_STRING argToNode, OSI_STRING toprog_a, OSI_INT32* tocopy, OSI_STRING toparm_a, OSI_UINT32 wait ); >extern OSI_RETCODE osi_execack( OSI_STRING frprog_a ); >extern void osi_execwait( OSI_STRING prog_a, OSI_INT32 copy, OSI_UINT32 wait, OSI_INT32* ackcopy ); >extern OSI_RETCODE osi_file_info( OSI_STRING FileName, osi_file_rec* pFileBuf ); >extern OSI_RETCODE osi_file_info64( const OSI_CHAR *pFileName, osi_file_rec64 *pFileInfo ); >extern OSI_RETCODE osi_fork1( OSI_STRING from_node, OSI_STRING from_program, OSI_INT32 from_copy, OSI_STRING unused, OSI_STRING program, OSI_STRING arguments, OSI_BOOL wait ); >extern void osi_fork2( OSI_STRING program, OSI_STRING arguments ); >extern OSI_RETCODE osi_getmail( OSI_STRING node_a, OSI_STRING prog_a, OSI_INT32 copy, OSI_STRING frnode_a, OSI_STRING frprog_a, OSI_INT32* frcopy, OSI_STRING msg_a, OSI_BYTE* fcode, OSI_BOOL* bcast_b, OSI_BOOL* wait_b, OSI_BOOL close_b ); >extern OSI_RETCODE osi_getsched( OSI_STRING tonode_a, OSI_STRING toprog_a, OSI_STRING toparm_a, OSI_STRING fraddr_a, OSI_BOOL* wait, OSI_UINT32* runTime ); > extern OSI_RETCODE osi_inet2node( OSI_STRING frinet_a, OSI_STRING tonode_a ); >extern OSI_RETCODE osi_inet2node_s( OSI_STRING frinet_a, OSI_STRING tonode_a, size_t to_sz ); >extern OSI_RETCODE osi_mailack( OSI_STRING frnode_a, OSI_STRING frprog_a, OSI_STRING tonode_a, OSI_STRING toprog_a, OSI_INT32 tocopy ); >extern void osi_maillog( OSI_STRING message ); >extern OSI_RETCODE osi_mailwait( OSI_STRING mynode_a, OSI_STRING myprog_a, OSI_INT32 mycopy, OSI_STRING frnode_a, OSI_STRING frprog_a, OSI_INT32 frcopy, OSI_UINT32 wait ); > > >extern OSI_RETCODE osi_node2inet_s( OSI_STRING frnode_a, OSI_STRING toinet_a, size_t inet_sz ); > extern OSI_RETCODE osi_parseprog( OSI_STRING buf_a, OSI_STRING node_a, OSI_STRING prog_a, OSI_INT32* copy ); >extern OSI_RETCODE osi_parseprog_s( OSI_STRING buf_a, OSI_STRING node_a, size_t node_sz, OSI_STRING prog_a, size_t prog_sz, OSI_INT32* copy ); >extern OSI_RETCODE osi_purgemail( OSI_STRING node_a, OSI_STRING prog_a, OSI_INT32 copy ); >extern OSI_RETCODE osi_purgesched( OSI_STRING prog_a ); >extern OSI_DOUBLE osi_realtime( void ); >extern OSI_STRING osi_remote_envsub( OSI_STRING node, OSI_STRING string ); >extern OSI_RETCODE osi_sendmail( OSI_STRING argFromNode, OSI_STRING fromProg, OSI_STRING argToNode, OSI_STRING toProg, OSI_INT32 toCopy, OSI_STRING msgOut, OSI_UINT32 msgLen, OSI_BYTE funcCode, OSI_UINT32 timeout, OSI_BOOL close, OSI_UINT32 wait ); >extern OSI_RETCODE osi_setmynode( OSI_BOOL reload ); >extern OSI_RETCODE OSI_OSIINET_AppsComm( OSI_STRING tonode, APPS_COM_STR *appscomm ); >extern OSI_RETCODE OSI_AppsComm( OSI_STRING node, APPS_COM_STR com_str ); >extern OSI_RETCODE OSI_AppsCommFlush( void ); >extern OSI_RETCODE OSI_AppsCommInit( OSI_STRING program ); >extern OSI_RETCODE OSI_AppsMessage( OSI_STRING, OSI_CHAR, OSI_CHAR, OSI_CHAR, OSI_CHAR ); >extern OSI_RETCODE OSI_event( OSI_STRING message ); >extern OSI_RETCODE OSI_SetEventFileName( OSI_STRING filename ); >extern OSI_RETCODE OSI_SetLogFileName( OSI_STRING filename ); > >extern void HashFreeTable( HashTablePtr* h ); >extern OSI_RECORD HashGetR( HashTablePtr pHashTable, OSI_STRING key ); >extern HashTablePtr HashInitTable( OSI_DATABASE dbnum, OSI_OBJECT objnum, OSI_FIELD fldnum, OSI_UINT32 numBuckets ); >extern void PrintHashTable( HashTablePtr pHashTable ); > >extern OSI_INT32 AutoAckStatus( OSI_STRING key ); >extern OSI_INT32 AutoAckAnalog( OSI_STRING key ); >extern OSI_CHAR IntelRunning( void ); >extern OSI_CHAR UnsetIntelRunning( void ); > > >extern OSI_CHAR SSS_getAORGroupState(OSI_UINT16 AORGroup); > extern OSI_CHAR SSS_getSiteState(OSI_UINT32 siteID); >extern OSI_CHAR SSS_getSharedAreaState(OSI_UINT32 areaID); >extern OSI_CHAR SSS_getSharedAreaStateFast(OSI_UINT32 areaID, void *record); >extern OSI_BOOL SSS_validate_areaID(OSI_UINT32 areaID); > extern OSI_INT16 SSS_getPhysicalSiteID(); >extern OSI_INT16 SSS_retrievePhysicalSiteID(); >extern OSI_INT16 SSS_retrieveSatelliteSiteID(); >extern time_t SSS_getLastCTtime(); >extern time_t SSS_getLastSharedAreaCTtime(OSI_UINT32 areaID); >extern OSI_RETCODE SSS_getPhysicalSiteName( OSI_INT16 physicalSiteId, OSI_STRING siteName, OSI_UINT32 siteNameBufferSize ); > > >extern UMON_HANDLE umon_init ( OSI_STRING caller_program, OSI_INT32 inst_num, > UMON_RETCODE* ret_stat ); >extern UMON_RETCODE umon_connect ( UMON_HANDLE handle ); >extern UMON_RETCODE umon_close ( UMON_HANDLE handle ); >extern UMON_RETCODE umon_get_error ( UMON_HANDLE handle, OSI_POINTER msgBuf, > OSI_INT32* msgSize ); >extern UMON_RETCODE umon_client_logon ( UMON_HANDLE handle, OSI_STRING client_host, > OSI_STRING client_program, OSI_STRING username, OSI_INT64 id ); >extern UMON_RETCODE umon_client_logoff ( UMON_HANDLE handle, OSI_INT64 id ); >extern OSI_BOOL umon_client_is_logged_on( UMON_HANDLE handle, OSI_INT64 id ); >extern UMON_RETCODE umon_conn_status ( UMON_HANDLE handle ); >extern UMON_RETCODE umon_msg_check ( UMON_HANDLE handle, OSI_STRING client_program, OSI_INT32* count ); >extern UMON_RETCODE umon_msg_next ( UMON_HANDLE handle, OSI_INT64 who, > void* msgBuf, OSI_INT32* msgSize ); >extern UMON_RETCODE umon_msg_send ( UMON_HANDLE handle, OSI_STRING toNode, APPS_COM_STR *pMessage ); >extern void umon_free ( UMON_HANDLE handle ); >extern OSI_RETCODE umon_read_header ( OSI_SOCKET sock, UMON_NET_STR *header, OSI_MEM_STR *mem, OSI_BOOL *swapped ); >extern OSI_RETCODE umon_send_header ( OSI_SOCKET sock, const UMON_NET_STR *header, const void * buf, size_t size ); > > > > > > > } ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/alarms.h" 1 ># 12 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/alarms.h" >extern "C" { ># 41 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/alarms.h" >typedef enum{ > ALARM_STATUS_TYPE_NONE = 0, > ALARM_STATUS_TYPE_RETURN_TO_NORMAL = 1, > ALARM_STATUS_TYPE_ABNORMAL = 2 >} ALARM_STATUS_TYPE_ENUM; ># 82 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/alarms.h" >typedef struct ALARM_INFO_tag >{ > OSI_DATABASE alarm_D; > OSI_OBJECT alarm_O; > OSI_FIELD alarm_F; > OSI_RECORD alarm_R; > OSI_INDEX alarm_I; > OSI_UINT16 alarm_class; > OSI_BYTE aor_group; > OSI_CHAR station_name[ 33 ]; > OSI_INT16 station_number; > OSI_CHAR source[ 65 ]; > OSI_CHAR event[ 60 ]; > OSI_CHAR value_str[ 16 ]; > OSI_UINT32 alarm_time; > OSI_UINT16 status_type; > OSI_CHAR identifier_string[ 256 ]; >} ALARM_INFO_STR; > >typedef struct _OSI_REMOTE_CC_INFO { > OSI_INT32 port; > OSI_CHAR rhost[4][256]; > OSI_UINT16 active; >} OSI_REMOTE_CC_INFO; ># 128 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/alarms.h" >OSI_RETCODE ALARMS_send_alarm( ALARM_INFO_STR *alarm_info, OSI_INT16 alarm_type ); >OSI_RETCODE ALARMS_send_alarm_remote( ALARM_INFO_STR * palarm_info, OSI_INT16 alarm_type , OSI_REMOTE_CC_INFO * rcc); > > > >} ># 11 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_types.h" 1 > > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" 1 ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 1 ># 39 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" 1 ># 19 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 1 ># 36 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" 1 ># 52 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ptypes.h" 1 ># 25 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ptypes.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/platform.h" 1 ># 26 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ptypes.h" 2 ># 53 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" 2 > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 147 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 3 4 >typedef long int ptrdiff_t; ># 422 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/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)))); >} max_align_t; > > > > > > > typedef decltype(nullptr) nullptr_t; ># 60 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" 2 ># 219 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" >typedef int8_t UBool; ># 316 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" > typedef uint16_t UChar; ># 336 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" >typedef int32_t UChar32; ># 372 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urename.h" 1 ># 35 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urename.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" 1 ># 36 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urename.h" 2 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uvernum.h" 1 ># 41 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urename.h" 2 ># 373 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/umachine.h" 2 ># 37 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" 1 ># 111 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 1 ># 112 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" 2 ># 230 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" 1 ># 60 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" >extern "C" const uint8_t > >utf8_countTrailBytes_44[256]; ># 91 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" >extern "C" __attribute__((visibility("default"))) UChar32 >utf8_nextCharSafeBody_44(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict); ># 103 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" >extern "C" __attribute__((visibility("default"))) int32_t >utf8_appendCharSafeBody_44(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError); ># 115 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" >extern "C" __attribute__((visibility("default"))) UChar32 >utf8_prevCharSafeBody_44(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict); ># 127 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf8.h" >extern "C" __attribute__((visibility("default"))) int32_t >utf8_back1SafeBody_44(const uint8_t *s, int32_t start, int32_t i); ># 231 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf16.h" 1 ># 232 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" 2 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf_old.h" 1 ># 235 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utf.h" 2 ># 38 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" 1 ># 57 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" >typedef uint8_t UVersionInfo[4]; ># 109 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" > namespace icu_44 { } > namespace icu = icu_44; ># 122 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" > using namespace icu_44; ># 152 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" >extern "C" __attribute__((visibility("default"))) void >u_versionFromString_44(UVersionInfo versionArray, const char *versionString); ># 166 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" >extern "C" __attribute__((visibility("default"))) void >u_versionFromUString_44(UVersionInfo versionArray, const UChar *versionString); ># 182 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" >extern "C" __attribute__((visibility("default"))) void >u_versionToString_44(UVersionInfo versionArray, char *versionString); ># 193 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uversion.h" >extern "C" __attribute__((visibility("default"))) void >u_getVersion_44(UVersionInfo versionArray); ># 39 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uconfig.h" 1 ># 40 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" 2 ># 307 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" >typedef double UDate; ># 365 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" >typedef void* UClassID; ># 619 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" >typedef enum UErrorCode { > > > > > > U_USING_FALLBACK_WARNING = -128, > > U_ERROR_WARNING_START = -128, > > U_USING_DEFAULT_WARNING = -127, > > U_SAFECLONE_ALLOCATED_WARNING = -126, > > U_STATE_OLD_WARNING = -125, > > U_STRING_NOT_TERMINATED_WARNING = -124, > > U_SORT_KEY_TOO_SHORT_WARNING = -123, > > U_AMBIGUOUS_ALIAS_WARNING = -122, > > U_DIFFERENT_UCA_VERSION = -121, > > U_PLUGIN_CHANGED_LEVEL_WARNING = -120, > > U_ERROR_WARNING_LIMIT, > > > U_ZERO_ERROR = 0, > > U_ILLEGAL_ARGUMENT_ERROR = 1, > U_MISSING_RESOURCE_ERROR = 2, > U_INVALID_FORMAT_ERROR = 3, > U_FILE_ACCESS_ERROR = 4, > U_INTERNAL_PROGRAM_ERROR = 5, > U_MESSAGE_PARSE_ERROR = 6, > U_MEMORY_ALLOCATION_ERROR = 7, > U_INDEX_OUTOFBOUNDS_ERROR = 8, > U_PARSE_ERROR = 9, > U_INVALID_CHAR_FOUND = 10, > U_TRUNCATED_CHAR_FOUND = 11, > U_ILLEGAL_CHAR_FOUND = 12, > U_INVALID_TABLE_FORMAT = 13, > U_INVALID_TABLE_FILE = 14, > U_BUFFER_OVERFLOW_ERROR = 15, > U_UNSUPPORTED_ERROR = 16, > U_RESOURCE_TYPE_MISMATCH = 17, > U_ILLEGAL_ESCAPE_SEQUENCE = 18, > U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, > U_NO_SPACE_AVAILABLE = 20, > U_CE_NOT_FOUND_ERROR = 21, > U_PRIMARY_TOO_LONG_ERROR = 22, > U_STATE_TOO_OLD_ERROR = 23, > U_TOO_MANY_ALIASES_ERROR = 24, > > U_ENUM_OUT_OF_SYNC_ERROR = 25, > U_INVARIANT_CONVERSION_ERROR = 26, > U_INVALID_STATE_ERROR = 27, > U_COLLATOR_VERSION_MISMATCH = 28, > U_USELESS_COLLATOR_ERROR = 29, > U_NO_WRITE_PERMISSION = 30, > > U_STANDARD_ERROR_LIMIT, > > > > U_BAD_VARIABLE_DEFINITION=0x10000, > U_PARSE_ERROR_START = 0x10000, > U_MALFORMED_RULE, > U_MALFORMED_SET, > U_MALFORMED_SYMBOL_REFERENCE, > U_MALFORMED_UNICODE_ESCAPE, > U_MALFORMED_VARIABLE_DEFINITION, > U_MALFORMED_VARIABLE_REFERENCE, > U_MISMATCHED_SEGMENT_DELIMITERS, > U_MISPLACED_ANCHOR_START, > U_MISPLACED_CURSOR_OFFSET, > U_MISPLACED_QUANTIFIER, > U_MISSING_OPERATOR, > U_MISSING_SEGMENT_CLOSE, > U_MULTIPLE_ANTE_CONTEXTS, > U_MULTIPLE_CURSORS, > U_MULTIPLE_POST_CONTEXTS, > U_TRAILING_BACKSLASH, > U_UNDEFINED_SEGMENT_REFERENCE, > U_UNDEFINED_VARIABLE, > U_UNQUOTED_SPECIAL, > U_UNTERMINATED_QUOTE, > U_RULE_MASK_ERROR, > U_MISPLACED_COMPOUND_FILTER, > U_MULTIPLE_COMPOUND_FILTERS, > U_INVALID_RBT_SYNTAX, > U_INVALID_PROPERTY_PATTERN, > U_MALFORMED_PRAGMA, > U_UNCLOSED_SEGMENT, > U_ILLEGAL_CHAR_IN_SEGMENT, > U_VARIABLE_RANGE_EXHAUSTED, > U_VARIABLE_RANGE_OVERLAP, > U_ILLEGAL_CHARACTER, > U_INTERNAL_TRANSLITERATOR_ERROR, > U_INVALID_ID, > U_INVALID_FUNCTION, > U_PARSE_ERROR_LIMIT, > > > > > U_UNEXPECTED_TOKEN=0x10100, > U_FMT_PARSE_ERROR_START=0x10100, > U_MULTIPLE_DECIMAL_SEPARATORS, > U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, > U_MULTIPLE_EXPONENTIAL_SYMBOLS, > U_MALFORMED_EXPONENTIAL_PATTERN, > U_MULTIPLE_PERCENT_SYMBOLS, > U_MULTIPLE_PERMILL_SYMBOLS, > U_MULTIPLE_PAD_SPECIFIERS, > U_PATTERN_SYNTAX_ERROR, > U_ILLEGAL_PAD_POSITION, > U_UNMATCHED_BRACES, > U_UNSUPPORTED_PROPERTY, > U_UNSUPPORTED_ATTRIBUTE, > U_ARGUMENT_TYPE_MISMATCH, > U_DUPLICATE_KEYWORD, > U_UNDEFINED_KEYWORD, > U_DEFAULT_KEYWORD_MISSING, > U_DECIMAL_NUMBER_SYNTAX_ERROR, > U_FMT_PARSE_ERROR_LIMIT, > > > > > U_BRK_INTERNAL_ERROR=0x10200, > U_BRK_ERROR_START=0x10200, > U_BRK_HEX_DIGITS_EXPECTED, > U_BRK_SEMICOLON_EXPECTED, > U_BRK_RULE_SYNTAX, > U_BRK_UNCLOSED_SET, > U_BRK_ASSIGN_ERROR, > U_BRK_VARIABLE_REDFINITION, > U_BRK_MISMATCHED_PAREN, > U_BRK_NEW_LINE_IN_QUOTED_STRING, > U_BRK_UNDEFINED_VARIABLE, > U_BRK_INIT_ERROR, > U_BRK_RULE_EMPTY_SET, > U_BRK_UNRECOGNIZED_OPTION, > U_BRK_MALFORMED_RULE_TAG, > U_BRK_ERROR_LIMIT, > > > > > U_REGEX_INTERNAL_ERROR=0x10300, > U_REGEX_ERROR_START=0x10300, > U_REGEX_RULE_SYNTAX, > U_REGEX_INVALID_STATE, > U_REGEX_BAD_ESCAPE_SEQUENCE, > U_REGEX_PROPERTY_SYNTAX, > U_REGEX_UNIMPLEMENTED, > U_REGEX_MISMATCHED_PAREN, > U_REGEX_NUMBER_TOO_BIG, > U_REGEX_BAD_INTERVAL, > U_REGEX_MAX_LT_MIN, > U_REGEX_INVALID_BACK_REF, > U_REGEX_INVALID_FLAG, > U_REGEX_LOOK_BEHIND_LIMIT, > U_REGEX_SET_CONTAINS_STRING, > U_REGEX_OCTAL_TOO_BIG, > U_REGEX_MISSING_CLOSE_BRACKET, > U_REGEX_INVALID_RANGE, > U_REGEX_STACK_OVERFLOW, > U_REGEX_TIME_OUT, > U_REGEX_STOPPED_BY_CALLER, > U_REGEX_ERROR_LIMIT, > > > > > U_IDNA_PROHIBITED_ERROR=0x10400, > U_IDNA_ERROR_START=0x10400, > U_IDNA_UNASSIGNED_ERROR, > U_IDNA_CHECK_BIDI_ERROR, > U_IDNA_STD3_ASCII_RULES_ERROR, > U_IDNA_ACE_PREFIX_ERROR, > U_IDNA_VERIFICATION_ERROR, > U_IDNA_LABEL_TOO_LONG_ERROR, > U_IDNA_ZERO_LENGTH_LABEL_ERROR, > U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR, > U_IDNA_ERROR_LIMIT, > > > > U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR, > U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR, > U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR, > > > > > U_PLUGIN_ERROR_START=0x10500, > U_PLUGIN_TOO_HIGH=0x10500, > U_PLUGIN_DIDNT_SET_LEVEL, > U_PLUGIN_ERROR_LIMIT, > > U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT >} UErrorCode; ># 834 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" > static > inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); } > > > > > static > inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); } ># 861 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utypes.h" >extern "C" __attribute__((visibility("default"))) const char * >u_errorName_44(UErrorCode code); ># 20 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" 1 ># 73 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) const char* u_getDataDirectory_44(void); ># 94 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) void u_setDataDirectory_44(const char *directory); ># 105 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) const char* uprv_getDefaultCodepage_44(void); ># 117 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) const char* uprv_getDefaultLocaleID_44(void); ># 168 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) void >u_charsToUChars_44(const char *cs, UChar *us, int32_t length); ># 190 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/putil.h" >extern "C" __attribute__((visibility("default"))) void >u_UCharsToChars_44(const UChar *us, char *cs, int32_t length); ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" 1 ># 30 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > extern "C++" { namespace icu_44 { > > class CharacterIterator; > class Replaceable; > > } } > > >extern "C" { > >struct UCharIterator; >typedef struct UCharIterator UCharIterator; > > > > > > > >typedef enum UCharIteratorOrigin { > UITER_START, UITER_CURRENT, UITER_LIMIT, UITER_ZERO, UITER_LENGTH >} UCharIteratorOrigin; > > >enum { ># 69 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UITER_UNKNOWN_INDEX=-2 >}; ># 104 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef int32_t >UCharIteratorGetIndex(UCharIterator *iter, UCharIteratorOrigin origin); ># 141 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef int32_t >UCharIteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin); ># 156 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef UBool >UCharIteratorHasNext(UCharIterator *iter); ># 170 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef UBool >UCharIteratorHasPrevious(UCharIterator *iter); ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef UChar32 >UCharIteratorCurrent(UCharIterator *iter); ># 201 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef UChar32 >UCharIteratorNext(UCharIterator *iter); ># 217 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef UChar32 >UCharIteratorPrevious(UCharIterator *iter); ># 231 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef int32_t >UCharIteratorReserved(UCharIterator *iter, int32_t something); ># 278 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef uint32_t >UCharIteratorGetState(const UCharIterator *iter); ># 306 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >typedef void >UCharIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); ># 339 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >struct UCharIterator { > > > > > > const void *context; > > > > > > > int32_t length; > > > > > > > int32_t start; > > > > > > > int32_t index; > > > > > > > int32_t limit; > > > > > > int32_t reservedField; ># 388 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorGetIndex *getIndex; ># 399 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorMove *move; ># 408 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorHasNext *hasNext; > > > > > > > > UCharIteratorHasPrevious *hasPrevious; ># 425 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorCurrent *current; ># 435 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorNext *next; ># 445 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorPrevious *previous; > > > > > > > > UCharIteratorReserved *reservedFn; ># 462 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorGetState *getState; ># 472 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" > UCharIteratorSetState *setState; >}; ># 493 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) UChar32 >uiter_current32_44(UCharIterator *iter); ># 510 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) UChar32 >uiter_next32_44(UCharIterator *iter); ># 527 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) UChar32 >uiter_previous32_44(UCharIterator *iter); ># 548 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) uint32_t >uiter_getState_44(const UCharIterator *iter); ># 566 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setState_44(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode); ># 591 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setString_44(UCharIterator *iter, const UChar *s, int32_t length); ># 614 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setUTF16BE_44(UCharIterator *iter, const char *s, int32_t length); ># 650 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setUTF8_44(UCharIterator *iter, const char *s, int32_t length); ># 675 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setCharacterIterator_44(UCharIterator *iter, icu_44:: CharacterIterator *charIter); ># 700 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uiter.h" >extern "C" __attribute__((visibility("default"))) void >uiter_setReplaceable_44(UCharIterator *iter, const icu_44:: Replaceable *rep); > > > >} ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" 2 > > > > > typedef struct UBreakIterator UBreakIterator; ># 85 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strlen_44(const UChar *s); ># 102 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_countChar32_44(const UChar *s, int32_t length); ># 123 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UBool >u_strHasMoreChar32Than_44(const UChar *s, int32_t length, int32_t number); ># 136 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strcat_44(UChar *dst, > const UChar *src); ># 154 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strncat_44(UChar *dst, > const UChar *src, > int32_t n); ># 179 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strstr_44(const UChar *s, const UChar *substring); ># 203 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strFindFirst_44(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); ># 223 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strchr_44(const UChar *s, UChar c); ># 243 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strchr32_44(const UChar *s, UChar32 c); ># 266 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strrstr_44(const UChar *s, const UChar *substring); ># 290 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strFindLast_44(const UChar *s, int32_t length, const UChar *substring, int32_t subLength); ># 310 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strrchr_44(const UChar *s, UChar c); ># 330 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strrchr32_44(const UChar *s, UChar32 c); ># 345 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strpbrk_44(const UChar *string, const UChar *matchSet); ># 361 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strcspn_44(const UChar *string, const UChar *matchSet); ># 377 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strspn_44(const UChar *string, const UChar *matchSet); ># 405 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strtok_r_44(UChar *src, > const UChar *delim, > UChar **saveState); ># 420 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strcmp_44(const UChar *s1, > const UChar *s2); ># 435 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strcmpCodePointOrder_44(const UChar *s1, const UChar *s2); ># 465 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strCompare_44(const UChar *s1, int32_t length1, > const UChar *s2, int32_t length2, > UBool codePointOrder); ># 490 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strCompareIter_44(UCharIterator *iter1, UCharIterator *iter2, UBool codePointOrder); ># 543 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strCaseCompare_44(const UChar *s1, int32_t length1, > const UChar *s2, int32_t length2, > uint32_t options, > UErrorCode *pErrorCode); ># 561 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strncmp_44(const UChar *ucs1, > const UChar *ucs2, > int32_t n); ># 579 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strncmpCodePointOrder_44(const UChar *s1, const UChar *s2, int32_t n); ># 601 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strcasecmp_44(const UChar *s1, const UChar *s2, uint32_t options); ># 625 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strncasecmp_44(const UChar *s1, const UChar *s2, int32_t n, uint32_t options); ># 649 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_memcasecmp_44(const UChar *s1, const UChar *s2, int32_t length, uint32_t options); ># 660 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strcpy_44(UChar *dst, > const UChar *src); ># 675 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strncpy_44(UChar *dst, > const UChar *src, > int32_t n); ># 692 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* u_uastrcpy_44(UChar *dst, > const char *src ); ># 707 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* u_uastrncpy_44(UChar *dst, > const char *src, > int32_t n); ># 721 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) char* u_austrcpy_44(char *dst, > const UChar *src ); ># 736 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) char* u_austrncpy_44(char *dst, > const UChar *src, > int32_t n ); ># 750 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memcpy_44(UChar *dest, const UChar *src, int32_t count); ># 761 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memmove_44(UChar *dest, const UChar *src, int32_t count); ># 773 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memset_44(UChar *dest, UChar c, int32_t count); ># 787 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_memcmp_44(const UChar *buf1, const UChar *buf2, int32_t count); ># 803 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_memcmpCodePointOrder_44(const UChar *s1, const UChar *s2, int32_t count); ># 823 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memchr_44(const UChar *s, UChar c, int32_t count); ># 843 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memchr32_44(const UChar *s, UChar32 c, int32_t count); ># 863 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memrchr_44(const UChar *s, UChar c, int32_t count); ># 883 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_memrchr32_44(const UChar *s, UChar32 c, int32_t count); ># 1001 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_unescape_44(const char *src, > UChar *dest, int32_t destCapacity); > >extern "C" { ># 1018 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >typedef UChar ( *UNESCAPE_CHAR_AT)(int32_t offset, void *context); >} ># 1049 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_unescapeAt_44(UNESCAPE_CHAR_AT charAt, > int32_t *offset, > int32_t length, > void *context); ># 1075 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strToUpper_44(UChar *dest, int32_t destCapacity, > const UChar *src, int32_t srcLength, > const char *locale, > UErrorCode *pErrorCode); ># 1101 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strToLower_44(UChar *dest, int32_t destCapacity, > const UChar *src, int32_t srcLength, > const char *locale, > UErrorCode *pErrorCode); ># 1147 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strToTitle_44(UChar *dest, int32_t destCapacity, > const UChar *src, int32_t srcLength, > UBreakIterator *titleIter, > const char *locale, > UErrorCode *pErrorCode); ># 1178 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_strFoldCase_44(UChar *dest, int32_t destCapacity, > const UChar *src, int32_t srcLength, > uint32_t options, > UErrorCode *pErrorCode); ># 1207 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) wchar_t* >u_strToWCS_44(wchar_t *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1236 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromWCS_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const wchar_t *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1267 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) char* >u_strToUTF8_44(char *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1297 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromUTF8_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const char *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1341 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) char* >u_strToUTF8WithSub_44(char *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UChar32 subchar, int32_t *pNumSubstitutions, > UErrorCode *pErrorCode); ># 1387 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromUTF8WithSub_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const char *src, > int32_t srcLength, > UChar32 subchar, int32_t *pNumSubstitutions, > UErrorCode *pErrorCode); ># 1447 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar * >u_strFromUTF8Lenient_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const char *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1477 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar32* >u_strToUTF32_44(UChar32 *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1507 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromUTF32_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar32 *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1551 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar32* >u_strToUTF32WithSub_44(UChar32 *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UChar32 subchar, int32_t *pNumSubstitutions, > UErrorCode *pErrorCode); ># 1596 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromUTF32WithSub_44(UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar32 *src, > int32_t srcLength, > UChar32 subchar, int32_t *pNumSubstitutions, > UErrorCode *pErrorCode); ># 1637 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) char* >u_strToJavaModifiedUTF8_44( > char *dest, > int32_t destCapacity, > int32_t *pDestLength, > const UChar *src, > int32_t srcLength, > UErrorCode *pErrorCode); ># 1686 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustring.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_strFromJavaModifiedUTF8WithSub_44( > UChar *dest, > int32_t destCapacity, > int32_t *pDestLength, > const char *src, > int32_t srcLength, > UChar32 subchar, int32_t *pNumSubstitutions, > UErrorCode *pErrorCode); ># 40 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" 1 ># 28 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" { ># 174 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UProperty { ># 186 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" > UCHAR_ALPHABETIC=0, > > UCHAR_BINARY_START=UCHAR_ALPHABETIC, > > UCHAR_ASCII_HEX_DIGIT=1, > > > > UCHAR_BIDI_CONTROL=2, > > > > > UCHAR_BIDI_MIRRORED=3, > > UCHAR_DASH=4, > > > > UCHAR_DEFAULT_IGNORABLE_CODE_POINT=5, > > > UCHAR_DEPRECATED=6, > > > UCHAR_DIACRITIC=7, > > > > UCHAR_EXTENDER=8, > > > > UCHAR_FULL_COMPOSITION_EXCLUSION=9, > > > > UCHAR_GRAPHEME_BASE=10, > > > > UCHAR_GRAPHEME_EXTEND=11, > > > UCHAR_GRAPHEME_LINK=12, > > > UCHAR_HEX_DIGIT=13, > > > UCHAR_HYPHEN=14, > > > > > UCHAR_ID_CONTINUE=15, > > > > UCHAR_ID_START=16, > > > UCHAR_IDEOGRAPHIC=17, > > > > UCHAR_IDS_BINARY_OPERATOR=18, > > > > UCHAR_IDS_TRINARY_OPERATOR=19, > > > UCHAR_JOIN_CONTROL=20, > > > > UCHAR_LOGICAL_ORDER_EXCEPTION=21, > > > UCHAR_LOWERCASE=22, > > UCHAR_MATH=23, > > > > UCHAR_NONCHARACTER_CODE_POINT=24, > > UCHAR_QUOTATION_MARK=25, > > > > UCHAR_RADICAL=26, > > > > > UCHAR_SOFT_DOTTED=27, > > > > UCHAR_TERMINAL_PUNCTUATION=28, > > > > UCHAR_UNIFIED_IDEOGRAPH=29, > > > UCHAR_UPPERCASE=30, > > > > UCHAR_WHITE_SPACE=31, > > > > UCHAR_XID_CONTINUE=32, > > > UCHAR_XID_START=33, > > > > UCHAR_CASE_SENSITIVE=34, > > > > > UCHAR_S_TERM=35, > > > > > > UCHAR_VARIATION_SELECTOR=36, > > > > > > > UCHAR_NFD_INERT=37, > > > > > > > UCHAR_NFKD_INERT=38, > > > > > > > UCHAR_NFC_INERT=39, > > > > > > > UCHAR_NFKC_INERT=40, ># 359 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" > UCHAR_SEGMENT_STARTER=41, > > > > > UCHAR_PATTERN_SYNTAX=42, > > > > > UCHAR_PATTERN_WHITE_SPACE=43, > > > > > UCHAR_POSIX_ALNUM=44, > > > > > UCHAR_POSIX_BLANK=45, > > > > > UCHAR_POSIX_GRAPH=46, > > > > > UCHAR_POSIX_PRINT=47, > > > > > UCHAR_POSIX_XDIGIT=48, > > UCHAR_CASED=49, > > UCHAR_CASE_IGNORABLE=50, > > UCHAR_CHANGES_WHEN_LOWERCASED=51, > > UCHAR_CHANGES_WHEN_UPPERCASED=52, > > UCHAR_CHANGES_WHEN_TITLECASED=53, > > UCHAR_CHANGES_WHEN_CASEFOLDED=54, > > UCHAR_CHANGES_WHEN_CASEMAPPED=55, > > UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56, > > UCHAR_BINARY_LIMIT=57, > > > > UCHAR_BIDI_CLASS=0x1000, > > UCHAR_INT_START=UCHAR_BIDI_CLASS, > > > UCHAR_BLOCK=0x1001, > > > UCHAR_CANONICAL_COMBINING_CLASS=0x1002, > > > UCHAR_DECOMPOSITION_TYPE=0x1003, > > > > UCHAR_EAST_ASIAN_WIDTH=0x1004, > > > UCHAR_GENERAL_CATEGORY=0x1005, > > > UCHAR_JOINING_GROUP=0x1006, > > > UCHAR_JOINING_TYPE=0x1007, > > > UCHAR_LINE_BREAK=0x1008, > > > UCHAR_NUMERIC_TYPE=0x1009, > > > UCHAR_SCRIPT=0x100A, > > > UCHAR_HANGUL_SYLLABLE_TYPE=0x100B, > > > UCHAR_NFD_QUICK_CHECK=0x100C, > > > UCHAR_NFKD_QUICK_CHECK=0x100D, > > > UCHAR_NFC_QUICK_CHECK=0x100E, > > > UCHAR_NFKC_QUICK_CHECK=0x100F, > > > > > > > UCHAR_LEAD_CANONICAL_COMBINING_CLASS=0x1010, > > > > > > > UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011, > > > > > UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012, > > > > > UCHAR_SENTENCE_BREAK=0x1013, > > > > > UCHAR_WORD_BREAK=0x1014, > > UCHAR_INT_LIMIT=0x1015, ># 505 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" > UCHAR_GENERAL_CATEGORY_MASK=0x2000, > > UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK, > > UCHAR_MASK_LIMIT=0x2001, > > > > UCHAR_NUMERIC_VALUE=0x3000, > > UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE, > > UCHAR_DOUBLE_LIMIT=0x3001, > > > > UCHAR_AGE=0x4000, > > UCHAR_STRING_START=UCHAR_AGE, > > > UCHAR_BIDI_MIRRORING_GLYPH=0x4001, > > > UCHAR_CASE_FOLDING=0x4002, > > > UCHAR_ISO_COMMENT=0x4003, > > > UCHAR_LOWERCASE_MAPPING=0x4004, > > > UCHAR_NAME=0x4005, > > > UCHAR_SIMPLE_CASE_FOLDING=0x4006, > > > UCHAR_SIMPLE_LOWERCASE_MAPPING=0x4007, > > > UCHAR_SIMPLE_TITLECASE_MAPPING=0x4008, > > > UCHAR_SIMPLE_UPPERCASE_MAPPING=0x4009, > > > UCHAR_TITLECASE_MAPPING=0x400A, > > > UCHAR_UNICODE_1_NAME=0x400B, > > > UCHAR_UPPERCASE_MAPPING=0x400C, > > UCHAR_STRING_LIMIT=0x400D, > > > UCHAR_INVALID_CODE = -1 >} UProperty; > > > > > > >typedef enum UCharCategory >{ > > > > U_UNASSIGNED = 0, > > U_GENERAL_OTHER_TYPES = 0, > > U_UPPERCASE_LETTER = 1, > > U_LOWERCASE_LETTER = 2, > > U_TITLECASE_LETTER = 3, > > U_MODIFIER_LETTER = 4, > > U_OTHER_LETTER = 5, > > U_NON_SPACING_MARK = 6, > > U_ENCLOSING_MARK = 7, > > U_COMBINING_SPACING_MARK = 8, > > U_DECIMAL_DIGIT_NUMBER = 9, > > U_LETTER_NUMBER = 10, > > U_OTHER_NUMBER = 11, > > U_SPACE_SEPARATOR = 12, > > U_LINE_SEPARATOR = 13, > > U_PARAGRAPH_SEPARATOR = 14, > > U_CONTROL_CHAR = 15, > > U_FORMAT_CHAR = 16, > > U_PRIVATE_USE_CHAR = 17, > > U_SURROGATE = 18, > > U_DASH_PUNCTUATION = 19, > > U_START_PUNCTUATION = 20, > > U_END_PUNCTUATION = 21, > > U_CONNECTOR_PUNCTUATION = 22, > > U_OTHER_PUNCTUATION = 23, > > U_MATH_SYMBOL = 24, > > U_CURRENCY_SYMBOL = 25, > > U_MODIFIER_SYMBOL = 26, > > U_OTHER_SYMBOL = 27, > > U_INITIAL_PUNCTUATION = 28, > > U_FINAL_PUNCTUATION = 29, > > U_CHAR_CATEGORY_COUNT >} UCharCategory; ># 758 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UCharDirection { > > > > U_LEFT_TO_RIGHT = 0, > > U_RIGHT_TO_LEFT = 1, > > U_EUROPEAN_NUMBER = 2, > > U_EUROPEAN_NUMBER_SEPARATOR = 3, > > U_EUROPEAN_NUMBER_TERMINATOR = 4, > > U_ARABIC_NUMBER = 5, > > U_COMMON_NUMBER_SEPARATOR = 6, > > U_BLOCK_SEPARATOR = 7, > > U_SEGMENT_SEPARATOR = 8, > > U_WHITE_SPACE_NEUTRAL = 9, > > U_OTHER_NEUTRAL = 10, > > U_LEFT_TO_RIGHT_EMBEDDING = 11, > > U_LEFT_TO_RIGHT_OVERRIDE = 12, > > U_RIGHT_TO_LEFT_ARABIC = 13, > > U_RIGHT_TO_LEFT_EMBEDDING = 14, > > U_RIGHT_TO_LEFT_OVERRIDE = 15, > > U_POP_DIRECTIONAL_FORMAT = 16, > > U_DIR_NON_SPACING_MARK = 17, > > U_BOUNDARY_NEUTRAL = 18, > > U_CHAR_DIRECTION_COUNT >} UCharDirection; > > > > > >enum UBlockCode { > > > UBLOCK_NO_BLOCK = 0, > > > UBLOCK_BASIC_LATIN = 1, > > > UBLOCK_LATIN_1_SUPPLEMENT=2, > > > UBLOCK_LATIN_EXTENDED_A =3, > > > UBLOCK_LATIN_EXTENDED_B =4, > > > UBLOCK_IPA_EXTENSIONS =5, > > > UBLOCK_SPACING_MODIFIER_LETTERS =6, > > > UBLOCK_COMBINING_DIACRITICAL_MARKS =7, > > > > > > UBLOCK_GREEK =8, > > > UBLOCK_CYRILLIC =9, > > > UBLOCK_ARMENIAN =10, > > > UBLOCK_HEBREW =11, > > > UBLOCK_ARABIC =12, > > > UBLOCK_SYRIAC =13, > > > UBLOCK_THAANA =14, > > > UBLOCK_DEVANAGARI =15, > > > UBLOCK_BENGALI =16, > > > UBLOCK_GURMUKHI =17, > > > UBLOCK_GUJARATI =18, > > > UBLOCK_ORIYA =19, > > > UBLOCK_TAMIL =20, > > > UBLOCK_TELUGU =21, > > > UBLOCK_KANNADA =22, > > > UBLOCK_MALAYALAM =23, > > > UBLOCK_SINHALA =24, > > > UBLOCK_THAI =25, > > > UBLOCK_LAO =26, > > > UBLOCK_TIBETAN =27, > > > UBLOCK_MYANMAR =28, > > > UBLOCK_GEORGIAN =29, > > > UBLOCK_HANGUL_JAMO =30, > > > UBLOCK_ETHIOPIC =31, > > > UBLOCK_CHEROKEE =32, > > > UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, > > > UBLOCK_OGHAM =34, > > > UBLOCK_RUNIC =35, > > > UBLOCK_KHMER =36, > > > UBLOCK_MONGOLIAN =37, > > > UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, > > > UBLOCK_GREEK_EXTENDED =39, > > > UBLOCK_GENERAL_PUNCTUATION =40, > > > UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, > > > UBLOCK_CURRENCY_SYMBOLS =42, > > > > > > UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, > > > UBLOCK_LETTERLIKE_SYMBOLS =44, > > > UBLOCK_NUMBER_FORMS =45, > > > UBLOCK_ARROWS =46, > > > UBLOCK_MATHEMATICAL_OPERATORS =47, > > > UBLOCK_MISCELLANEOUS_TECHNICAL =48, > > > UBLOCK_CONTROL_PICTURES =49, > > > UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, > > > UBLOCK_ENCLOSED_ALPHANUMERICS =51, > > > UBLOCK_BOX_DRAWING =52, > > > UBLOCK_BLOCK_ELEMENTS =53, > > > UBLOCK_GEOMETRIC_SHAPES =54, > > > UBLOCK_MISCELLANEOUS_SYMBOLS =55, > > > UBLOCK_DINGBATS =56, > > > UBLOCK_BRAILLE_PATTERNS =57, > > > UBLOCK_CJK_RADICALS_SUPPLEMENT =58, > > > UBLOCK_KANGXI_RADICALS =59, > > > UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, > > > UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, > > > UBLOCK_HIRAGANA =62, > > > UBLOCK_KATAKANA =63, > > > UBLOCK_BOPOMOFO =64, > > > UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, > > > UBLOCK_KANBUN =66, > > > UBLOCK_BOPOMOFO_EXTENDED =67, > > > UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, > > > UBLOCK_CJK_COMPATIBILITY =69, > > > UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, > > > UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, > > > UBLOCK_YI_SYLLABLES =72, > > > UBLOCK_YI_RADICALS =73, > > > UBLOCK_HANGUL_SYLLABLES =74, > > > UBLOCK_HIGH_SURROGATES =75, > > > UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, > > > UBLOCK_LOW_SURROGATES =77, ># 1058 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" > UBLOCK_PRIVATE_USE = 78, ># 1068 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" > UBLOCK_PRIVATE_USE_AREA =UBLOCK_PRIVATE_USE, > > > UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, > > > UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, > > > UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, > > > UBLOCK_COMBINING_HALF_MARKS =82, > > > UBLOCK_CJK_COMPATIBILITY_FORMS =83, > > > UBLOCK_SMALL_FORM_VARIANTS =84, > > > UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, > > > UBLOCK_SPECIALS =86, > > > UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, > > > > > UBLOCK_OLD_ITALIC = 88 , > > UBLOCK_GOTHIC = 89 , > > UBLOCK_DESERET = 90 , > > UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91 , > > UBLOCK_MUSICAL_SYMBOLS = 92 , > > UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93 , > > UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94 , > > UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95 , > > UBLOCK_TAGS = 96, > > > > > > > > UBLOCK_CYRILLIC_SUPPLEMENTARY = 97, > > UBLOCK_CYRILLIC_SUPPLEMENT = UBLOCK_CYRILLIC_SUPPLEMENTARY, > > UBLOCK_TAGALOG = 98, > > UBLOCK_HANUNOO = 99, > > UBLOCK_BUHID = 100, > > UBLOCK_TAGBANWA = 101, > > UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, > > UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, > > UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, > > UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, > > UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, > > UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, > > UBLOCK_VARIATION_SELECTORS = 108, > > UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, > > UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, > > > > > UBLOCK_LIMBU = 111, > > UBLOCK_TAI_LE = 112, > > UBLOCK_KHMER_SYMBOLS = 113, > > UBLOCK_PHONETIC_EXTENSIONS = 114, > > UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, > > UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, > > UBLOCK_LINEAR_B_SYLLABARY = 117, > > UBLOCK_LINEAR_B_IDEOGRAMS = 118, > > UBLOCK_AEGEAN_NUMBERS = 119, > > UBLOCK_UGARITIC = 120, > > UBLOCK_SHAVIAN = 121, > > UBLOCK_OSMANYA = 122, > > UBLOCK_CYPRIOT_SYLLABARY = 123, > > UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, > > UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, > > > > > UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, > > UBLOCK_ANCIENT_GREEK_NUMBERS = 127, > > UBLOCK_ARABIC_SUPPLEMENT = 128, > > UBLOCK_BUGINESE = 129, > > UBLOCK_CJK_STROKES = 130, > > UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, > > UBLOCK_COPTIC = 132, > > UBLOCK_ETHIOPIC_EXTENDED = 133, > > UBLOCK_ETHIOPIC_SUPPLEMENT = 134, > > UBLOCK_GEORGIAN_SUPPLEMENT = 135, > > UBLOCK_GLAGOLITIC = 136, > > UBLOCK_KHAROSHTHI = 137, > > UBLOCK_MODIFIER_TONE_LETTERS = 138, > > UBLOCK_NEW_TAI_LUE = 139, > > UBLOCK_OLD_PERSIAN = 140, > > UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, > > UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, > > UBLOCK_SYLOTI_NAGRI = 143, > > UBLOCK_TIFINAGH = 144, > > UBLOCK_VERTICAL_FORMS = 145, > > > > > UBLOCK_NKO = 146, > > UBLOCK_BALINESE = 147, > > UBLOCK_LATIN_EXTENDED_C = 148, > > UBLOCK_LATIN_EXTENDED_D = 149, > > UBLOCK_PHAGS_PA = 150, > > UBLOCK_PHOENICIAN = 151, > > UBLOCK_CUNEIFORM = 152, > > UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, > > UBLOCK_COUNTING_ROD_NUMERALS = 154, > > > > > UBLOCK_SUNDANESE = 155, > > UBLOCK_LEPCHA = 156, > > UBLOCK_OL_CHIKI = 157, > > UBLOCK_CYRILLIC_EXTENDED_A = 158, > > UBLOCK_VAI = 159, > > UBLOCK_CYRILLIC_EXTENDED_B = 160, > > UBLOCK_SAURASHTRA = 161, > > UBLOCK_KAYAH_LI = 162, > > UBLOCK_REJANG = 163, > > UBLOCK_CHAM = 164, > > UBLOCK_ANCIENT_SYMBOLS = 165, > > UBLOCK_PHAISTOS_DISC = 166, > > UBLOCK_LYCIAN = 167, > > UBLOCK_CARIAN = 168, > > UBLOCK_LYDIAN = 169, > > UBLOCK_MAHJONG_TILES = 170, > > UBLOCK_DOMINO_TILES = 171, > > > > > UBLOCK_SAMARITAN = 172, > > UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, > > UBLOCK_TAI_THAM = 174, > > UBLOCK_VEDIC_EXTENSIONS = 175, > > UBLOCK_LISU = 176, > > UBLOCK_BAMUM = 177, > > UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, > > UBLOCK_DEVANAGARI_EXTENDED = 179, > > UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, > > UBLOCK_JAVANESE = 181, > > UBLOCK_MYANMAR_EXTENDED_A = 182, > > UBLOCK_TAI_VIET = 183, > > UBLOCK_MEETEI_MAYEK = 184, > > UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, > > UBLOCK_IMPERIAL_ARAMAIC = 186, > > UBLOCK_OLD_SOUTH_ARABIAN = 187, > > UBLOCK_AVESTAN = 188, > > UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, > > UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, > > UBLOCK_OLD_TURKIC = 191, > > UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, > > UBLOCK_KAITHI = 193, > > UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, > > UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, > > UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, > > UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, > > > UBLOCK_COUNT = 198, > > > UBLOCK_INVALID_CODE=-1 >}; > > >typedef enum UBlockCode UBlockCode; ># 1360 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UEastAsianWidth { > U_EA_NEUTRAL, > U_EA_AMBIGUOUS, > U_EA_HALFWIDTH, > U_EA_FULLWIDTH, > U_EA_NARROW, > U_EA_WIDE, > U_EA_COUNT >} UEastAsianWidth; ># 1385 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UCharNameChoice { > U_UNICODE_CHAR_NAME, > U_UNICODE_10_CHAR_NAME, > U_EXTENDED_CHAR_NAME, > U_CHAR_NAME_ALIAS, > U_CHAR_NAME_CHOICE_COUNT >} UCharNameChoice; ># 1406 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UPropertyNameChoice { > U_SHORT_PROPERTY_NAME, > U_LONG_PROPERTY_NAME, > U_PROPERTY_NAME_CHOICE_COUNT >} UPropertyNameChoice; > > > > > > > >typedef enum UDecompositionType { > U_DT_NONE, > U_DT_CANONICAL, > U_DT_COMPAT, > U_DT_CIRCLE, > U_DT_FINAL, > U_DT_FONT, > U_DT_FRACTION, > U_DT_INITIAL, > U_DT_ISOLATED, > U_DT_MEDIAL, > U_DT_NARROW, > U_DT_NOBREAK, > U_DT_SMALL, > U_DT_SQUARE, > U_DT_SUB, > U_DT_SUPER, > U_DT_VERTICAL, > U_DT_WIDE, > U_DT_COUNT >} UDecompositionType; > > > > > > > >typedef enum UJoiningType { > U_JT_NON_JOINING, > U_JT_JOIN_CAUSING, > U_JT_DUAL_JOINING, > U_JT_LEFT_JOINING, > U_JT_RIGHT_JOINING, > U_JT_TRANSPARENT, > U_JT_COUNT >} UJoiningType; > > > > > > > >typedef enum UJoiningGroup { > U_JG_NO_JOINING_GROUP, > U_JG_AIN, > U_JG_ALAPH, > U_JG_ALEF, > U_JG_BEH, > U_JG_BETH, > U_JG_DAL, > U_JG_DALATH_RISH, > U_JG_E, > U_JG_FEH, > U_JG_FINAL_SEMKATH, > U_JG_GAF, > U_JG_GAMAL, > U_JG_HAH, > U_JG_HAMZA_ON_HEH_GOAL, > U_JG_HE, > U_JG_HEH, > U_JG_HEH_GOAL, > U_JG_HETH, > U_JG_KAF, > U_JG_KAPH, > U_JG_KNOTTED_HEH, > U_JG_LAM, > U_JG_LAMADH, > U_JG_MEEM, > U_JG_MIM, > U_JG_NOON, > U_JG_NUN, > U_JG_PE, > U_JG_QAF, > U_JG_QAPH, > U_JG_REH, > U_JG_REVERSED_PE, > U_JG_SAD, > U_JG_SADHE, > U_JG_SEEN, > U_JG_SEMKATH, > U_JG_SHIN, > U_JG_SWASH_KAF, > U_JG_SYRIAC_WAW, > U_JG_TAH, > U_JG_TAW, > U_JG_TEH_MARBUTA, > U_JG_TETH, > U_JG_WAW, > U_JG_YEH, > U_JG_YEH_BARREE, > U_JG_YEH_WITH_TAIL, > U_JG_YUDH, > U_JG_YUDH_HE, > U_JG_ZAIN, > U_JG_FE, > U_JG_KHAPH, > U_JG_ZHAIN, > U_JG_BURUSHASKI_YEH_BARREE, > U_JG_FARSI_YEH, > U_JG_NYA, > U_JG_COUNT >} UJoiningGroup; > > > > > > > >typedef enum UGraphemeClusterBreak { > U_GCB_OTHER = 0, > U_GCB_CONTROL = 1, > U_GCB_CR = 2, > U_GCB_EXTEND = 3, > U_GCB_L = 4, > U_GCB_LF = 5, > U_GCB_LV = 6, > U_GCB_LVT = 7, > U_GCB_T = 8, > U_GCB_V = 9, > U_GCB_SPACING_MARK = 10, > U_GCB_PREPEND = 11, > U_GCB_COUNT = 12 >} UGraphemeClusterBreak; ># 1552 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef enum UWordBreakValues { > U_WB_OTHER = 0, > U_WB_ALETTER = 1, > U_WB_FORMAT = 2, > U_WB_KATAKANA = 3, > U_WB_MIDLETTER = 4, > U_WB_MIDNUM = 5, > U_WB_NUMERIC = 6, > U_WB_EXTENDNUMLET = 7, > U_WB_CR = 8, > U_WB_EXTEND = 9, > U_WB_LF = 10, > U_WB_MIDNUMLET =11, > U_WB_NEWLINE =12, > U_WB_COUNT = 13 >} UWordBreakValues; > > > > > > > >typedef enum USentenceBreak { > U_SB_OTHER = 0, > U_SB_ATERM = 1, > U_SB_CLOSE = 2, > U_SB_FORMAT = 3, > U_SB_LOWER = 4, > U_SB_NUMERIC = 5, > U_SB_OLETTER = 6, > U_SB_SEP = 7, > U_SB_SP = 8, > U_SB_STERM = 9, > U_SB_UPPER = 10, > U_SB_CR = 11, > U_SB_EXTEND = 12, > U_SB_LF = 13, > U_SB_SCONTINUE = 14, > U_SB_COUNT = 15 >} USentenceBreak; > > > > > > > >typedef enum ULineBreak { > U_LB_UNKNOWN = 0, > U_LB_AMBIGUOUS = 1, > U_LB_ALPHABETIC = 2, > U_LB_BREAK_BOTH = 3, > U_LB_BREAK_AFTER = 4, > U_LB_BREAK_BEFORE = 5, > U_LB_MANDATORY_BREAK = 6, > U_LB_CONTINGENT_BREAK = 7, > U_LB_CLOSE_PUNCTUATION = 8, > U_LB_COMBINING_MARK = 9, > U_LB_CARRIAGE_RETURN = 10, > U_LB_EXCLAMATION = 11, > U_LB_GLUE = 12, > U_LB_HYPHEN = 13, > U_LB_IDEOGRAPHIC = 14, > U_LB_INSEPERABLE = 15, > > U_LB_INSEPARABLE=U_LB_INSEPERABLE, > U_LB_INFIX_NUMERIC = 16, > U_LB_LINE_FEED = 17, > U_LB_NONSTARTER = 18, > U_LB_NUMERIC = 19, > U_LB_OPEN_PUNCTUATION = 20, > U_LB_POSTFIX_NUMERIC = 21, > U_LB_PREFIX_NUMERIC = 22, > U_LB_QUOTATION = 23, > U_LB_COMPLEX_CONTEXT = 24, > U_LB_SURROGATE = 25, > U_LB_SPACE = 26, > U_LB_BREAK_SYMBOLS = 27, > U_LB_ZWSPACE = 28, > U_LB_NEXT_LINE = 29, > U_LB_WORD_JOINER = 30, > U_LB_H2 = 31, > U_LB_H3 = 32, > U_LB_JL = 33, > U_LB_JT = 34, > U_LB_JV = 35, > U_LB_CLOSE_PARENTHESIS = 36, > U_LB_COUNT = 37 >} ULineBreak; > > > > > > > >typedef enum UNumericType { > U_NT_NONE, > U_NT_DECIMAL, > U_NT_DIGIT, > U_NT_NUMERIC, > U_NT_COUNT >} UNumericType; > > > > > > > >typedef enum UHangulSyllableType { > U_HST_NOT_APPLICABLE, > U_HST_LEADING_JAMO, > U_HST_VOWEL_JAMO, > U_HST_TRAILING_JAMO, > U_HST_LV_SYLLABLE, > U_HST_LVT_SYLLABLE, > U_HST_COUNT >} UHangulSyllableType; ># 1699 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_hasBinaryProperty_44(UChar32 c, UProperty which); ># 1714 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isUAlphabetic_44(UChar32 c); ># 1729 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isULowercase_44(UChar32 c); ># 1744 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isUUppercase_44(UChar32 c); ># 1765 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isUWhiteSpace_44(UChar32 c); ># 1805 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getIntPropertyValue_44(UChar32 c, UProperty which); ># 1826 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getIntPropertyMinValue_44(UProperty which); ># 1855 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getIntPropertyMaxValue_44(UProperty which); ># 1878 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) double >u_getNumericValue_44(UChar32 c); ># 1913 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_islower_44(UChar32 c); ># 1940 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isupper_44(UChar32 c); ># 1957 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_istitle_44(UChar32 c); ># 1978 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isdigit_44(UChar32 c); ># 1999 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isalpha_44(UChar32 c); ># 2020 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isalnum_44(UChar32 c); ># 2043 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isxdigit_44(UChar32 c); ># 2059 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_ispunct_44(UChar32 c); ># 2078 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isgraph_44(UChar32 c); ># 2107 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isblank_44(UChar32 c); ># 2132 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isdefined_44(UChar32 c); ># 2153 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isspace_44(UChar32 c); ># 2174 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isJavaSpaceChar_44(UChar32 c); ># 2214 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isWhitespace_44(UChar32 c); ># 2238 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_iscntrl_44(UChar32 c); ># 2253 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isISOControl_44(UChar32 c); ># 2271 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isprint_44(UChar32 c); ># 2292 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isbase_44(UChar32 c); ># 2311 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UCharDirection >u_charDirection_44(UChar32 c); ># 2329 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isMirrored_44(UChar32 c); ># 2351 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_charMirror_44(UChar32 c); ># 2365 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int8_t >u_charType_44(UChar32 c); ># 2400 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef UBool >UCharEnumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory type); ># 2422 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) void >u_enumCharTypes_44(UCharEnumTypeRange *enumRange, const void *context); ># 2434 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) uint8_t >u_getCombiningClass_44(UChar32 c); ># 2462 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_charDigitValue_44(UChar32 c); ># 2474 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBlockCode >ublock_getCode_44(UChar32 c); ># 2509 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_charName_44(UChar32 code, UCharNameChoice nameChoice, > char *buffer, int32_t bufferLength, > UErrorCode *pErrorCode); ># 2539 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getISOComment_44(UChar32 c, > char *dest, int32_t destCapacity, > UErrorCode *pErrorCode); ># 2564 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_charFromName_44(UCharNameChoice nameChoice, > const char *name, > UErrorCode *pErrorCode); ># 2586 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >typedef UBool UEnumCharNamesFn(void *context, > UChar32 code, > UCharNameChoice nameChoice, > const char *name, > int32_t length); ># 2613 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) void >u_enumCharNames_44(UChar32 start, UChar32 limit, > UEnumCharNamesFn *fn, > void *context, > UCharNameChoice nameChoice, > UErrorCode *pErrorCode); ># 2651 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) const char* >u_getPropertyName_44(UProperty property, > UPropertyNameChoice nameChoice); ># 2674 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UProperty >u_getPropertyEnum_44(const char* alias); ># 2724 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) const char* >u_getPropertyValueName_44(UProperty property, > int32_t value, > UPropertyNameChoice nameChoice); ># 2760 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getPropertyValueEnum_44(UProperty property, > const char* alias); ># 2781 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isIDStart_44(UChar32 c); ># 2805 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isIDPart_44(UChar32 c); ># 2828 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isIDIgnorable_44(UChar32 c); ># 2847 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isJavaIDStart_44(UChar32 c); ># 2868 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UBool >u_isJavaIDPart_44(UChar32 c); ># 2893 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_tolower_44(UChar32 c); ># 2918 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_toupper_44(UChar32 c); ># 2943 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_totitle_44(UChar32 c); ># 2989 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_foldCase_44(UChar32 c, uint32_t options); ># 3030 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_digit_44(UChar32 ch, int8_t radix); ># 3061 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_forDigit_44(int32_t digit, int8_t radix); ># 3078 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) void >u_charAge_44(UChar32 c, UVersionInfo versionArray); ># 3092 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) void >u_getUnicodeVersion_44(UVersionInfo versionArray); ># 3117 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uchar.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_getFC_NFKC_Closure_44(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); > > > > >} ># 41 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" 1 ># 29 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" 1 ># 50 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" 1 ># 91 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >struct UConverter; > > >typedef struct UConverter UConverter; ># 155 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >typedef enum { > UCNV_UNASSIGNED = 0, > > UCNV_ILLEGAL = 1, > > > > > > > > UCNV_IRREGULAR = 2, > > > > > UCNV_RESET = 3, > > > UCNV_CLOSE = 4, > > UCNV_CLONE = 5 ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >} UConverterCallbackReason; > > > > > > >typedef struct { > uint16_t size; > UBool flush; > UConverter *converter; > const UChar *source; > const UChar *sourceLimit; > char *target; > const char *targetLimit; > int32_t *offsets; >} UConverterFromUnicodeArgs; > > > > > > >typedef struct { > uint16_t size; > UBool flush; > UConverter *converter; > const char *source; > const char *sourceLimit; > UChar *target; > const UChar *targetLimit; > int32_t *offsets; >} UConverterToUnicodeArgs; ># 234 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_STOP_44 ( > const void *context, > UConverterFromUnicodeArgs *fromUArgs, > const UChar* codeUnits, > int32_t length, > UChar32 codePoint, > UConverterCallbackReason reason, > UErrorCode * err); ># 258 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_STOP_44 ( > const void *context, > UConverterToUnicodeArgs *toUArgs, > const char* codeUnits, > int32_t length, > UConverterCallbackReason reason, > UErrorCode * err); ># 285 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_SKIP_44 ( > const void *context, > UConverterFromUnicodeArgs *fromUArgs, > const UChar* codeUnits, > int32_t length, > UChar32 codePoint, > UConverterCallbackReason reason, > UErrorCode * err); ># 315 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_SUBSTITUTE_44 ( > const void *context, > UConverterFromUnicodeArgs *fromUArgs, > const UChar* codeUnits, > int32_t length, > UChar32 codePoint, > UConverterCallbackReason reason, > UErrorCode * err); ># 371 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_ESCAPE_44 ( > const void *context, > UConverterFromUnicodeArgs *fromUArgs, > const UChar* codeUnits, > int32_t length, > UChar32 codePoint, > UConverterCallbackReason reason, > UErrorCode * err); ># 399 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_SKIP_44 ( > const void *context, > UConverterToUnicodeArgs *toUArgs, > const char* codeUnits, > int32_t length, > UConverterCallbackReason reason, > UErrorCode * err); ># 425 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_SUBSTITUTE_44 ( > const void *context, > UConverterToUnicodeArgs *toUArgs, > const char* codeUnits, > int32_t length, > UConverterCallbackReason reason, > UErrorCode * err); ># 451 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv_err.h" >extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_ESCAPE_44 ( > const void *context, > UConverterToUnicodeArgs *toUArgs, > const char* codeUnits, > int32_t length, > UConverterCallbackReason reason, > UErrorCode * err); ># 51 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" 1 ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" 1 ># 43 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" >extern "C++" { namespace icu_44 { ># 63 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" >template<typename T> >class LocalPointerBase { >public: > > > > > > explicit LocalPointerBase(T *p=__null) : ptr(p) {} > > > > > > ~LocalPointerBase() { } > > > > > > UBool isNull() const { return ptr==__null; } > > > > > > UBool isValid() const { return ptr!=__null; } > > > > > > > > bool operator==(const T *other) const { return ptr==other; } > > > > > > > > bool operator!=(const T *other) const { return ptr!=other; } > > > > > > T *getAlias() const { return ptr; } > > > > > > T &operator*() const { return *ptr; } > > > > > > T *operator->() const { return ptr; } > > > > > > > T *orphan() { > T *p=ptr; > ptr=__null; > return p; > } > > > > > > > > void adoptInstead(T *p) { > > ptr=p; > } >protected: > T *ptr; >private: > > bool operator==(const LocalPointerBase &other); > bool operator!=(const LocalPointerBase &other); > > LocalPointerBase(const LocalPointerBase &other); > void operator=(const LocalPointerBase &other); > > static void * operator new(size_t size); > static void * operator new[](size_t size); > > static void * operator new(size_t, void *ptr); > >}; ># 181 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" >template<typename T> >class LocalPointer : public LocalPointerBase<T> { >public: > > > > > > explicit LocalPointer(T *p=__null) : LocalPointerBase<T>(p) {} > > > > > ~LocalPointer() { > delete LocalPointerBase<T>::ptr; > } > > > > > > > void adoptInstead(T *p) { > delete LocalPointerBase<T>::ptr; > LocalPointerBase<T>::ptr=p; > } >}; ># 227 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" >template<typename T> >class LocalArray : public LocalPointerBase<T> { >public: > > > > > > explicit LocalArray(T *p=__null) : LocalPointerBase<T>(p) {} > > > > > ~LocalArray() { > delete[] LocalPointerBase<T>::ptr; > } > > > > > > > void adoptInstead(T *p) { > delete[] LocalPointerBase<T>::ptr; > LocalPointerBase<T>::ptr=p; > } > > > > > > > > T &operator[](ptrdiff_t i) const { return LocalPointerBase<T>::ptr[i]; } >}; ># 297 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/localpointer.h" >} } ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" 2 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" 1 ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" 1 ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >extern "C++" { namespace icu_44 { ># 101 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >class UMemory { >public: ># 120 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" > static void * operator new(size_t size) throw(); > > > > > > > static void * operator new[](size_t size) throw(); ># 137 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" > static void operator delete(void *p) throw(); > > > > > > > static void operator delete[](void *p) throw(); > > > > > > > > static inline void * operator new(size_t, void *ptr) throw() { return ptr; } > > > > > > > static inline void operator delete(void *, void *) throw() {} ># 191 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >}; ># 215 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >class UObject : public UMemory { >public: > > > > > > virtual ~UObject(); > > > > > > > virtual UClassID getDynamicClassID() const = 0; > >protected: ># 288 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >}; ># 337 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uobject.h" >} } ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" 1 ># 30 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" 1 ># 24 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" >extern "C++" { namespace icu_44 { > >class UnicodeString; ># 71 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" >class Replaceable : public UObject { > >public: > > > > > virtual ~Replaceable(); > > > > > > > inline int32_t length() const; ># 94 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > inline UChar charAt(int32_t offset) const; ># 108 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > inline UChar32 char32At(int32_t offset) const; ># 120 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual void extractBetween(int32_t start, > int32_t limit, > UnicodeString& target) const = 0; ># 144 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual void handleReplaceBetween(int32_t start, > int32_t limit, > const UnicodeString& text) = 0; ># 172 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual void copy(int32_t start, int32_t limit, int32_t dest) = 0; ># 183 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual UBool hasMetaData() const; ># 200 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual Replaceable *clone() const; > >protected: > > > > > > Replaceable(); ># 225 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/rep.h" > virtual int32_t getLength() const = 0; > > > > > > virtual UChar getCharAt(int32_t offset) const = 0; > > > > > > virtual UChar32 getChar32At(int32_t offset) const = 0; >}; > >inline int32_t >Replaceable::length() const { > return getLength(); >} > >inline UChar >Replaceable::charAt(int32_t offset) const { > return getCharAt(offset); >} > >inline UChar32 >Replaceable::char32At(int32_t offset) const { > return getChar32At(offset); >} > > > >} } ># 31 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/std_string.h" 1 ># 32 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" 1 ># 34 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" >extern "C++" { namespace icu_44 { ># 52 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" >class StringPiece : public UMemory { > private: > const char* ptr_; > int32_t length_; > > public: > > > > > StringPiece() : ptr_(__null), length_(0) { } > > > > > > StringPiece(const char* str); > > > > > > StringPiece(const std:: string& str) > : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { } > > > > > > > > StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } > > > > > > > StringPiece(const StringPiece& x, int32_t pos); ># 99 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" > StringPiece(const StringPiece& x, int32_t pos, int32_t len); ># 111 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" > const char* data() const { return ptr_; } > > > > > > int32_t size() const { return length_; } > > > > > > int32_t length() const { return length_; } > > > > > > UBool empty() const { return length_ == 0; } > > > > > > void clear() { ptr_ = __null; length_ = 0; } > > > > > > > > void set(const char* data, int32_t len) { ptr_ = data; length_ = len; } > > > > > > > void set(const char* str); > > > > > > > void remove_prefix(int32_t n) { > if (n >= 0) { > if (n > length_) { > n = length_; > } > ptr_ += n; > length_ -= n; > } > } > > > > > > > void remove_suffix(int32_t n) { > if (n >= 0) { > if (n <= length_) { > length_ -= n; > } else { > length_ = 0; > } > } > } > > > > > > static const int32_t npos = 0x7fffffff; ># 196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" > StringPiece substr(int32_t pos, int32_t len = npos) const { > return StringPiece(*this, pos, len); > } >}; ># 208 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" >__attribute__((visibility("default"))) UBool >operator==(const StringPiece& x, const StringPiece& y); ># 218 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/stringpiece.h" >inline UBool operator!=(const StringPiece& x, const StringPiece& y) { > return !(x == y); >} > >} } ># 33 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" 1 ># 42 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" >extern "C++" { namespace icu_44 { > > > > > >class ByteSink : public UMemory { >public: > > > > > ByteSink() { } > > > > > virtual ~ByteSink() { } > > > > > > > > virtual void Append(const char* bytes, int32_t n) = 0; ># 111 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" > virtual char* GetAppendBuffer(int32_t min_capacity, > int32_t desired_capacity_hint, > char* scratch, int32_t scratch_capacity, > int32_t* result_capacity); ># 123 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" > virtual void Flush(); > >private: > ByteSink(const ByteSink &); > ByteSink &operator=(const ByteSink &); >}; ># 142 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" >class CheckedArrayByteSink : public ByteSink { >public: > > > > > > > CheckedArrayByteSink(char* outbuf, int32_t capacity); > > > > > > > virtual void Append(const char* bytes, int32_t n); ># 172 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" > virtual char* GetAppendBuffer(int32_t min_capacity, > int32_t desired_capacity_hint, > char* scratch, int32_t scratch_capacity, > int32_t* result_capacity); > > > > > > int32_t NumberOfBytesWritten() const { return size_; } > > > > > > > UBool Overflowed() const { return overflowed_; } >private: > char* outbuf_; > const int32_t capacity_; > int32_t size_; > bool overflowed_; > CheckedArrayByteSink(); > CheckedArrayByteSink(const CheckedArrayByteSink &); > CheckedArrayByteSink &operator=(const CheckedArrayByteSink &); >}; ># 206 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/bytestream.h" >template<typename StringClass> >class StringByteSink : public ByteSink { > public: > > > > > > StringByteSink(StringClass* dest) : dest_(dest) { } > > > > > > > virtual void Append(const char* data, int32_t n) { dest_->append(data, n); } > private: > StringClass* dest_; > StringByteSink(); > StringByteSink(const StringByteSink &); > StringByteSink &operator=(const StringByteSink &); >}; > > > >} } ># 34 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" 2 > >struct UConverter; >class StringThreadTest; ># 56 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" >extern "C++" { namespace icu_44 { > >class Locale; >class StringCharacterIterator; >class BreakIterator; ># 187 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" >class UnicodeString : public Replaceable >{ >public: ># 199 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > enum EInvariant { > > > > > kInvariant > }; ># 220 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator== (const UnicodeString& text) const; ># 229 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator!= (const UnicodeString& text) const; ># 238 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator> (const UnicodeString& text) const; ># 247 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator< (const UnicodeString& text) const; ># 256 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator>= (const UnicodeString& text) const; ># 265 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool operator<= (const UnicodeString& text) const; ># 278 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(const UnicodeString& text) const; ># 294 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(int32_t start, > int32_t length, > const UnicodeString& text) const; ># 315 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; ># 333 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(const UChar *srcChars, > int32_t srcLength) const; ># 350 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(int32_t start, > int32_t length, > const UChar *srcChars) const; ># 371 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compare(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; ># 394 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit) const; ># 417 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(const UnicodeString& text) const; ># 438 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(int32_t start, > int32_t length, > const UnicodeString& srcText) const; ># 463 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; ># 487 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(const UChar *srcChars, > int32_t srcLength) const; ># 509 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(int32_t start, > int32_t length, > const UChar *srcChars) const; ># 534 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrder(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; ># 561 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t compareCodePointOrderBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit) const; ># 585 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(const UnicodeString& text, uint32_t options) const; ># 607 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(int32_t start, > int32_t length, > const UnicodeString& srcText, > uint32_t options) const; ># 634 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const; ># 660 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(const UChar *srcChars, > int32_t srcLength, > uint32_t options) const; ># 684 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(int32_t start, > int32_t length, > const UChar *srcChars, > uint32_t options) const; ># 711 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompare(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const; ># 740 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int8_t caseCompareBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit, > uint32_t options) const; ># 754 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool startsWith(const UnicodeString& text) const; ># 766 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool startsWith(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; ># 778 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool startsWith(const UChar *srcChars, > int32_t srcLength) const; ># 790 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool startsWith(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; ># 801 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool endsWith(const UnicodeString& text) const; ># 813 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool endsWith(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; ># 825 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool endsWith(const UChar *srcChars, > int32_t srcLength) const; ># 838 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool endsWith(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; ># 853 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UnicodeString& text) const; ># 864 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UnicodeString& text, > int32_t start) const; ># 878 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UnicodeString& text, > int32_t start, > int32_t length) const; ># 898 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 915 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start) const; ># 931 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 952 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t indexOf(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 965 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar c) const; ># 975 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar32 c) const; ># 985 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar c, > int32_t start) const; ># 997 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar32 c, > int32_t start) const; ># 1010 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar c, > int32_t start, > int32_t length) const; ># 1025 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t indexOf(UChar32 c, > int32_t start, > int32_t length) const; ># 1037 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UnicodeString& text) const; ># 1048 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UnicodeString& text, > int32_t start) const; ># 1062 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UnicodeString& text, > int32_t start, > int32_t length) const; ># 1082 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 1098 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start) const; ># 1114 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 1135 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t lastIndexOf(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t length) const; ># 1148 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar c) const; ># 1158 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar32 c) const; ># 1168 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar c, > int32_t start) const; ># 1180 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar32 c, > int32_t start) const; ># 1193 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar c, > int32_t start, > int32_t length) const; ># 1208 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t lastIndexOf(UChar32 c, > int32_t start, > int32_t length) const; ># 1223 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UChar charAt(int32_t offset) const; ># 1232 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UChar operator[] (int32_t offset) const; ># 1245 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UChar32 char32At(int32_t offset) const; ># 1262 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t getChar32Start(int32_t offset) const; ># 1280 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t getChar32Limit(int32_t offset) const; ># 1332 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t moveIndex32(int32_t index, int32_t delta) const; ># 1351 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline void extract(int32_t start, > int32_t length, > UChar *dst, > int32_t dstStart = 0) const; ># 1377 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t > extract(UChar *dest, int32_t destCapacity, > UErrorCode &errorCode) const; ># 1391 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline void extract(int32_t start, > int32_t length, > UnicodeString& target) const; ># 1406 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline void extractBetween(int32_t start, > int32_t limit, > UChar *dst, > int32_t dstStart = 0) const; ># 1420 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > virtual void extractBetween(int32_t start, > int32_t limit, > UnicodeString& target) const; ># 1445 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t extract(int32_t start, > int32_t startLength, > char *target, > int32_t targetCapacity, > enum EInvariant inv) const; ># 1472 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t extract(int32_t start, > int32_t startLength, > char *target, > uint32_t targetLength) const; ># 1506 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t extract(int32_t start, > int32_t startLength, > char *target, > const char *codepage = 0) const; ># 1540 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t extract(int32_t start, > int32_t startLength, > char *target, > uint32_t targetLength, > const char *codepage) const; ># 1563 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t extract(char *dest, int32_t destCapacity, > UConverter *cnv, > UErrorCode &errorCode) const; ># 1582 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString tempSubString(int32_t start=0, int32_t length=(2147483647)) const; ># 1594 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString tempSubStringBetween(int32_t start, int32_t limit=(2147483647)) const; ># 1606 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > void toUTF8(ByteSink &sink) const; ># 1622 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > template<typename StringClass> > StringClass &toUTF8String(StringClass &result) const { > StringByteSink<StringClass> sbs(&result); > toUTF8(sbs); > return result; > } ># 1646 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t toUTF32(UChar32 *utf32, int32_t capacity, UErrorCode &errorCode) const; ># 1658 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t length(void) const; ># 1673 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int32_t > countChar32(int32_t start=0, int32_t length=(2147483647)) const; ># 1699 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UBool > hasMoreChar32Than(int32_t start, int32_t length, int32_t number) const; > > > > > > > inline UBool isEmpty(void) const; ># 1718 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t getCapacity(void) const; ># 1727 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline int32_t hashCode(void) const; ># 1741 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UBool isBogus(void) const; ># 1757 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &operator=(const UnicodeString &srcText); ># 1779 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &fastCopyFrom(const UnicodeString &src); ># 1788 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& operator= (UChar ch); ># 1797 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& operator= (UChar32 ch); ># 1810 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& setTo(const UnicodeString& srcText, > int32_t srcStart); ># 1826 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& setTo(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength); ># 1838 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& setTo(const UnicodeString& srcText); ># 1848 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& setTo(const UChar *srcChars, > int32_t srcLength); ># 1859 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& setTo(UChar srcChar); ># 1869 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& setTo(UChar32 srcChar); ># 1891 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &setTo(UBool isTerminated, > const UChar *text, > int32_t textLength); ># 1914 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &setTo(UChar *buffer, > int32_t buffLength, > int32_t buffCapacity); ># 1958 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > void setToBogus(); ># 1967 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& setCharAt(int32_t offset, > UChar ch); ># 1980 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& operator+= (UChar ch); ># 1989 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& operator+= (UChar32 ch); ># 1999 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& operator+= (const UnicodeString& srcText); ># 2015 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& append(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength); ># 2026 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& append(const UnicodeString& srcText); ># 2041 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& append(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength); ># 2053 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& append(const UChar *srcChars, > int32_t srcLength); > > > > > > > > inline UnicodeString& append(UChar srcChar); > > > > > > > > inline UnicodeString& append(UChar32 srcChar); ># 2088 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength); ># 2101 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > const UnicodeString& srcText); ># 2117 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength); ># 2131 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > const UChar *srcChars, > int32_t srcLength); ># 2143 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > UChar srcChar); ># 2154 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& insert(int32_t start, > UChar32 srcChar); ># 2177 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& replace(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength); ># 2195 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& replace(int32_t start, > int32_t length, > const UnicodeString& srcText); ># 2216 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& replace(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength); ># 2234 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& replace(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcLength); ># 2250 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& replace(int32_t start, > int32_t length, > UChar srcChar); ># 2265 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& replace(int32_t start, > int32_t length, > UChar32 srcChar); ># 2278 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& replaceBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText); ># 2296 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& replaceBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit); ># 2312 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > virtual void handleReplaceBetween(int32_t start, > int32_t limit, > const UnicodeString& text); > > > > > > > virtual UBool hasMetaData() const; ># 2338 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > virtual void copy(int32_t start, int32_t limit, int32_t dest); ># 2350 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& findAndReplace(const UnicodeString& oldText, > const UnicodeString& newText); ># 2364 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& findAndReplace(int32_t start, > int32_t length, > const UnicodeString& oldText, > const UnicodeString& newText); ># 2386 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& findAndReplace(int32_t start, > int32_t length, > const UnicodeString& oldText, > int32_t oldStart, > int32_t oldLength, > const UnicodeString& newText, > int32_t newStart, > int32_t newLength); ># 2403 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& remove(void); ># 2413 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& remove(int32_t start, > int32_t length = (int32_t)(2147483647)); ># 2424 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& removeBetween(int32_t start, > int32_t limit = (int32_t)(2147483647)); ># 2436 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString &retainBetween(int32_t start, int32_t limit = (2147483647)); ># 2451 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UBool padLeading(int32_t targetLength, > UChar padChar = 0x0020); ># 2465 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UBool padTrailing(int32_t targetLength, > UChar padChar = 0x0020); > > > > > > > > inline UBool truncate(int32_t targetLength); > > > > > > > UnicodeString& trim(void); ># 2491 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& reverse(void); ># 2501 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline UnicodeString& reverse(int32_t start, > int32_t length); > > > > > > > > UnicodeString& toUpper(void); ># 2519 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& toUpper(const Locale& locale); > > > > > > > > UnicodeString& toLower(void); ># 2536 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString& toLower(const Locale& locale); ># 2566 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &toTitle(BreakIterator *titleIter); ># 2595 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale); ># 2628 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, uint32_t options); ># 2643 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString &foldCase(uint32_t options=0 ); ># 2692 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UChar *getBuffer(int32_t minCapacity); ># 2714 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > void releaseBuffer(int32_t newLength=-1); ># 2746 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline const UChar *getBuffer() const; ># 2781 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > inline const UChar *getTerminatedBuffer(); ># 2790 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(); ># 2803 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(int32_t capacity, UChar32 c, int32_t count); > > > > > > > UnicodeString(UChar ch); > > > > > > > UnicodeString(UChar32 ch); > > > > > > > > UnicodeString(const UChar *text); ># 2834 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const UChar *text, > int32_t textLength); ># 2856 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(UBool isTerminated, > const UChar *text, > int32_t textLength); ># 2878 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity); ># 2888 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const char *codepageData); > > > > > > > > UnicodeString(const char *codepageData, int32_t dataLength); ># 2919 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const char *codepageData, const char *codepage); ># 2938 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const char *codepageData, int32_t dataLength, const char *codepage); ># 2961 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString( > const char *src, int32_t srcLength, > UConverter *cnv, > UErrorCode &errorCode); ># 2992 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const char *src, int32_t length, enum EInvariant inv); > > > > > > > > UnicodeString(const UnicodeString& that); > > > > > > > > UnicodeString(const UnicodeString& src, int32_t srcStart); ># 3017 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString(const UnicodeString& src, int32_t srcStart, int32_t srcLength); ># 3035 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > virtual Replaceable *clone() const; > > > > > virtual ~UnicodeString(); ># 3055 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > static UnicodeString fromUTF8(const StringPiece &utf8); ># 3068 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > static UnicodeString fromUTF32(const UChar32 *utf32, int32_t length); ># 3106 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString unescape() const; ># 3127 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UChar32 unescapeAt(int32_t &offset) const; > > > > > > > static UClassID getStaticClassID(); > > > > > > > virtual UClassID getDynamicClassID() const; > > > > > >protected: > > > > > virtual int32_t getLength() const; > > > > > > > virtual UChar getCharAt(int32_t offset) const; > > > > > > > virtual UChar32 getChar32At(int32_t offset) const; > >private: > > UnicodeString &setToUTF8(const StringPiece &utf8); > > > > > > int32_t > toUTF8(int32_t start, int32_t len, > char *target, int32_t capacity) const; > > > inline int8_t > doCompare(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; > > int8_t doCompare(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; > > inline int8_t > doCompareCodePointOrder(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const; > > int8_t doCompareCodePointOrder(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const; > > inline int8_t > doCaseCompare(int32_t start, > int32_t length, > const UnicodeString &srcText, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const; > > int8_t > doCaseCompare(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const; > > int32_t doIndexOf(UChar c, > int32_t start, > int32_t length) const; > > int32_t doIndexOf(UChar32 c, > int32_t start, > int32_t length) const; > > int32_t doLastIndexOf(UChar c, > int32_t start, > int32_t length) const; > > int32_t doLastIndexOf(UChar32 c, > int32_t start, > int32_t length) const; > > void doExtract(int32_t start, > int32_t length, > UChar *dst, > int32_t dstStart) const; > > inline void doExtract(int32_t start, > int32_t length, > UnicodeString& target) const; > > inline UChar doCharAt(int32_t offset) const; > > UnicodeString& doReplace(int32_t start, > int32_t length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength); > > UnicodeString& doReplace(int32_t start, > int32_t length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength); > > UnicodeString& doReverse(int32_t start, > int32_t length); > > > int32_t doHashCode(void) const; > > > > inline UChar* getArrayStart(void); > inline const UChar* getArrayStart(void) const; > > > > inline UBool isWritable() const; > > > inline UBool isBufferWritable() const; > > > inline void setLength(int32_t len); > inline void setToEmpty(); > inline void setArray(UChar *array, int32_t len, int32_t capacity); > > > > > > UBool allocate(int32_t capacity); > > > void releaseArray(void); > > > void unBogus(); > > > UnicodeString ©From(const UnicodeString &src, UBool fastCopy=0); > > > inline void pinIndex(int32_t& start) const; > inline void pinIndices(int32_t& start, > int32_t& length) const; > > > > > int32_t doExtract(int32_t start, int32_t length, > char *dest, int32_t destCapacity, > UConverter *cnv, > UErrorCode &errorCode) const; ># 3323 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > void doCodepageCreate(const char *codepageData, > int32_t dataLength, > const char *codepage); > > > > > > void > doCodepageCreate(const char *codepageData, > int32_t dataLength, > UConverter *converter, > UErrorCode &status); ># 3350 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UBool cloneArrayIfNeeded(int32_t newCapacity = -1, > int32_t growCapacity = -1, > UBool doCopyArray = 1, > int32_t **pBufferToDelete = 0, > UBool forceClone = 0); > > > UnicodeString & > caseMap(BreakIterator *titleIter, > const char *locale, > uint32_t options, > int32_t toWhichCase); > > > void addRef(void); > int32_t removeRef(void); > int32_t refCount(void) const; > > > enum { > > > > US_STACKBUF_SIZE= sizeof(void *)==4 ? 13 : 15, > kInvalidUChar=0xffff, > kGrowSize=128, > kInvalidHashCode=0, > kEmptyHashCode=1, > > > kIsBogus=1, > kUsingStackBuffer=2, > kRefCounted=4, > kBufferIsReadonly=8, > kOpenGetBuffer=16, > > > > kShortString=kUsingStackBuffer, > kLongString=kRefCounted, > kReadonlyAlias=kBufferIsReadonly, > kWritableAlias=0 > }; > > friend class StringThreadTest; > > union StackBufferOrFields; > friend union StackBufferOrFields; ># 3411 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > int8_t fShortLength; > uint8_t fFlags; > union StackBufferOrFields { > > > UChar fStackBuffer [US_STACKBUF_SIZE]; > struct { > uint16_t fPadding; > int32_t fLength; > UChar *fArray; > int32_t fCapacity; > } fFields; > } fUnion; >}; ># 3434 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > UnicodeString >operator+ (const UnicodeString &s1, const UnicodeString &s2); ># 3445 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" >inline void >UnicodeString::pinIndex(int32_t& start) const >{ > > if(start < 0) { > start = 0; > } else if(start > length()) { > start = length(); > } >} > >inline void >UnicodeString::pinIndices(int32_t& start, > int32_t& _length) const >{ > > int32_t len = length(); > if(start < 0) { > start = 0; > } else if(start > len) { > start = len; > } > if(_length < 0) { > _length = 0; > } else if(_length > (len - start)) { > _length = (len - start); > } >} > >inline UChar* >UnicodeString::getArrayStart() >{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; } > >inline const UChar* >UnicodeString::getArrayStart() const >{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; } > > > > >inline int32_t >UnicodeString::length() const >{ return fShortLength>=0 ? fShortLength : fUnion.fFields.fLength; } > >inline int32_t >UnicodeString::getCapacity() const >{ return (fFlags&kUsingStackBuffer) ? US_STACKBUF_SIZE : fUnion.fFields.fCapacity; } > >inline int32_t >UnicodeString::hashCode() const >{ return doHashCode(); } > >inline UBool >UnicodeString::isBogus() const >{ return (UBool)(fFlags & kIsBogus); } > >inline UBool >UnicodeString::isWritable() const >{ return (UBool)!(fFlags&(kOpenGetBuffer|kIsBogus)); } > >inline UBool >UnicodeString::isBufferWritable() const >{ > return (UBool)( > !(fFlags&(kOpenGetBuffer|kIsBogus|kBufferIsReadonly)) && > (!(fFlags&kRefCounted) || refCount()==1)); >} > >inline const UChar * >UnicodeString::getBuffer() const { > if(fFlags&(kIsBogus|kOpenGetBuffer)) { > return 0; > } else if(fFlags&kUsingStackBuffer) { > return fUnion.fStackBuffer; > } else { > return fUnion.fFields.fArray; > } >} > > > > >inline int8_t >UnicodeString::doCompare(int32_t start, > int32_t thisLength, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const >{ > if(srcText.isBogus()) { > return (int8_t)!isBogus(); > } else { > srcText.pinIndices(srcStart, srcLength); > return doCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); > } >} > >inline UBool >UnicodeString::operator== (const UnicodeString& text) const >{ > if(isBogus()) { > return text.isBogus(); > } else { > int32_t len = length(), textLength = text.length(); > return > !text.isBogus() && > len == textLength && > doCompare(0, len, text, 0, textLength) == 0; > } >} > >inline UBool >UnicodeString::operator!= (const UnicodeString& text) const >{ return (! operator==(text)); } > >inline UBool >UnicodeString::operator> (const UnicodeString& text) const >{ return doCompare(0, length(), text, 0, text.length()) == 1; } > >inline UBool >UnicodeString::operator< (const UnicodeString& text) const >{ return doCompare(0, length(), text, 0, text.length()) == -1; } > >inline UBool >UnicodeString::operator>= (const UnicodeString& text) const >{ return doCompare(0, length(), text, 0, text.length()) != -1; } > >inline UBool >UnicodeString::operator<= (const UnicodeString& text) const >{ return doCompare(0, length(), text, 0, text.length()) != 1; } > >inline int8_t >UnicodeString::compare(const UnicodeString& text) const >{ return doCompare(0, length(), text, 0, text.length()); } > >inline int8_t >UnicodeString::compare(int32_t start, > int32_t _length, > const UnicodeString& srcText) const >{ return doCompare(start, _length, srcText, 0, srcText.length()); } > >inline int8_t >UnicodeString::compare(const UChar *srcChars, > int32_t srcLength) const >{ return doCompare(0, length(), srcChars, 0, srcLength); } > >inline int8_t >UnicodeString::compare(int32_t start, > int32_t _length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const >{ return doCompare(start, _length, srcText, srcStart, srcLength); } > >inline int8_t >UnicodeString::compare(int32_t start, > int32_t _length, > const UChar *srcChars) const >{ return doCompare(start, _length, srcChars, 0, _length); } > >inline int8_t >UnicodeString::compare(int32_t start, > int32_t _length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const >{ return doCompare(start, _length, srcChars, srcStart, srcLength); } > >inline int8_t >UnicodeString::compareBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit) const >{ return doCompare(start, limit - start, > srcText, srcStart, srcLimit - srcStart); } > >inline int8_t >UnicodeString::doCompareCodePointOrder(int32_t start, > int32_t thisLength, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const >{ > if(srcText.isBogus()) { > return (int8_t)!isBogus(); > } else { > srcText.pinIndices(srcStart, srcLength); > return doCompareCodePointOrder(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); > } >} > >inline int8_t >UnicodeString::compareCodePointOrder(const UnicodeString& text) const >{ return doCompareCodePointOrder(0, length(), text, 0, text.length()); } > >inline int8_t >UnicodeString::compareCodePointOrder(int32_t start, > int32_t _length, > const UnicodeString& srcText) const >{ return doCompareCodePointOrder(start, _length, srcText, 0, srcText.length()); } > >inline int8_t >UnicodeString::compareCodePointOrder(const UChar *srcChars, > int32_t srcLength) const >{ return doCompareCodePointOrder(0, length(), srcChars, 0, srcLength); } > >inline int8_t >UnicodeString::compareCodePointOrder(int32_t start, > int32_t _length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const >{ return doCompareCodePointOrder(start, _length, srcText, srcStart, srcLength); } > >inline int8_t >UnicodeString::compareCodePointOrder(int32_t start, > int32_t _length, > const UChar *srcChars) const >{ return doCompareCodePointOrder(start, _length, srcChars, 0, _length); } > >inline int8_t >UnicodeString::compareCodePointOrder(int32_t start, > int32_t _length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const >{ return doCompareCodePointOrder(start, _length, srcChars, srcStart, srcLength); } > >inline int8_t >UnicodeString::compareCodePointOrderBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit) const >{ return doCompareCodePointOrder(start, limit - start, > srcText, srcStart, srcLimit - srcStart); } > >inline int8_t >UnicodeString::doCaseCompare(int32_t start, > int32_t thisLength, > const UnicodeString &srcText, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const >{ > if(srcText.isBogus()) { > return (int8_t)!isBogus(); > } else { > srcText.pinIndices(srcStart, srcLength); > return doCaseCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength, options); > } >} > >inline int8_t >UnicodeString::caseCompare(const UnicodeString &text, uint32_t options) const { > return doCaseCompare(0, length(), text, 0, text.length(), options); >} > >inline int8_t >UnicodeString::caseCompare(int32_t start, > int32_t _length, > const UnicodeString &srcText, > uint32_t options) const { > return doCaseCompare(start, _length, srcText, 0, srcText.length(), options); >} > >inline int8_t >UnicodeString::caseCompare(const UChar *srcChars, > int32_t srcLength, > uint32_t options) const { > return doCaseCompare(0, length(), srcChars, 0, srcLength, options); >} > >inline int8_t >UnicodeString::caseCompare(int32_t start, > int32_t _length, > const UnicodeString &srcText, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const { > return doCaseCompare(start, _length, srcText, srcStart, srcLength, options); >} > >inline int8_t >UnicodeString::caseCompare(int32_t start, > int32_t _length, > const UChar *srcChars, > uint32_t options) const { > return doCaseCompare(start, _length, srcChars, 0, _length, options); >} > >inline int8_t >UnicodeString::caseCompare(int32_t start, > int32_t _length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength, > uint32_t options) const { > return doCaseCompare(start, _length, srcChars, srcStart, srcLength, options); >} > >inline int8_t >UnicodeString::caseCompareBetween(int32_t start, > int32_t limit, > const UnicodeString &srcText, > int32_t srcStart, > int32_t srcLimit, > uint32_t options) const { > return doCaseCompare(start, limit - start, srcText, srcStart, srcLimit - srcStart, options); >} > >inline int32_t >UnicodeString::indexOf(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t _length) const >{ > if(!srcText.isBogus()) { > srcText.pinIndices(srcStart, srcLength); > if(srcLength > 0) { > return indexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); > } > } > return -1; >} > >inline int32_t >UnicodeString::indexOf(const UnicodeString& text) const >{ return indexOf(text, 0, text.length(), 0, length()); } > >inline int32_t >UnicodeString::indexOf(const UnicodeString& text, > int32_t start) const { > pinIndex(start); > return indexOf(text, 0, text.length(), start, length() - start); >} > >inline int32_t >UnicodeString::indexOf(const UnicodeString& text, > int32_t start, > int32_t _length) const >{ return indexOf(text, 0, text.length(), start, _length); } > >inline int32_t >UnicodeString::indexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start) const { > pinIndex(start); > return indexOf(srcChars, 0, srcLength, start, length() - start); >} > >inline int32_t >UnicodeString::indexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start, > int32_t _length) const >{ return indexOf(srcChars, 0, srcLength, start, _length); } > >inline int32_t >UnicodeString::indexOf(UChar c, > int32_t start, > int32_t _length) const >{ return doIndexOf(c, start, _length); } > >inline int32_t >UnicodeString::indexOf(UChar32 c, > int32_t start, > int32_t _length) const >{ return doIndexOf(c, start, _length); } > >inline int32_t >UnicodeString::indexOf(UChar c) const >{ return doIndexOf(c, 0, length()); } > >inline int32_t >UnicodeString::indexOf(UChar32 c) const >{ return indexOf(c, 0, length()); } > >inline int32_t >UnicodeString::indexOf(UChar c, > int32_t start) const { > pinIndex(start); > return doIndexOf(c, start, length() - start); >} > >inline int32_t >UnicodeString::indexOf(UChar32 c, > int32_t start) const { > pinIndex(start); > return indexOf(c, start, length() - start); >} > >inline int32_t >UnicodeString::lastIndexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start, > int32_t _length) const >{ return lastIndexOf(srcChars, 0, srcLength, start, _length); } > >inline int32_t >UnicodeString::lastIndexOf(const UChar *srcChars, > int32_t srcLength, > int32_t start) const { > pinIndex(start); > return lastIndexOf(srcChars, 0, srcLength, start, length() - start); >} > >inline int32_t >UnicodeString::lastIndexOf(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength, > int32_t start, > int32_t _length) const >{ > if(!srcText.isBogus()) { > srcText.pinIndices(srcStart, srcLength); > if(srcLength > 0) { > return lastIndexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); > } > } > return -1; >} > >inline int32_t >UnicodeString::lastIndexOf(const UnicodeString& text, > int32_t start, > int32_t _length) const >{ return lastIndexOf(text, 0, text.length(), start, _length); } > >inline int32_t >UnicodeString::lastIndexOf(const UnicodeString& text, > int32_t start) const { > pinIndex(start); > return lastIndexOf(text, 0, text.length(), start, length() - start); >} > >inline int32_t >UnicodeString::lastIndexOf(const UnicodeString& text) const >{ return lastIndexOf(text, 0, text.length(), 0, length()); } > >inline int32_t >UnicodeString::lastIndexOf(UChar c, > int32_t start, > int32_t _length) const >{ return doLastIndexOf(c, start, _length); } > >inline int32_t >UnicodeString::lastIndexOf(UChar32 c, > int32_t start, > int32_t _length) const { > return doLastIndexOf(c, start, _length); >} > >inline int32_t >UnicodeString::lastIndexOf(UChar c) const >{ return doLastIndexOf(c, 0, length()); } > >inline int32_t >UnicodeString::lastIndexOf(UChar32 c) const { > return lastIndexOf(c, 0, length()); >} > >inline int32_t >UnicodeString::lastIndexOf(UChar c, > int32_t start) const { > pinIndex(start); > return doLastIndexOf(c, start, length() - start); >} > >inline int32_t >UnicodeString::lastIndexOf(UChar32 c, > int32_t start) const { > pinIndex(start); > return lastIndexOf(c, start, length() - start); >} > >inline UBool >UnicodeString::startsWith(const UnicodeString& text) const >{ return compare(0, text.length(), text, 0, text.length()) == 0; } > >inline UBool >UnicodeString::startsWith(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const >{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; } > >inline UBool >UnicodeString::startsWith(const UChar *srcChars, > int32_t srcLength) const >{ return doCompare(0, srcLength, srcChars, 0, srcLength) == 0; } > >inline UBool >UnicodeString::startsWith(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const >{ return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0;} > >inline UBool >UnicodeString::endsWith(const UnicodeString& text) const >{ return doCompare(length() - text.length(), text.length(), > text, 0, text.length()) == 0; } > >inline UBool >UnicodeString::endsWith(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) const { > srcText.pinIndices(srcStart, srcLength); > return doCompare(length() - srcLength, srcLength, > srcText, srcStart, srcLength) == 0; >} > >inline UBool >UnicodeString::endsWith(const UChar *srcChars, > int32_t srcLength) const { > if(srcLength < 0) { > srcLength = u_strlen_44(srcChars); > } > return doCompare(length() - srcLength, srcLength, > srcChars, 0, srcLength) == 0; >} > >inline UBool >UnicodeString::endsWith(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) const { > if(srcLength < 0) { > srcLength = u_strlen_44(srcChars + srcStart); > } > return doCompare(length() - srcLength, srcLength, > srcChars, srcStart, srcLength) == 0; >} > > > > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > const UnicodeString& srcText) >{ return doReplace(start, _length, srcText, 0, srcText.length()); } > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(start, _length, srcText, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > const UChar *srcChars, > int32_t srcLength) >{ return doReplace(start, _length, srcChars, 0, srcLength); } > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(start, _length, srcChars, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > UChar srcChar) >{ return doReplace(start, _length, &srcChar, 0, 1); } > >inline UnicodeString& >UnicodeString::replace(int32_t start, > int32_t _length, > UChar32 srcChar) { > UChar buffer[2]; > int32_t count = 0; > UBool isError = 0; > { if((uint32_t)(srcChar)<=0xffff) { (buffer)[(count)++]=(uint16_t)(srcChar); } else if((uint32_t)(srcChar)<=0x10ffff && (count)+1<(2)) { (buffer)[(count)++]=(uint16_t)(((srcChar)>>10)+0xd7c0); (buffer)[(count)++]=(uint16_t)(((srcChar)&0x3ff)|0xdc00); } else { (isError)=1; } }; > return doReplace(start, _length, buffer, 0, count); >} > >inline UnicodeString& >UnicodeString::replaceBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText) >{ return doReplace(start, limit - start, srcText, 0, srcText.length()); } > >inline UnicodeString& >UnicodeString::replaceBetween(int32_t start, > int32_t limit, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLimit) >{ return doReplace(start, limit - start, srcText, srcStart, srcLimit - srcStart); } > >inline UnicodeString& >UnicodeString::findAndReplace(const UnicodeString& oldText, > const UnicodeString& newText) >{ return findAndReplace(0, length(), oldText, 0, oldText.length(), > newText, 0, newText.length()); } > >inline UnicodeString& >UnicodeString::findAndReplace(int32_t start, > int32_t _length, > const UnicodeString& oldText, > const UnicodeString& newText) >{ return findAndReplace(start, _length, oldText, 0, oldText.length(), > newText, 0, newText.length()); } > > > > >inline void >UnicodeString::doExtract(int32_t start, > int32_t _length, > UnicodeString& target) const >{ target.replace(0, target.length(), *this, start, _length); } > >inline void >UnicodeString::extract(int32_t start, > int32_t _length, > UChar *target, > int32_t targetStart) const >{ doExtract(start, _length, target, targetStart); } > >inline void >UnicodeString::extract(int32_t start, > int32_t _length, > UnicodeString& target) const >{ doExtract(start, _length, target); } > > > >inline int32_t >UnicodeString::extract(int32_t start, > int32_t _length, > char *dst, > const char *codepage) const > >{ > > > > > return extract(start, _length, dst, dst!=0 ? ((dst >= (char*)((size_t)-1) - (4294967295U)) ? (((char*)(4294967295U)) - dst) : (4294967295U)) : 0, codepage); > > > >} > > > >inline void >UnicodeString::extractBetween(int32_t start, > int32_t limit, > UChar *dst, > int32_t dstStart) const { > pinIndex(start); > pinIndex(limit); > doExtract(start, limit - start, dst, dstStart); >} > >inline UnicodeString >UnicodeString::tempSubStringBetween(int32_t start, int32_t limit) const { > return tempSubString(start, limit - start); >} > >inline UChar >UnicodeString::doCharAt(int32_t offset) const >{ > if((uint32_t)offset < (uint32_t)length()) { > return getArrayStart()[offset]; > } else { > return kInvalidUChar; > } >} > >inline UChar >UnicodeString::charAt(int32_t offset) const >{ return doCharAt(offset); } > >inline UChar >UnicodeString::operator[] (int32_t offset) const >{ return doCharAt(offset); } > >inline UChar32 >UnicodeString::char32At(int32_t offset) const >{ > int32_t len = length(); > if((uint32_t)offset < (uint32_t)len) { > const UChar *array = getArrayStart(); > UChar32 c; > { (c)=(array)[offset]; if((((c)&0xfffff800)==0xd800)) { uint16_t __c2; if((((c)&0x400)==0)) { if((offset)+1<(len) && (((__c2=(array)[(offset)+1])&0xfffffc00)==0xdc00)) { (c)=(((UChar32)((c))<<10UL)+(UChar32)(__c2)-((0xd800<<10UL)+0xdc00-0x10000)); } } else { if((offset)-1>=(0) && (((__c2=(array)[(offset)-1])&0xfffffc00)==0xd800)) { (c)=(((UChar32)(__c2)<<10UL)+(UChar32)((c))-((0xd800<<10UL)+0xdc00-0x10000)); } } } }; > return c; > } else { > return kInvalidUChar; > } >} > >inline int32_t >UnicodeString::getChar32Start(int32_t offset) const { > if((uint32_t)offset < (uint32_t)length()) { > const UChar *array = getArrayStart(); > { if(((((array)[offset])&0xfffffc00)==0xdc00) && (offset)>(0) && ((((array)[(offset)-1])&0xfffffc00)==0xd800)) { --(offset); } }; > return offset; > } else { > return 0; > } >} > >inline int32_t >UnicodeString::getChar32Limit(int32_t offset) const { > int32_t len = length(); > if((uint32_t)offset < (uint32_t)len) { > const UChar *array = getArrayStart(); > { if((0)<(offset) && (offset)<(len) && ((((array)[(offset)-1])&0xfffffc00)==0xd800) && ((((array)[offset])&0xfffffc00)==0xdc00)) { ++(offset); } }; > return offset; > } else { > return len; > } >} > >inline UBool >UnicodeString::isEmpty() const { > return fShortLength == 0; >} > > > > >inline void >UnicodeString::setLength(int32_t len) { > if(len <= 127) { > fShortLength = (int8_t)len; > } else { > fShortLength = (int8_t)-1; > fUnion.fFields.fLength = len; > } >} > >inline void >UnicodeString::setToEmpty() { > fShortLength = 0; > fFlags = kShortString; >} > >inline void >UnicodeString::setArray(UChar *array, int32_t len, int32_t capacity) { > setLength(len); > fUnion.fFields.fArray = array; > fUnion.fFields.fCapacity = capacity; >} > >inline const UChar * >UnicodeString::getTerminatedBuffer() { > if(!isWritable()) { > return 0; > } else { > UChar *array = getArrayStart(); > int32_t len = length(); > if(len < getCapacity() && ((fFlags&kRefCounted) == 0 || refCount() == 1)) { > > > > > > > if(!(fFlags&kBufferIsReadonly)) { ># 4229 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/unistr.h" > array[len] = 0; > } > return array; > } else if(cloneArrayIfNeeded(len+1)) { > array = getArrayStart(); > array[len] = 0; > return array; > } else { > return 0; > } > } >} > >inline UnicodeString& >UnicodeString::operator= (UChar ch) >{ return doReplace(0, length(), &ch, 0, 1); } > >inline UnicodeString& >UnicodeString::operator= (UChar32 ch) >{ return replace(0, length(), ch); } > >inline UnicodeString& >UnicodeString::setTo(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) >{ > unBogus(); > return doReplace(0, length(), srcText, srcStart, srcLength); >} > >inline UnicodeString& >UnicodeString::setTo(const UnicodeString& srcText, > int32_t srcStart) >{ > unBogus(); > srcText.pinIndex(srcStart); > return doReplace(0, length(), srcText, srcStart, srcText.length() - srcStart); >} > >inline UnicodeString& >UnicodeString::setTo(const UnicodeString& srcText) >{ > unBogus(); > return doReplace(0, length(), srcText, 0, srcText.length()); >} > >inline UnicodeString& >UnicodeString::setTo(const UChar *srcChars, > int32_t srcLength) >{ > unBogus(); > return doReplace(0, length(), srcChars, 0, srcLength); >} > >inline UnicodeString& >UnicodeString::setTo(UChar srcChar) >{ > unBogus(); > return doReplace(0, length(), &srcChar, 0, 1); >} > >inline UnicodeString& >UnicodeString::setTo(UChar32 srcChar) >{ > unBogus(); > return replace(0, length(), srcChar); >} > >inline UnicodeString& >UnicodeString::append(const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(length(), 0, srcText, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::append(const UnicodeString& srcText) >{ return doReplace(length(), 0, srcText, 0, srcText.length()); } > >inline UnicodeString& >UnicodeString::append(const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(length(), 0, srcChars, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::append(const UChar *srcChars, > int32_t srcLength) >{ return doReplace(length(), 0, srcChars, 0, srcLength); } > >inline UnicodeString& >UnicodeString::append(UChar srcChar) >{ return doReplace(length(), 0, &srcChar, 0, 1); } > >inline UnicodeString& >UnicodeString::append(UChar32 srcChar) { > UChar buffer[2]; > int32_t _length = 0; > UBool isError = 0; > { if((uint32_t)(srcChar)<=0xffff) { (buffer)[(_length)++]=(uint16_t)(srcChar); } else if((uint32_t)(srcChar)<=0x10ffff && (_length)+1<(2)) { (buffer)[(_length)++]=(uint16_t)(((srcChar)>>10)+0xd7c0); (buffer)[(_length)++]=(uint16_t)(((srcChar)&0x3ff)|0xdc00); } else { (isError)=1; } }; > return doReplace(length(), 0, buffer, 0, _length); >} > >inline UnicodeString& >UnicodeString::operator+= (UChar ch) >{ return doReplace(length(), 0, &ch, 0, 1); } > >inline UnicodeString& >UnicodeString::operator+= (UChar32 ch) { > return append(ch); >} > >inline UnicodeString& >UnicodeString::operator+= (const UnicodeString& srcText) >{ return doReplace(length(), 0, srcText, 0, srcText.length()); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > const UnicodeString& srcText, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(start, 0, srcText, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > const UnicodeString& srcText) >{ return doReplace(start, 0, srcText, 0, srcText.length()); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > const UChar *srcChars, > int32_t srcStart, > int32_t srcLength) >{ return doReplace(start, 0, srcChars, srcStart, srcLength); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > const UChar *srcChars, > int32_t srcLength) >{ return doReplace(start, 0, srcChars, 0, srcLength); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > UChar srcChar) >{ return doReplace(start, 0, &srcChar, 0, 1); } > >inline UnicodeString& >UnicodeString::insert(int32_t start, > UChar32 srcChar) >{ return replace(start, 0, srcChar); } > > >inline UnicodeString& >UnicodeString::remove() >{ > > > > if(fFlags & (kIsBogus|kBufferIsReadonly)) { > setToEmpty(); > } else { > fShortLength = 0; > } > return *this; >} > >inline UnicodeString& >UnicodeString::remove(int32_t start, > int32_t _length) >{ > if(start <= 0 && _length == (2147483647)) { > > return remove(); > } > return doReplace(start, _length, __null, 0, 0); >} > >inline UnicodeString& >UnicodeString::removeBetween(int32_t start, > int32_t limit) >{ return doReplace(start, limit - start, __null, 0, 0); } > >inline UnicodeString & >UnicodeString::retainBetween(int32_t start, int32_t limit) { > truncate(limit); > return doReplace(0, start, __null, 0, 0); >} > >inline UBool >UnicodeString::truncate(int32_t targetLength) >{ > if(isBogus() && targetLength == 0) { > > unBogus(); > return 0; > } else if((uint32_t)targetLength < (uint32_t)length()) { > setLength(targetLength); > if(fFlags&kBufferIsReadonly) { > fUnion.fFields.fCapacity = targetLength; > } > return 1; > } else { > return 0; > } >} > >inline UnicodeString& >UnicodeString::reverse() >{ return doReverse(0, length()); } > >inline UnicodeString& >UnicodeString::reverse(int32_t start, > int32_t _length) >{ return doReverse(start, _length); } > >} } ># 15 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" 2 > > > > > > >extern "C++" { namespace icu_44 { ># 55 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" >class StringEnumeration : public UObject { >public: > > > > > virtual ~StringEnumeration(); ># 78 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual StringEnumeration *clone() const; ># 97 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual int32_t count(UErrorCode& status) const = 0; ># 128 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual const char* next(int32_t *resultLength, UErrorCode& status); ># 153 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual const UChar* unext(int32_t *resultLength, UErrorCode& status); ># 171 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual const UnicodeString* snext(UErrorCode& status) = 0; ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual void reset(UErrorCode& status) = 0; ># 194 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > virtual UBool operator==(const StringEnumeration& that)const; > > > > > > > > virtual UBool operator!=(const StringEnumeration& that)const; > >protected: > > > > > UnicodeString unistr; > > > > > char charsBuffer[32]; > > > > > > char *chars; > > > > > int32_t charsCapacity; > > > > > > StringEnumeration(); ># 241 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > void ensureCharsCapacity(int32_t capacity, UErrorCode &status); ># 265 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/strenum.h" > UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status); >}; > >} } ># 25 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" 2 ># 37 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >struct UEnumeration; > >typedef struct UEnumeration UEnumeration; ># 48 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) void >uenum_close_44(UEnumeration* en); > > > >extern "C++" { namespace icu_44 { ># 64 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >class LocalUEnumerationPointer : public LocalPointerBase<UEnumeration> { public: explicit LocalUEnumerationPointer(UEnumeration *p=__null) : LocalPointerBase<UEnumeration>(p) {} ~LocalUEnumerationPointer() { uenum_close_44(ptr); } void adoptInstead(UEnumeration *p) { uenum_close_44(ptr); ptr=p; } }; > >} } ># 84 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) int32_t >uenum_count_44(UEnumeration* en, UErrorCode* status); ># 108 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) const UChar* >uenum_unext_44(UEnumeration* en, > int32_t* resultLength, > UErrorCode* status); ># 141 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) const char* >uenum_next_44(UEnumeration* en, > int32_t* resultLength, > UErrorCode* status); ># 155 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) void >uenum_reset_44(UEnumeration* en, UErrorCode* status); ># 169 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/uenum.h" >extern "C" __attribute__((visibility("default"))) UEnumeration* >uenum_openFromStringEnumeration_44(icu_44:: StringEnumeration* adopted, UErrorCode* ec); ># 52 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" 2 ># 65 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >struct USet; > >typedef struct USet USet; > > > > > >extern "C" { ># 90 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >typedef enum { > UCNV_UNSUPPORTED_CONVERTER = -1, > UCNV_SBCS = 0, > UCNV_DBCS = 1, > UCNV_MBCS = 2, > UCNV_LATIN_1 = 3, > UCNV_UTF8 = 4, > UCNV_UTF16_BigEndian = 5, > UCNV_UTF16_LittleEndian = 6, > UCNV_UTF32_BigEndian = 7, > UCNV_UTF32_LittleEndian = 8, > UCNV_EBCDIC_STATEFUL = 9, > UCNV_ISO_2022 = 10, > > UCNV_LMBCS_1 = 11, > UCNV_LMBCS_2, > UCNV_LMBCS_3, > UCNV_LMBCS_4, > UCNV_LMBCS_5, > UCNV_LMBCS_6, > UCNV_LMBCS_8, > UCNV_LMBCS_11, > UCNV_LMBCS_16, > UCNV_LMBCS_17, > UCNV_LMBCS_18, > UCNV_LMBCS_19, > UCNV_LMBCS_LAST = UCNV_LMBCS_19, > UCNV_HZ, > UCNV_SCSU, > UCNV_ISCII, > UCNV_US_ASCII, > UCNV_UTF7, > UCNV_BOCU1, > UCNV_UTF16, > UCNV_UTF32, > UCNV_CESU8, > UCNV_IMAP_MAILBOX, > > > UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES > >} UConverterType; ># 142 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >typedef enum { > UCNV_UNKNOWN = -1, > UCNV_IBM = 0 >} UConverterPlatform; ># 162 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >typedef void ( *UConverterToUCallback) ( > const void* context, > UConverterToUnicodeArgs *args, > const char *codeUnits, > int32_t length, > UConverterCallbackReason reason, > UErrorCode *pErrorCode); ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >typedef void ( *UConverterFromUCallback) ( > const void* context, > UConverterFromUnicodeArgs *args, > const UChar* codeUnits, > int32_t length, > UChar32 codePoint, > UConverterCallbackReason reason, > UErrorCode *pErrorCode); > >} ># 274 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int >ucnv_compareNames_44(const char *name1, const char *name2); ># 326 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverter* >ucnv_open_44(const char *converterName, UErrorCode *err); ># 356 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverter* >ucnv_openU_44(const UChar *name, > UErrorCode *err); ># 424 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverter* >ucnv_openCCSID_44(int32_t codepage, > UConverterPlatform platform, > UErrorCode * err); ># 459 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverter* >ucnv_openPackage_44(const char *packageName, const char *converterName, UErrorCode *err); ># 499 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverter * >ucnv_safeClone_44(const UConverter *cnv, > void *stackBuffer, > int32_t *pBufferSize, > UErrorCode *status); ># 524 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_close_44(UConverter * converter); > > > >extern "C++" { namespace icu_44 { ># 540 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >class LocalUConverterPointer : public LocalPointerBase<UConverter> { public: explicit LocalUConverterPointer(UConverter *p=__null) : LocalPointerBase<UConverter>(p) {} ~LocalUConverterPointer() { ucnv_close_44(ptr); } void adoptInstead(UConverter *p) { ucnv_close_44(ptr); ptr=p; } }; > >} } ># 563 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getSubstChars_44(const UConverter *converter, > char *subChars, > int8_t *len, > UErrorCode *err); ># 588 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setSubstChars_44(UConverter *converter, > const char *subChars, > int8_t len, > UErrorCode *err); ># 621 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setSubstString_44(UConverter *cnv, > const UChar *s, > int32_t length, > UErrorCode *err); ># 640 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getInvalidChars_44(const UConverter *converter, > char *errBytes, > int8_t *len, > UErrorCode *err); ># 659 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getInvalidUChars_44(const UConverter *converter, > UChar *errUChars, > int8_t *len, > UErrorCode *err); ># 672 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_reset_44(UConverter *converter); ># 683 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_resetToUnicode_44(UConverter *converter); ># 694 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_resetFromUnicode_44(UConverter *converter); ># 745 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int8_t >ucnv_getMaxCharSize_44(const UConverter *converter); ># 778 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int8_t >ucnv_getMinCharSize_44(const UConverter *converter); ># 795 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_getDisplayName_44(const UConverter *converter, > const char *displayLocale, > UChar *displayName, > int32_t displayNameCapacity, > UErrorCode *err); ># 812 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getName_44(const UConverter *converter, UErrorCode *err); ># 838 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_getCCSID_44(const UConverter *converter, > UErrorCode *err); ># 852 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverterPlatform >ucnv_getPlatform_44(const UConverter *converter, > UErrorCode *err); ># 864 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UConverterType >ucnv_getType_44(const UConverter * converter); ># 882 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getStarters_44(const UConverter* converter, > UBool starters[256], > UErrorCode* err); > > > > > > > >typedef enum UConverterUnicodeSet { > > UCNV_ROUNDTRIP_SET, > > UCNV_ROUNDTRIP_AND_FALLBACK_SET, > > UCNV_SET_COUNT >} UConverterUnicodeSet; ># 948 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getUnicodeSet_44(const UConverter *cnv, > USet *setFillIn, > UConverterUnicodeSet whichSet, > UErrorCode *pErrorCode); ># 965 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getToUCallBack_44 (const UConverter * converter, > UConverterToUCallback *action, > const void **context); ># 981 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getFromUCallBack_44 (const UConverter * converter, > UConverterFromUCallback *action, > const void **context); ># 1001 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setToUCallBack_44 (UConverter * converter, > UConverterToUCallback newAction, > const void* newContext, > UConverterToUCallback *oldAction, > const void** oldContext, > UErrorCode * err); ># 1024 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setFromUCallBack_44 (UConverter * converter, > UConverterFromUCallback newAction, > const void *newContext, > UConverterFromUCallback *oldAction, > const void **oldContext, > UErrorCode * err); ># 1090 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_fromUnicode_44 (UConverter * converter, > char **target, > const char *targetLimit, > const UChar ** source, > const UChar * sourceLimit, > int32_t* offsets, > UBool flush, > UErrorCode * err); ># 1159 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_toUnicode_44(UConverter *converter, > UChar **target, > const UChar *targetLimit, > const char **source, > const char *sourceLimit, > int32_t *offsets, > UBool flush, > UErrorCode *err); ># 1196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_fromUChars_44(UConverter *cnv, > char *dest, int32_t destCapacity, > const UChar *src, int32_t srcLength, > UErrorCode *pErrorCode); ># 1228 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_toUChars_44(UConverter *cnv, > UChar *dest, int32_t destCapacity, > const char *src, int32_t srcLength, > UErrorCode *pErrorCode); ># 1304 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UChar32 >ucnv_getNextUChar_44(UConverter * converter, > const char **source, > const char * sourceLimit, > UErrorCode * err); ># 1448 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_convertEx_44(UConverter *targetCnv, UConverter *sourceCnv, > char **target, const char *targetLimit, > const char **source, const char *sourceLimit, > UChar *pivotStart, UChar **pivotSource, > UChar **pivotTarget, const UChar *pivotLimit, > UBool reset, UBool flush, > UErrorCode *pErrorCode); ># 1512 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_convert_44(const char *toConverterName, > const char *fromConverterName, > char *target, > int32_t targetCapacity, > const char *source, > int32_t sourceLength, > UErrorCode *pErrorCode); ># 1566 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_toAlgorithmic_44(UConverterType algorithmicType, > UConverter *cnv, > char *target, int32_t targetCapacity, > const char *source, int32_t sourceLength, > UErrorCode *pErrorCode); ># 1618 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_fromAlgorithmic_44(UConverter *cnv, > UConverterType algorithmicType, > char *target, int32_t targetCapacity, > const char *source, int32_t sourceLength, > UErrorCode *pErrorCode); ># 1632 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_flushCache_44(void); ># 1642 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_countAvailable_44(void); ># 1655 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char* >ucnv_getAvailableName_44(int32_t n); ># 1670 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UEnumeration * >ucnv_openAllNames_44(UErrorCode *pErrorCode); ># 1683 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) uint16_t >ucnv_countAliases_44(const char *alias, UErrorCode *pErrorCode); ># 1698 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getAlias_44(const char *alias, uint16_t n, UErrorCode *pErrorCode); ># 1714 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_getAliases_44(const char *alias, const char **aliases, UErrorCode *pErrorCode); ># 1740 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UEnumeration * >ucnv_openStandardNames_44(const char *convName, > const char *standard, > UErrorCode *pErrorCode); > > > > > > >extern "C" __attribute__((visibility("default"))) uint16_t >ucnv_countStandards_44(void); ># 1760 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getStandard_44(uint16_t n, UErrorCode *pErrorCode); ># 1782 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getStandardName_44(const char *name, const char *standard, UErrorCode *pErrorCode); ># 1804 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getCanonicalName_44(const char *alias, const char *standard, UErrorCode *pErrorCode); ># 1821 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char * >ucnv_getDefaultName_44(void); ># 1840 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setDefaultName_44(const char *name); ># 1860 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_fixFileSeparator_44(const UConverter *cnv, UChar *source, int32_t sourceLen); ># 1871 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UBool >ucnv_isAmbiguous_44(const UConverter *cnv); ># 1889 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) void >ucnv_setFallback_44(UConverter *cnv, UBool usesFallback); ># 1901 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) UBool >ucnv_usesFallback_44(const UConverter *cnv); ># 1960 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) const char* >ucnv_detectUnicodeSignature_44(const char* source, > int32_t sourceLength, > int32_t *signatureLength, > UErrorCode *pErrorCode); ># 1977 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_fromUCountPending_44(const UConverter* cnv, UErrorCode* status); ># 1991 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ucnv.h" >extern "C" __attribute__((visibility("default"))) int32_t >ucnv_toUCountPending_44(const UConverter* cnv, UErrorCode* status); ># 30 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" 1 ># 19 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" 1 ># 16 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" >extern "C" { ># 42 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" >typedef void* UReplaceable; ># 51 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" >typedef struct UReplaceableCallbacks { ># 61 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > int32_t (*length)(const UReplaceable* rep); ># 74 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > UChar (*charAt)(const UReplaceable* rep, > int32_t offset); ># 87 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > UChar32 (*char32At)(const UReplaceable* rep, > int32_t offset); ># 106 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > void (*replace)(UReplaceable* rep, > int32_t start, > int32_t limit, > const UChar* text, > int32_t textLength); ># 125 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > void (*extract)(UReplaceable* rep, > int32_t start, > int32_t limit, > UChar* dst); ># 146 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/urep.h" > void (*copy)(UReplaceable* rep, > int32_t start, > int32_t limit, > int32_t dest); > >} UReplaceableCallbacks; > >} ># 20 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/parseerr.h" 1 ># 25 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/parseerr.h" >enum { U_PARSE_CONTEXT_LEN = 16 }; ># 56 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/parseerr.h" >typedef struct UParseError { ># 65 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/parseerr.h" > int32_t line; ># 74 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/parseerr.h" > int32_t offset; > > > > > > > UChar preContext[U_PARSE_CONTEXT_LEN]; > > > > > > > UChar postContext[U_PARSE_CONTEXT_LEN]; > >} UParseError; ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" 2 ># 67 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >typedef void* UTransliterator; ># 77 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >typedef enum UTransDirection { > > > > > > > > UTRANS_FORWARD, > > > > > > > > UTRANS_REVERSE > >} UTransDirection; ># 119 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >typedef struct UTransPosition { ># 129 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" > int32_t contextStart; ># 139 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" > int32_t contextLimit; ># 148 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" > int32_t start; ># 157 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" > int32_t limit; > >} UTransPosition; ># 188 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) UTransliterator* >utrans_openU_44(const UChar *id, > int32_t idLength, > UTransDirection dir, > const UChar *rules, > int32_t rulesLength, > UParseError *parseError, > UErrorCode *pErrorCode); ># 212 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) UTransliterator* >utrans_openInverse_44(const UTransliterator* trans, > UErrorCode* status); ># 226 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) UTransliterator* >utrans_clone_44(const UTransliterator* trans, > UErrorCode* status); > > > > > > > >extern "C" __attribute__((visibility("default"))) void >utrans_close_44(UTransliterator* trans); > > > >extern "C++" { namespace icu_44 { ># 252 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >class LocalUTransliteratorPointer : public LocalPointerBase<UTransliterator> { public: explicit LocalUTransliteratorPointer(UTransliterator *p=__null) : LocalPointerBase<UTransliterator>(p) {} ~LocalUTransliteratorPointer() { utrans_close_44(ptr); } void adoptInstead(UTransliterator *p) { utrans_close_44(ptr); ptr=p; } }; > >} } ># 272 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) const UChar * >utrans_getUnicodeID_44(const UTransliterator *trans, > int32_t *resultLength); ># 290 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_register_44(UTransliterator* adoptedTrans, > UErrorCode* status); ># 303 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_unregisterID_44(const UChar* id, int32_t idLength); ># 324 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_setFilter_44(UTransliterator* trans, > const UChar* filterPattern, > int32_t filterPatternLen, > UErrorCode* status); ># 337 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) int32_t >utrans_countAvailableIDs_44(void); ># 349 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) UEnumeration * >utrans_openIDs_44(UErrorCode *pErrorCode); ># 379 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_trans_44(const UTransliterator* trans, > UReplaceable* rep, > UReplaceableCallbacks* repFunc, > int32_t start, > int32_t* limit, > UErrorCode* status); ># 430 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_transIncremental_44(const UTransliterator* trans, > UReplaceable* rep, > UReplaceableCallbacks* repFunc, > UTransPosition* pos, > UErrorCode* status); ># 468 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_transUChars_44(const UTransliterator* trans, > UChar* text, > int32_t* textLength, > int32_t textCapacity, > int32_t start, > int32_t* limit, > UErrorCode* status); ># 503 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) void >utrans_transIncrementalUChars_44(const UTransliterator* trans, > UChar* text, > int32_t* textLength, > int32_t textCapacity, > UTransPosition* pos, > UErrorCode* status); ># 538 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) __attribute__ ((deprecated)) UTransliterator* >utrans_open_44(const char* id, > UTransDirection dir, > const UChar* rules, > int32_t rulesLength, > UParseError* parseError, > UErrorCode* status); ># 561 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) __attribute__ ((deprecated)) int32_t >utrans_getID_44(const UTransliterator* trans, > char* buf, > int32_t bufCapacity); ># 575 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) __attribute__ ((deprecated)) void >utrans_unregister_44(const char* id); ># 596 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/utrans.h" >extern "C" __attribute__((visibility("default"))) __attribute__ ((deprecated)) int32_t >utrans_getAvailableID_44(int32_t index, > char* buf, > int32_t bufCapacity); ># 31 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" 2 ># 207 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >typedef struct UFILE UFILE; > > > > > > >typedef enum { > U_READ = 1, > U_WRITE = 2, > U_READWRITE =3 >} UFileDirection; ># 237 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UFILE* >u_fopen_44(const char *filename, > const char *perm, > const char *locale, > const char *codepage); ># 259 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UFILE* >u_finit_44(FILE *f, > const char *locale, > const char *codepage); ># 280 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UFILE* >u_fadopt_44(FILE *f, > const char *locale, > const char *codepage); ># 299 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UFILE* >u_fstropen_44(UChar *stringBuf, > int32_t capacity, > const char *locale); > > > > > > > >extern "C" __attribute__((visibility("default"))) void >u_fclose_44(UFILE *file); > > > >extern "C++" { namespace icu_44 { ># 326 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >class LocalUFILEPointer : public LocalPointerBase<UFILE> { public: explicit LocalUFILEPointer(UFILE *p=__null) : LocalPointerBase<UFILE>(p) {} ~LocalUFILEPointer() { u_fclose_44(ptr); } void adoptInstead(UFILE *p) { u_fclose_44(ptr); ptr=p; } }; > >} } ># 340 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UBool >u_feof_44(UFILE *f); ># 353 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) void >u_fflush_44(UFILE *file); > > > > > > >extern "C" __attribute__((visibility("default"))) void >u_frewind_44(UFILE *file); > > > > > > > >extern "C" __attribute__((visibility("default"))) FILE* >u_fgetfile_44(UFILE *f); ># 383 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) const char* >u_fgetlocale_44(UFILE *file); ># 394 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fsetlocale_44(UFILE *file, > const char *locale); ># 409 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) const char* >u_fgetcodepage_44(UFILE *file); ># 427 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fsetcodepage_44(const char *codepage, > UFILE *file); ># 438 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UConverter* u_fgetConverter_44(UFILE *f); ># 452 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fprintf_44(UFILE *f, > const char *patternSpecification, > ... ); ># 469 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vfprintf_44(UFILE *f, > const char *patternSpecification, > va_list ap); ># 482 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fprintf_u_44(UFILE *f, > const UChar *patternSpecification, > ... ); ># 499 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vfprintf_u_44(UFILE *f, > const UChar *patternSpecification, > va_list ap); ># 514 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fputs_44(const UChar *s, > UFILE *f); ># 525 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_fputc_44(UChar32 uc, > UFILE *f); ># 540 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_file_write_44(const UChar *ustring, > int32_t count, > UFILE *f); ># 558 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fscanf_44(UFILE *f, > const char *patternSpecification, > ... ); ># 576 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vfscanf_44(UFILE *f, > const char *patternSpecification, > va_list ap); ># 590 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_fscanf_u_44(UFILE *f, > const UChar *patternSpecification, > ... ); ># 608 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vfscanf_u_44(UFILE *f, > const UChar *patternSpecification, > va_list ap); ># 626 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UChar* >u_fgets_44(UChar *s, > int32_t n, > UFILE *f); ># 640 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UChar >u_fgetc_44(UFILE *f); ># 653 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_fgetcx_44(UFILE *f); ># 667 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UChar32 >u_fungetc_44(UChar32 c, > UFILE *f); ># 681 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_file_read_44(UChar *chars, > int32_t count, > UFILE *f); ># 705 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) UTransliterator* >u_fsettransliterator_44(UFILE *file, UFileDirection direction, > UTransliterator *adopt, UErrorCode *status); ># 726 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_sprintf_44(UChar *buffer, > const char *patternSpecification, > ... ); ># 748 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_snprintf_44(UChar *buffer, > int32_t count, > const char *patternSpecification, > ... ); ># 767 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsprintf_44(UChar *buffer, > const char *patternSpecification, > va_list ap); ># 792 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsnprintf_44(UChar *buffer, > int32_t count, > const char *patternSpecification, > va_list ap); ># 807 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_sprintf_u_44(UChar *buffer, > const UChar *patternSpecification, > ... ); ># 828 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_snprintf_u_44(UChar *buffer, > int32_t count, > const UChar *patternSpecification, > ... ); ># 847 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsprintf_u_44(UChar *buffer, > const UChar *patternSpecification, > va_list ap); ># 872 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsnprintf_u_44(UChar *buffer, > int32_t count, > const UChar *patternSpecification, > va_list ap); ># 890 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_sscanf_44(const UChar *buffer, > const char *patternSpecification, > ... ); ># 909 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsscanf_44(const UChar *buffer, > const char *patternSpecification, > va_list ap); ># 924 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_sscanf_u_44(const UChar *buffer, > const UChar *patternSpecification, > ... ); ># 943 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/unicode/ustdio.h" >extern "C" __attribute__((visibility("default"))) int32_t >u_vsscanf_u_44(const UChar *buffer, > const UChar *patternSpecification, > va_list ap); ># 42 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_const.h" 1 ># 44 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_retcodes.h" 1 ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_retcodes.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" 1 ># 86 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef char OSII_BOOL; ># 102 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef char OSII_CHAR; > > > > > typedef char* OSII_STRING; > > > > > typedef UChar OSII_UCHAR; > > > > > typedef UChar* OSII_USTRING; ># 127 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef int8_t OSII_INT8; > > > > > > typedef int16_t OSII_INT16; > > > > > > typedef int32_t OSII_INT32; > > > > > > typedef int64_t OSII_INT64; ># 156 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef uint8_t OSII_UINT8; > > > > > typedef uint16_t OSII_UINT16; > > > > > typedef uint32_t OSII_UINT32; > > > > > typedef uint64_t OSII_UINT64; ># 282 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef float OSII_FLOAT; > > > > > typedef double OSII_DOUBLE; > > > > > > > > typedef OSII_UINT8 OSII_BIT; > > > > > typedef OSII_UINT8 OSII_BYTE; > > > > > typedef OSII_UINT16 OSII_HALF_WORD; > > > > > typedef OSII_UINT32 OSII_WORD; > > > > > typedef OSII_UINT64 OSII_LONG_WORD; > > > > > > > > typedef char* OSII_POINTER; > > > > > typedef void* OSII_VOIDPTR; > > > > > > typedef OSII_INT64 OSII_INTPTR; ># 345 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef OSII_INT32 OSII_RETCODE; > > > > > > > > typedef OSII_UINT16 OSII_PORT; ># 367 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef OSII_INT32 OSII_SOCKET; > > > > > > typedef OSII_BYTE OSII_IPV6ADDR[ 16 ]; ># 399 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef pthread_mutex_t OSII_MUTEX; ># 426 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef struct > { > unsigned int count; > unsigned int maxCount; > pthread_mutex_t mutex; > pthread_cond_t cond; > } OSII_SEMAPHORE; ># 449 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef struct > { > unsigned char manual; > unsigned char state; > pthread_mutex_t mutex; > pthread_cond_t cond; > } OSII_EVENT; ># 465 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef struct > { > OSII_MUTEX mutex; > OSII_UINT32 count; > OSII_UINT32 max; > OSII_UINT32 last; > OSII_UINT32 first; > OSII_SEMAPHORE sem; > void **table; > OSII_SEMAPHORE *sems; > OSII_BOOL *wait; > > } OSII_SIGQUEUE; ># 502 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef struct > { > pthread_mutex_t lock; > pthread_cond_t read; > pthread_cond_t write; > OSII_UINT32 readers; > OSII_UINT32 writers; > OSII_UINT32 read_waiters; > OSII_UINT32 write_waiters; > } OSII_LOCKS; ># 528 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_types.h" > typedef pthread_t OSII_THREAD; ># 15 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_retcodes.h" 2 ># 45 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" 1 > > > > > ># 1 "/usr/include/errno.h" 1 3 4 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" 2 ># 199 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_endn.h" 1 ># 200 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" 2 ># 330 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" > typedef struct stat osii_stat_struct; > typedef struct timeb osii_timeb_struct; > > > > > typedef struct statfs osii_statfs_struct; ># 353 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" ># 1 "/usr/include/signal.h" 1 3 4 ># 30 "/usr/include/signal.h" 3 4 >extern "C" { > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 103 "/usr/include/bits/sigset.h" 3 4 >extern int __sigismember (const __sigset_t *, int); >extern int __sigaddset (__sigset_t *, int); >extern int __sigdelset (__sigset_t *, int); ># 117 "/usr/include/bits/sigset.h" 3 4 >extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } >extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } >extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } ># 33 "/usr/include/signal.h" 2 3 4 > > > > > > > >typedef __sig_atomic_t sig_atomic_t; > ># 57 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/signum.h" 1 3 4 ># 58 "/usr/include/signal.h" 2 3 4 ># 80 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 24 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 2 3 4 ># 58 "/usr/include/bits/siginfo.h" 3 4 >typedef __clock_t __sigchld_clock_t; > > > >typedef struct > { > int si_signo; > int si_errno; > > int si_code; > > union > { > int _pad[((128 / sizeof (int)) - 4)]; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > } _kill; > > > struct > { > int si_tid; > int si_overrun; > sigval_t si_sigval; > } _timer; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > sigval_t si_sigval; > } _rt; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > int si_status; > __sigchld_clock_t si_utime; > __sigchld_clock_t si_stime; > } _sigchld; > > > struct > { > void *si_addr; > } _sigfault; > > > struct > { > long int si_band; > int si_fd; > } _sigpoll; > > > struct > { > void *_call_addr; > int _syscall; > unsigned int _arch; > } _sigsys; > } _sifields; > } siginfo_t ; ># 151 "/usr/include/bits/siginfo.h" 3 4 >enum >{ > SI_ASYNCNL = -60, > > SI_TKILL = -6, > > SI_SIGIO, > > SI_ASYNCIO, > > SI_MESGQ, > > SI_TIMER, > > SI_QUEUE, > > SI_USER, > > SI_KERNEL = 0x80 > >}; > > > >enum >{ > ILL_ILLOPC = 1, > > ILL_ILLOPN, > > ILL_ILLADR, > > ILL_ILLTRP, > > ILL_PRVOPC, > > ILL_PRVREG, > > ILL_COPROC, > > ILL_BADSTK > >}; > > >enum >{ > FPE_INTDIV = 1, > > FPE_INTOVF, > > FPE_FLTDIV, > > FPE_FLTOVF, > > FPE_FLTUND, > > FPE_FLTRES, > > FPE_FLTINV, > > FPE_FLTSUB > >}; > > >enum >{ > SEGV_MAPERR = 1, > > SEGV_ACCERR > >}; > > >enum >{ > BUS_ADRALN = 1, > > BUS_ADRERR, > > BUS_OBJERR > >}; > > >enum >{ > TRAP_BRKPT = 1, > > TRAP_TRACE > >}; > > >enum >{ > CLD_EXITED = 1, > > CLD_KILLED, > > CLD_DUMPED, > > CLD_TRAPPED, > > CLD_STOPPED, > > CLD_CONTINUED > >}; > > >enum >{ > POLL_IN = 1, > > POLL_OUT, > > POLL_MSG, > > POLL_ERR, > > POLL_PRI, > > POLL_HUP > >}; ># 81 "/usr/include/signal.h" 2 3 4 > > > > >typedef void (*__sighandler_t) (int); > > > > >extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) > throw (); > >extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) > throw (); > > > > > > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) > throw (); ># 114 "/usr/include/signal.h" 3 4 > > > > > >extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) > throw (); > > > > > > >extern int kill (__pid_t __pid, int __sig) throw (); > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) throw (); > > > > >extern int raise (int __sig) throw (); > > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) > throw (); >extern int gsignal (int __sig) throw (); > > > > >extern void psignal (int __sig, const char *__s); > > > > >extern void psiginfo (const siginfo_t *__pinfo, const char *__s); ># 169 "/usr/include/signal.h" 3 4 >extern int __sigpause (int __sig_or_mask, int __is_sig); ># 178 "/usr/include/signal.h" 3 4 >extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); ># 197 "/usr/include/signal.h" 3 4 >extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); > > >extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); > > >extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); ># 212 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sighandler_t; > > > > >typedef __sighandler_t sig_t; > > > > > >extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); > > >extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); > > >extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); > > >extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); > > >extern int sigismember (const sigset_t *__set, int __signo) > throw () __attribute__ ((__nonnull__ (1))); > > > >extern int sigisemptyset (const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); > > >extern int sigandset (sigset_t *__set, const sigset_t *__left, > const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); > > >extern int sigorset (sigset_t *__set, const sigset_t *__left, > const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); > > > > ># 1 "/usr/include/bits/sigaction.h" 1 3 4 ># 24 "/usr/include/bits/sigaction.h" 3 4 >struct sigaction > { > > > union > { > > __sighandler_t sa_handler; > > void (*sa_sigaction) (int, siginfo_t *, void *); > } > __sigaction_handler; > > > > > > > > __sigset_t sa_mask; > > > int sa_flags; > > > void (*sa_restorer) (void); > }; ># 254 "/usr/include/signal.h" 2 3 4 > > >extern int sigprocmask (int __how, const sigset_t *__restrict __set, > sigset_t *__restrict __oset) throw (); > > > > > > >extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); > > >extern int sigaction (int __sig, const struct sigaction *__restrict __act, > struct sigaction *__restrict __oact) throw (); > > >extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) > __attribute__ ((__nonnull__ (1, 2))); > > > > > > >extern int sigwaitinfo (const sigset_t *__restrict __set, > siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); > > > > > > >extern int sigtimedwait (const sigset_t *__restrict __set, > siginfo_t *__restrict __info, > const struct timespec *__restrict __timeout) > __attribute__ ((__nonnull__ (1))); > > > >extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) > throw (); ># 311 "/usr/include/signal.h" 3 4 >extern const char *const _sys_siglist[65]; >extern const char *const sys_siglist[65]; > > >struct sigvec > { > __sighandler_t sv_handler; > int sv_mask; > > int sv_flags; > > }; ># 335 "/usr/include/signal.h" 3 4 >extern int sigvec (int __sig, const struct sigvec *__vec, > struct sigvec *__ovec) throw (); > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 29 "/usr/include/bits/sigcontext.h" 3 4 >struct _fpx_sw_bytes >{ > __uint32_t magic1; > __uint32_t extended_size; > __uint64_t xstate_bv; > __uint32_t xstate_size; > __uint32_t padding[7]; >}; > >struct _fpreg >{ > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg >{ > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg >{ > __uint32_t element[4]; >}; ># 121 "/usr/include/bits/sigcontext.h" 3 4 >struct _fpstate >{ > > __uint16_t cwd; > __uint16_t swd; > __uint16_t ftw; > __uint16_t fop; > __uint64_t rip; > __uint64_t rdp; > __uint32_t mxcsr; > __uint32_t mxcr_mask; > struct _fpxreg _st[8]; > struct _xmmreg _xmm[16]; > __uint32_t padding[24]; >}; > >struct sigcontext >{ > __uint64_t r8; > __uint64_t r9; > __uint64_t r10; > __uint64_t r11; > __uint64_t r12; > __uint64_t r13; > __uint64_t r14; > __uint64_t r15; > __uint64_t rdi; > __uint64_t rsi; > __uint64_t rbp; > __uint64_t rbx; > __uint64_t rdx; > __uint64_t rax; > __uint64_t rcx; > __uint64_t rsp; > __uint64_t rip; > __uint64_t eflags; > unsigned short cs; > unsigned short gs; > unsigned short fs; > unsigned short __pad0; > __uint64_t err; > __uint64_t trapno; > __uint64_t oldmask; > __uint64_t cr2; > __extension__ union > { > struct _fpstate * fpstate; > __uint64_t __fpstate_word; > }; > __uint64_t __reserved1 [8]; >}; > > > >struct _xsave_hdr >{ > __uint64_t xstate_bv; > __uint64_t reserved1[2]; > __uint64_t reserved2[5]; >}; > >struct _ymmh_state >{ > __uint32_t ymmh_space[64]; >}; > >struct _xstate >{ > struct _fpstate fpstate; > struct _xsave_hdr xstate_hdr; > struct _ymmh_state ymmh; >}; ># 341 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) throw (); > > > > > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 351 "/usr/include/signal.h" 2 3 4 > > > > >extern int siginterrupt (int __sig, int __interrupt) throw (); > ># 1 "/usr/include/bits/sigstack.h" 1 3 4 ># 25 "/usr/include/bits/sigstack.h" 3 4 >struct sigstack > { > void *ss_sp; > int ss_onstack; > }; > > > >enum >{ > SS_ONSTACK = 1, > > SS_DISABLE > >}; ># 49 "/usr/include/bits/sigstack.h" 3 4 >typedef struct sigaltstack > { > void *ss_sp; > int ss_flags; > size_t ss_size; > } stack_t; ># 358 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/sys/ucontext.h" 1 3 4 ># 22 "/usr/include/sys/ucontext.h" 3 4 ># 1 "/usr/include/signal.h" 1 3 4 ># 23 "/usr/include/sys/ucontext.h" 2 3 4 ># 31 "/usr/include/sys/ucontext.h" 3 4 >__extension__ typedef long long int greg_t; > > > > > >typedef greg_t gregset_t[23]; > > > >enum >{ > REG_R8 = 0, > > REG_R9, > > REG_R10, > > REG_R11, > > REG_R12, > > REG_R13, > > REG_R14, > > REG_R15, > > REG_RDI, > > REG_RSI, > > REG_RBP, > > REG_RBX, > > REG_RDX, > > REG_RAX, > > REG_RCX, > > REG_RSP, > > REG_RIP, > > REG_EFL, > > REG_CSGSFS, > > REG_ERR, > > REG_TRAPNO, > > REG_OLDMASK, > > REG_CR2 > >}; > > >struct _libc_fpxreg >{ > unsigned short int significand[4]; > unsigned short int exponent; > unsigned short int padding[3]; >}; > >struct _libc_xmmreg >{ > __uint32_t element[4]; >}; > >struct _libc_fpstate >{ > > __uint16_t cwd; > __uint16_t swd; > __uint16_t ftw; > __uint16_t fop; > __uint64_t rip; > __uint64_t rdp; > __uint32_t mxcsr; > __uint32_t mxcr_mask; > struct _libc_fpxreg _st[8]; > struct _libc_xmmreg _xmm[16]; > __uint32_t padding[24]; >}; > > >typedef struct _libc_fpstate *fpregset_t; > > >typedef struct > { > gregset_t gregs; > > fpregset_t fpregs; > __extension__ unsigned long long __reserved1 [8]; >} mcontext_t; > > >typedef struct ucontext > { > unsigned long int uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > __sigset_t uc_sigmask; > struct _libc_fpstate __fpregs_mem; > } ucontext_t; ># 361 "/usr/include/signal.h" 2 3 4 > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) > throw () __attribute__ ((__deprecated__)); > > > >extern int sigaltstack (const struct sigaltstack *__restrict __ss, > struct sigaltstack *__restrict __oss) throw (); > > > > > > > >extern int sighold (int __sig) throw (); > > >extern int sigrelse (int __sig) throw (); > > >extern int sigignore (int __sig) throw (); > > >extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); > > > > > > ># 1 "/usr/include/bits/sigthread.h" 1 3 4 ># 30 "/usr/include/bits/sigthread.h" 3 4 >extern int pthread_sigmask (int __how, > const __sigset_t *__restrict __newmask, > __sigset_t *__restrict __oldmask)throw (); > > >extern int pthread_kill (pthread_t __threadid, int __signo) throw (); > > > >extern int pthread_sigqueue (pthread_t __threadid, int __signo, > const union sigval __value) throw (); ># 397 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) throw (); > >extern int __libc_current_sigrtmax (void) throw (); > > > >} ># 354 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" 2 ># 366 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_port.h" >int osii_chdir( const OSII_CHAR *path ); ># 47 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_BaseNET.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_monarchNET.h" 1 ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_BaseNET.h" 2 ># 193 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_BaseNET.h" >extern int BaseNET_check_version_internal( const char *name, int arch, int major, int minor, int patch ); >extern void osii_basenet_lazy_and_slow_log( const char *format, ... ); ># 49 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" 1 ># 20 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern "C" { ># 196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef int ( *MAIN_FUNC )( int, char *argv[] ); > > >typedef struct _OSII_DESTROY_STR >{ > > void *userdata; > > > > > > void (*destroy)( void *item ); > > > > > > > void (*destroy_ud)( void *item, void *userdata ); > >} OSII_DESTROY_STR; > > >typedef struct >{ > > void *ptr; > > size_t size; > >} OSII_MEM_STR; ># 244 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_ato64( const OSII_CHAR *str ); > > > > > > > >extern OSII_UINT64 osii_double_to_u64( OSII_DOUBLE value ); ># 262 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_DOUBLE osii_u64_to_double( OSII_UINT64 value ); ># 271 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT64 osii_hton64( OSII_UINT64 data ); > > > > > > > >extern OSII_UINT64 osii_ntoh64( OSII_UINT64 data ); > >extern void osii_test_close( void *f ); >extern void *osii_test_open( const OSII_CHAR *file ); >extern int osii_test_print( FILE *f, const OSII_CHAR *unit_name, const OSII_CHAR *test_name, const OSII_CHAR *extra ); > >extern OSII_RETCODE osii_base64_to_bin( const char *source, OSII_BYTE *buffer, OSII_INT32 len, OSII_INT32 *size ); >extern OSII_RETCODE osii_bin_to_base64( const OSII_BYTE *source, OSII_STRING buffer, OSII_INT32 len, OSII_INT32 *size ); > > >typedef void* OSIICRYPT_HANDLE; ># 320 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_encrypt_to_text( OSII_STRING toStr, const char *fromStr, OSII_UINT32 cipher, OSII_UINT32 encoding ); ># 349 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_encrypt_to_text_key( OSII_STRING toStr, OSII_INT32 to_len, const char *fromStr, OSII_UINT32 encoding, OSIICRYPT_HANDLE hkey ); >extern OSII_RETCODE hasher( OSII_BYTE * d_in, OSII_BYTE * d_out, size_t sz ) ; ># 374 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_decrypt_from_text( OSII_STRING toStr, const char *fromStr, OSII_UINT32 cipher, OSII_UINT32 encoding ); ># 396 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_decrypt_from_text_key( OSII_STRING toStr, OSII_INT32 to_len, const char *fromStr, OSII_UINT32 encoding, OSIICRYPT_HANDLE hkey ); ># 408 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >enum OSITypeCode >{ > > OSITypeCode_Empty = 0, > > OSITypeCode_Object = 1, > > OSITypeCode_DBNull = 2, > > OSITypeCode_Boolean = 3, > > > > OSITypeCode_Char = 4, > > > OSITypeCode_SByte = 5, > > OSITypeCode_Byte = 6, > > OSITypeCode_Int16 = 7, > > OSITypeCode_UInt16 = 8, > > OSITypeCode_Int32 = 9, > > OSITypeCode_UInt32 = 10, > > > OSITypeCode_Int64 = 11, > > > OSITypeCode_UInt64 = 12, > > > OSITypeCode_Single = 13, > > > OSITypeCode_Double = 14, > > > OSITypeCode_Decimal = 15, > > OSITypeCode_DateTime = 16, > > OSITypeCode_String = 18, > > OSITypeCode_ASCII = 0x0100, > > OSITypeCode_Array = 0x8000, > > OSITypeCode_DBNull_Array = 0x8002, > > OSITypeCode_SByte_Array = 0x8005, > > OSITypeCode_Byte_Array = 0x8006, > > OSITypeCode_Int16_Array = 0x8007, > > OSITypeCode_UInt16_Array = 0x8008, > > OSITypeCode_Int32_Array = 0x8009, > > OSITypeCode_UInt32_Array = 0x800a, > > OSITypeCode_Int64_Array = 0x800b, > > OSITypeCode_UInt64_Array = 0x800c, > > OSITypeCode_Single_Array = 0x800d, > > OSITypeCode_Double_Array = 0x800e, > > OSITypeCode_String_Array = 0x8012, > > OSITypeCode_ASCII_Array = 0x8100, > >}; ># 510 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef void * OSII_SHLIB_HANDLE; > > >typedef void * OSII_SHLIB_FUNC; ># 528 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_background( const OSII_CHAR *program ); >extern void osii_set_exit_logging_mode( OSII_BOOL mode ); ># 545 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_envsub( const char *string, OSII_STRING result, size_t len ); ># 565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_envsub_ext( const char *string, OSII_STRING result, size_t len ); ># 578 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_setenv(const OSII_CHAR *name, const OSII_CHAR *value, OSII_INT32 overwrite); ># 587 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_error_message( const OSII_CHAR *message, const OSII_CHAR *title ); ># 598 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_get_error_string( int err, OSII_INT32 unused, size_t size, OSII_STRING buf ); ># 607 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_gethostname( OSII_STRING host_name, size_t size ); ># 646 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_start( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid ); ># 685 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_start_ext( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid, OSII_INT32 *exitcode ); ># 729 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_RETCODE osii_process_start_callback( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid, void (* callback)( void * ), void * cb_args ); ># 771 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_start_env( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid, OSII_UINT32 numenv, const OSII_STRING envp[] ); ># 818 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_start_callback_env( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid, void (* callback)( void * ), void * cb_args, OSII_UINT32 numenv, const OSII_STRING envp[] ); ># 864 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_start_callback_env_ext( const char *command, OSII_UINT32 timeout, OSII_BYTE options, OSII_UINT32 *ppid, OSII_INT32 *exitcode, void (* callback)( void * ), void * cb_args, OSII_UINT32 numenv, const OSII_STRING envp[] ); ># 876 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_kill_signal( OSII_UINT32 pid, OSII_UINT32 usig ); ># 886 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_kill( OSII_UINT32 pid ); ># 902 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_process_running( OSII_UINT32 pid, OSII_STRING name, size_t size ); ># 914 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_is_running( const char *program ); ># 925 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_is_running_legacy( const char *program ); ># 952 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_terminate_signal( OSII_UINT32 pid, OSII_UINT32 usig ); ># 978 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_process_tree_kill_signal( OSII_UINT32 pid, OSII_UINT32 usig ); > > >typedef struct _OSII_PROCESS_INFO >{ > OSII_INT32 pid; > OSII_INT32 ppid; > OSII_CHAR name[ 256 ]; > OSII_CHAR path[ 1024 ]; > OSII_CHAR username[ 64 ]; > OSII_CHAR domain[ 64 ]; > OSII_CHAR command_line[ 8096 - 8 - 128 - 256 - 1024 ]; > >} OSII_PROCESS_INFO; ># 1001 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_PROCESS_INFO *osii_get_processes( size_t *count ); > > > > > > > >extern OSII_PROCESS_INFO *osii_get_process_by_id( OSII_UINT32 pid ); ># 1020 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >void osii_process_disable_auto_log( const char *prog ); ># 1031 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_shlib_close( OSII_SHLIB_HANDLE h ); ># 1040 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_SHLIB_FUNC osii_shlib_get_function( OSII_SHLIB_HANDLE h, const char *function_name ); ># 1078 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_SHLIB_HANDLE osii_shlib_open_ext( const char *shlib_name, const int mode ); ># 1091 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_SHLIB_HANDLE osii_shlib_open( const char *shlib_name ); ># 1117 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_system( const char *command, OSII_UINT32 timeout ); ># 1149 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_system_windows( const char *command, OSII_UINT32 timeout, OSII_BYTE options ); ># 1158 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_util_get_program_name( OSII_STRING name, size_t len ); ># 1167 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_util_get_program_path( OSII_STRING path, size_t len ); >extern OSII_STRING osii_util_get_shared_path( const char *libname, void *func, OSII_STRING path, size_t len ); >extern OSII_STRING osii_util_get_program_args( OSII_STRING path, size_t len ); ># 1181 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_util_get_pids_by_name( const OSII_CHAR *process, OSII_INT32 *pid_arr[] ); > > >typedef void* OSII_PSEUDO_FILE_HANDLE; ># 1195 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_PSEUDO_FILE_HANDLE osii_pseudo_popen( const char *cmd, const char *mode, OSII_UINT32 timeout ); ># 1206 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern char *osii_pseudo_fgets( char *str, int size, OSII_PSEUDO_FILE_HANDLE h ); ># 1215 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_pseudo_pclose( OSII_PSEUDO_FILE_HANDLE h ); ># 1225 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_winsock_init( void ); ># 1234 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_get_system_error( int *erret, OSII_INT32 bytes, OSII_STRING messagestr ); ># 1243 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_sleep( OSII_UINT32 msec ); > >extern int osii_gssapi_validate_ticket( const char *service_name, const char* server_name, const char* realm, const void *token, size_t token_len, OSII_STRING out, size_t out_len ); > >extern OSII_STRING osii_gssapi_get_logged_in_os_user( OSII_STRING user, size_t usize, OSII_STRING domain, size_t dsize ); > >extern OSII_BYTE* osii_gssapi_get_kerb_ticket( const char* target, size_t *size ); > >extern void osii_qsort(void *a, size_t n, size_t es, int (*)(const void *, const void *)); >extern void osii_qsort_r(void *a, size_t n, size_t es, void *thunk, int (*)(void *, const void *, const void *)); ># 1282 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_and( OSII_BYTE *b1, size_t b1_len, OSII_BYTE *b2, size_t b2_len ); ># 1299 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_zero_ext_and( OSII_BYTE *b1, size_t b1_len, OSII_BYTE *b2, size_t b2_len ); ># 1312 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_or( OSII_BYTE *b1, size_t b1_len, OSII_BYTE *b2, size_t b2_len ); ># 1322 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_bytebuf_from_hex_string( const char *buf, OSII_BYTE *result, size_t result_len ); ># 1333 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_is_bit_set( OSII_BYTE *buf, size_t len, int index ); ># 1345 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_logical_and( OSII_BYTE *b1, size_t b1_len, OSII_BYTE *b2, size_t b2_len ); ># 1357 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_set_bit( OSII_BYTE *buf, size_t len, int index, OSII_BOOL val ); ># 1368 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_bytebuf_to_hex_string( const OSII_BYTE *buf, size_t buf_len, OSII_STRING result, size_t result_len ); ># 1381 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_bytebuf_bit_add( OSII_BYTE *buf, size_t number_of_bits, size_t len ); ># 1504 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_system_mem_file_dump( const char *filename ); >extern int osii_system_mem_file_dump_alloc_hook( int allocType, void *userData, size_t size, int blockType, long requestNumber, const unsigned char *filename, int lineNumber, int memSize ); >extern size_t osii_system_mem_file_dump_bytes( void ); >extern OSII_BOOL osii_system_mem_file_dump_is_open( void ); >extern OSII_RETCODE osii_system_mem_file_dump_mutex_notify( void ); >extern OSII_RETCODE osii_system_mem_file_dump_mutex_wait( void ); >extern void osii_system_mem_file_dump_write( const void *buffer, size_t size, size_t count ); > > > > >extern void osii_mem_debug_init( void ); > > > >extern void osii_mem_debug_dump( void ); > > > > > > >extern OSII_BOOL osii_mem_debug_check( void ); ># 1536 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_system_calloc( size_t count, size_t size, const char *filename, int linenumber ); > > > > > >extern void osii_system_free( void *ptr ); > > > > > > > >extern void *osii_system_malloc( size_t size, const char *filename, int linenumber ); ># 1559 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_system_realloc( void *ptr, size_t size, const char *filename, int linenumber ); ># 1573 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_get_memory( OSII_MEM_STR *mem, size_t size ); ># 1582 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_free_memory( OSII_MEM_STR *mem ); ># 1596 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_cpp_struct_create( size_t str_size, size_t h_size, OSII_UINT8 flags, OSII_UINT32 type, OSII_MUTEX *mutex ); ># 1635 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_pool_alloc( size_t size, OSII_BOOL clear ); > > > > > > >extern void osii_pool_free( void *mem ); ># 1653 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pool_next_size( size_t size, size_t linear_amount ); ># 1663 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pool_size( size_t size ); > >extern OSII_UINT32 osii_zlib_compress( void *src, OSII_UINT32 ssize, void *dest, OSII_UINT32 dsize, int level ); >extern OSII_UINT32 osii_zlib_uncompress( void *src, OSII_UINT32 ssize, void *dest, OSII_UINT32 dsize ); ># 1680 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_lzox_compress( void *src, size_t ssize, void *dest, size_t dsize ); ># 1694 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_lzox_compress_no_alloc( void *src, size_t ssize, void *dest, size_t dsize, void *working_mem ); ># 1706 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_lzox_uncompress( void *src, size_t ssize, void *dest, size_t dsize ); ># 1717 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_lzox_uncompress_no_check( void *src, size_t ssize, void *dest, size_t dsize ); ># 1735 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_lz4_compress( void * src, int sourceSize, void * dest, int destSize ); ># 1752 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_RETCODE osii_lz4_acompress( void * src, int sourceSize, void **dest, int * destSize ); ># 1765 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_lz4_compress_no_alloc( void *src, size_t ssize, void *dest, size_t dsize, void *working_mem ); ># 1778 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_lz4_decompress( void * src, int compressedSize, void * dest, int maxDecompressedSize ); ># 1791 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_lz4_decompress_no_check( void *src, size_t ssize, void *dest, size_t dsize ); ># 1801 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_lz4_compressed_buffer_bounds( size_t inputSize ) ; > > > > > > >size_t osii_lz4_get_workingmem_size( void ); > > > > > > >void osii_lz4_free( void * ptr ); ># 1831 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct >{ > > OSII_CHAR opaque[ 384 ]; > >} OSII_READDIR_STR; > > > > > > >extern void osii_closedir( OSII_READDIR_STR *opaque ); >extern OSII_CHAR osii_copy_file( const OSII_CHAR *from, const OSII_CHAR *to, OSII_CHAR background ); ># 1880 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_copy_file_indirectly( const OSII_CHAR *pSrcFileName, const OSII_CHAR *pDestFileName, OSII_BOOL preserveTimes ); ># 1896 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_create_path( const char *path ); ># 1905 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_delete_file( const char *fileName ); ># 1923 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_readdir( const char *directory, OSII_READDIR_STR *opaque ); >extern OSII_BOOL osii_touch_file( const char *filename ); >extern OSII_RETCODE osii_remove_file( const char *fname, int retries, int delay ); >extern OSII_RETCODE osii_rename_file( const char *orig, const char *desired, int retries, int delay ); >extern int osii_path_is_dir( const char* path ); ># 1939 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_stat_ext( const char *fname, osii_stat_struct *statstr, int retries, int delay, int *EC ); > >extern OSII_RETCODE osii_ftruncate( const int fd, const OSII_INT64 size ); ># 1988 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_basename( const OSII_CHAR *pPathName, OSII_STRING outputBuffer, size_t outputBufferSize ); >extern OSII_RETCODE osii_dirname( const OSII_CHAR *pPathName, OSII_STRING outputBuffer, size_t outputBufferSize ); ># 2089 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef union _split_64_u >{ > > OSII_UINT64 i64; > > struct > { > > OSII_UINT32 a; > > OSII_UINT32 b; > > } i32; > >} split_64_u; ># 2188 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_freeparm( ParmList* parameter_list ); ># 2202 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_getparm( ParmList* parameter_list, const char *search_key, const char *default_value, OSII_STRING result, size_t size ); ># 2218 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_STRING osii_getparm_ext( ParmList* parameter_list, const char *search_key, const char *default_value, OSII_STRING result, size_t size, OSII_BOOL *encrypted ); ># 2230 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern ParmEntry* osii_getnextparm( ParmList* parameter_list, OSII_BOOL is_start ); ># 2251 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_loadparm( ParmList* parameter_list, const char *resource_file, const char *search_path, OSII_UINT32 max_parameters, const char *valid_separators ); ># 2273 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_loadparm_ext( ParmList* parameter_list, const char *resource_file, const char *search_path, OSII_UINT32 max_parameters, const char *valid_separators, const char *domain ); ># 2298 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_loadparm_legacy( ParmList *parameter_list, const char *resource_file, const char *search_path, OSII_UINT32 max_parameters, const char *valid_separators ); ># 2312 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct >{ > > OSII_INT32 tv_sec; > > OSII_INT32 tv_usec; >} >OSII_TIME_STR; > > >typedef struct >{ > > OSII_INT64 tv_sec; > > OSII_INT64 tv_usec; >} >OSII_TIME_STR64; > > >typedef struct osii_time_rec >{ > > OSII_INT32 year; > > OSII_INT32 month; > > OSII_INT32 day_of_month; > > OSII_INT32 day_of_week; > > OSII_INT32 days; > > OSII_INT32 hours; > > OSII_INT32 minutes; > > OSII_INT32 seconds; > > OSII_INT32 millisec; > > OSII_INT32 CalendarTime; > > OSII_BOOL IsDaylightSavings; > > OSII_BOOL IsLeapYear; >} >OSII_TIME_EXT_STR, OSII_MSTIME_STR; > > >typedef struct osii_time_rec64 >{ > > OSII_INT64 CalendarTime; > > OSII_INT32 year; > > OSII_INT32 month; > > OSII_INT32 day_of_month; > > OSII_INT32 day_of_week; > > OSII_INT32 days; > > OSII_INT32 hours; > > OSII_INT32 minutes; > > OSII_INT32 seconds; > > OSII_INT32 millisec; > > OSII_BOOL IsDaylightSavings; > > OSII_BOOL IsLeapYear; >} >OSII_TIME_EXT_STR64; ># 2399 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_time_diff( OSII_TIME_STR A, OSII_TIME_STR B ); >extern OSII_INT64 osii_time_diff64( OSII_TIME_STR64 A, OSII_TIME_STR64 B ); ># 2410 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_time_diff_ext( OSII_TIME_EXT_STR A, OSII_TIME_EXT_STR B ); >extern OSII_INT64 osii_time_diff_ext64( OSII_TIME_EXT_STR64 A, OSII_TIME_EXT_STR64 B ); ># 2422 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_time_get( OSII_TIME_STR* time_str ); >extern OSII_RETCODE osii_time_get64( OSII_TIME_STR64* time_str ); ># 2434 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_time_get_ext( OSII_TIME_EXT_STR* ext_time_str ); >extern OSII_RETCODE osii_time_get_ext64( OSII_TIME_EXT_STR64* ext_time_str ); ># 2448 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_timer_expired( OSII_TIME_STR timer ); >extern OSII_BOOL osii_timer_expired64( OSII_TIME_STR64 timer ); ># 2465 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_timer_periodic( OSII_TIME_STR* timer, OSII_UINT32 msec_period, OSII_UINT32 msec_offset ); >extern OSII_UINT32 osii_timer_periodic64( OSII_TIME_STR64* timer, OSII_UINT32 msec_period, OSII_UINT32 msec_offset ); ># 2478 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_timer_periodic_sleep( OSII_TIME_STR *timer, OSII_UINT32 rate, OSII_UINT32 offset ); ># 2490 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_timer_remaining( OSII_TIME_STR timer ); >extern OSII_UINT32 osii_timer_remaining64( OSII_TIME_STR64 timer ); ># 2506 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_timer_start( OSII_TIME_STR* timer, OSII_UINT32 msec_duration ); >extern OSII_RETCODE osii_timer_start64( OSII_TIME_STR64* timer, OSII_UINT32 msec_duration ); ># 2517 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_cal_compare_month( time_t time1, time_t time2 ); ># 2526 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_cal_compare_day( time_t time1, time_t time2 ); ># 2535 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_cal_compare_hour( time_t time1, time_t time2 ); ># 2545 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_top_of_month( time_t time1, OSII_INT32 add ); ># 2555 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_top_of_day( time_t time1, OSII_INT32 add ); ># 2565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_top_of_hour( time_t time1, OSII_INT32 add ); ># 2577 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_add_month( time_t time1, OSII_INT32 add ); ># 2586 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_add_day( time_t time1, OSII_INT32 add ); ># 2596 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_cal_has_date_past( const OSII_CHAR *buffer ); ># 2605 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern time_t osii_cal_parse_date_str( const OSII_CHAR *buffer ); ># 2614 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_cal_days_in_month( OSII_INT32 year, OSII_INT32 month ); > >extern OSII_INT32 osii_mktime_str( OSII_TIME_EXT_STR* ext_time_str ); >extern OSII_INT64 osii_mktime_str64( OSII_TIME_EXT_STR64* ext_time_str ); > >extern OSII_TIME_EXT_STR* osii_gmtime_str( const time_t * timet, OSII_TIME_EXT_STR *buf ); >extern OSII_TIME_EXT_STR64* osii_gmtime_str64( const time_t * timet, OSII_TIME_EXT_STR64 *buf ); > >extern OSII_TIME_EXT_STR* osii_localtime_str( const time_t * timet, OSII_TIME_EXT_STR *buf ); >extern OSII_TIME_EXT_STR64* osii_localtime_str64( const time_t * timet, OSII_TIME_EXT_STR64 *buf ); > >extern OSII_STRING osii_asctime_str( char* buffer, size_t sizeInBytes, OSII_TIME_EXT_STR* ext_time_str ); >extern OSII_STRING osii_asctime_str64( char* buffer, size_t sizeInBytes, const OSII_TIME_EXT_STR64* ext_time_str ); > >extern OSII_STRING osii_asctime( char* buffer, size_t sizeInBytes, const struct tm *_tm ); > >extern time_t osii_mkgmtime( struct tm *tm_ptr ); > > >extern void osii_simsleep( OSII_INT32 ms ); >extern time_t osii_simtime_convert( time_t t_in ); >extern OSII_RETCODE osii_simtime_convert_timestr( OSII_TIME_STR t_in, OSII_TIME_STR *t_out ); >extern OSII_BOOL osii_simtime_is_enabled( void ); > >extern OSII_RETCODE osii_simtime_get( OSII_TIME_STR* time_str ); >extern OSII_RETCODE osii_simtime_get64( OSII_TIME_STR64* time_str ); > >extern OSII_RETCODE osii_simtime_get_ext( OSII_TIME_EXT_STR* ext_time_str ); >extern OSII_RETCODE osii_simtime_get_ext64( OSII_TIME_EXT_STR64* ext_time_str ); > >extern time_t osii_simtime( time_t* tmt); >extern time_t osii_simtime64( time_t *tmt ); > >extern OSII_BOOL osii_simtimer_expired( OSII_TIME_STR timer ); >extern OSII_BOOL osii_simtimer_expired64( OSII_TIME_STR64 timer ); > >extern OSII_UINT32 osii_simtimer_periodic( OSII_TIME_STR* timer, OSII_UINT32 msec_period, OSII_UINT32 msec_offset ); >extern OSII_UINT32 osii_simtimer_periodic64( OSII_TIME_STR64* timer, OSII_UINT32 msec_period, OSII_UINT32 msec_offset ); > >extern OSII_UINT32 osii_simtimer_remaining( OSII_TIME_STR timer ); >extern OSII_UINT32 osii_simtimer_remaining64( OSII_TIME_STR64 timer ); > >extern OSII_RETCODE osii_simtimer_start( OSII_TIME_STR* timer, OSII_UINT32 msec_duration ); >extern OSII_RETCODE osii_simtimer_start64( OSII_TIME_STR64* timer, OSII_UINT32 msec_duration ); > > >OSII_UINT8 osii_time_hours_in_day_from_tmstr(const OSII_TIME_EXT_STR * day_in); >OSII_UINT8 osii_time_hours_in_day_from_tmstr64(const OSII_TIME_EXT_STR64 * day_in); > >OSII_UINT8 osii_time_hours_in_day_from_timet(const time_t day_in); >OSII_UINT8 osii_time_hours_in_day_from_timet64(const time_t day_in); > >OSII_UINT8 osii_time_hours_in_today(); >OSII_UINT8 osii_time_hours_in_today64(); > >OSII_UINT8 osii_time_hours_in_tomorrow(); >OSII_UINT8 osii_time_hours_in_tomorrow64(); > > > > > >OSII_RETCODE osii_time_add_days_tmstr(const OSII_TIME_EXT_STR * day_in, OSII_TIME_EXT_STR * day_out, OSII_UINT16 days); >OSII_RETCODE osii_time_add_days_tmstr64(const OSII_TIME_EXT_STR64 * day_in, OSII_TIME_EXT_STR64 * day_out, OSII_UINT16 days); > >OSII_RETCODE osii_time_sub_days_tmstr(const OSII_TIME_EXT_STR * day_in, OSII_TIME_EXT_STR * day_out, OSII_UINT16 days); >OSII_RETCODE osii_time_sub_days_tmstr64(const OSII_TIME_EXT_STR64 * day_in, OSII_TIME_EXT_STR64 * day_out, OSII_UINT16 days); > >OSII_RETCODE osii_time_add_days_timet(const time_t * day_in, time_t * day_out, OSII_UINT16 days); >OSII_RETCODE osii_time_add_days_timet64(const time_t * day_in, time_t * day_out, OSII_UINT16 days); > >OSII_RETCODE osii_time_sub_days_timet(const time_t * day_in, time_t * day_out, OSII_UINT16 days); >OSII_RETCODE osii_time_sub_days_timet64(const time_t * day_in, time_t * day_out, OSII_UINT16 days); > > >OSII_RETCODE osii_time_timet_to_repeated(time_t ts, OSII_TIME_EXT_STR *tm_in, OSII_BOOL *repeated); >OSII_RETCODE osii_time_timet_to_repeated64(time_t ts, OSII_TIME_EXT_STR64 *tm_in, OSII_BOOL *repeated); > >OSII_RETCODE osii_time_tmstr_to_timet(OSII_TIME_EXT_STR *tm_in, OSII_BOOL repeated, time_t * ts); > >OSII_RETCODE osii_time_gm_tmstr_to_timet(OSII_TIME_EXT_STR *tm_in, time_t * ts); >OSII_RETCODE osii_time_gm_tmstr_to_timet64(OSII_TIME_EXT_STR64 *tm_in, time_t * ts); ># 2708 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_RETCODE osii_time_tmstr_offset_to_timet(OSII_TIME_EXT_STR datetime, OSII_INT32 utc_offset_hours, OSII_INT32 utc_offset_minutes, time_t * out_timet); >OSII_RETCODE osii_time_tmstr_offset_to_timet64(OSII_TIME_EXT_STR64 datetime, OSII_INT32 utc_offset_hours, OSII_INT32 utc_offset_minutes, time_t * out_timet); > >struct tm * osii_time_timeext_to_tm( const OSII_TIME_EXT_STR* ext_time_str, struct tm *time_tm ); >struct tm * osii_time_timeext_to_tm64( const OSII_TIME_EXT_STR64* ext_time_str, struct tm *time_tm ); > >OSII_TIME_EXT_STR * osii_time_tm_to_timeext( const struct tm *time_tm, OSII_TIME_EXT_STR *ext_time_str ); >OSII_TIME_EXT_STR64* osii_time_tm_to_timeext64( const struct tm *time_tm, OSII_TIME_EXT_STR64 *ext_time_str ); > > >OSII_BOOL osii_time_is_repeated_hour(time_t ts); >OSII_BOOL osii_time_is_repeated_hour64(time_t ts); > > >OSII_INT32 osii_time_current_UTC_offset_sec(); >OSII_INT64 osii_time_current_UTC_offset_sec64(); > >OSII_INT32 osii_time_current_UTC_offset(); > >OSII_INT32 osii_time_standard_UTC_offset(); >OSII_INT64 osii_time_standard_UTC_offset_sec64(); > >OSII_INT32 osii_time_standard_UTC_offset_sec(); > > >OSII_BOOL osii_time_is_leap_year(OSII_INT16 year); >OSII_INT8 osii_time_standard_days_in_month(OSII_INT16 month); >OSII_INT8 osii_time_days_in_month(OSII_INT16 month, OSII_INT16 year); > >OSII_INT32 osii_time_tmstr_sub(OSII_TIME_EXT_STR a, OSII_TIME_EXT_STR b); >OSII_INT64 osii_time_tmstr_sub64(OSII_TIME_EXT_STR64 a, OSII_TIME_EXT_STR64 b); > >OSII_INT32 osii_time_dst_shift(); >OSII_INT64 osii_time_dst_shift64(); > >OSII_INT32 osii_time_days_in_year( OSII_INT16 year); ># 2804 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >const OSII_CHAR * osii_strptime(const OSII_CHAR * date_string, const OSII_CHAR * date_format, > OSII_TIME_EXT_STR * out_date_data, OSII_INT32 * out_gmt_offset_hours, OSII_INT32 * out_gmt_offset_minutes); >const OSII_CHAR * osii_strptime64(const OSII_CHAR * date_string, const OSII_CHAR * date_format, > OSII_TIME_EXT_STR64 * out_date_data, OSII_INT32 * out_gmt_offset_hours, OSII_INT32 * out_gmt_offset_minutes); ># 2869 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_accept( OSII_SOCKET socket_id, OSII_SOCKET* new_socket_id ); ># 2889 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_accept_ext( OSII_SOCKET socket_id, OSII_SOCKET* new_socket_id, OSII_UINT32* new_socket_ip ); >extern OSII_RETCODE osii_socket_accept_ipv4( OSII_SOCKET socket_id, OSII_SOCKET* new_socket_id, OSII_UINT32 *new_socket_ip ); >extern OSII_RETCODE osii_socket_accept_ipv6( OSII_SOCKET socket_id, OSII_SOCKET* new_socket_id, OSII_IPV6ADDR *new_socket_ip ); ># 2913 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_bind( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); >extern OSII_RETCODE osii_socket_bind_ipv4( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); >extern OSII_RETCODE osii_socket_bind_ipv6( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); ># 2929 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_check( OSII_SOCKET socket_id, OSII_UINT32 msec_timeout ); ># 2945 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_check_array( OSII_SOCKET *socket_array, OSII_UINT32 n, OSII_UINT32 msec_timeout, OSII_UINT32 *rfdsp ); ># 2954 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_close( OSII_SOCKET socket_id ); ># 2973 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_connect( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); >extern OSII_RETCODE osii_socket_connect_ipv4( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); >extern OSII_RETCODE osii_socket_connect_ipv6( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port ); ># 2996 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_connect_timed( OSII_SOCKET * socket_id, const OSII_CHAR *host, OSII_PORT port, OSII_INT32 msec ); >extern OSII_RETCODE osii_socket_connect_timed_ipv4( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port, OSII_INT32 msec ); >extern OSII_RETCODE osii_socket_connect_timed_ipv6( OSII_SOCKET* socket_id, const OSII_CHAR *host, OSII_PORT port, OSII_INT32 msec ); ># 3014 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_listen( OSII_SOCKET socket_id ); ># 3031 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_listen_ext( OSII_SOCKET socket_id, int backlog ); ># 3041 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_open( OSII_SOCKET* socket_id ); ># 3055 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_open_ext( OSII_SOCKET* socket_id, OSII_UINT32 socket_options ); >extern OSII_RETCODE osii_socket_open_ipv4( OSII_SOCKET* socket_id, OSII_UINT32 socket_options ); >extern OSII_RETCODE osii_socket_open_ipv6( OSII_SOCKET* socket_id, OSII_UINT32 socket_options ); ># 3068 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_open_ext_size( OSII_SOCKET* socket_id, OSII_UINT32 socket_options, int buf_sz ); ># 3084 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_peek( OSII_SOCKET socket_id, OSII_POINTER buffer, OSII_UINT32 buffer_length, OSII_UINT32* bytes_read, OSII_UINT32 msec_timeout ); ># 3099 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_read( OSII_SOCKET socket_id, OSII_POINTER buffer, OSII_UINT32 buffer_length, OSII_UINT32* bytes_read, OSII_UINT32 msec_timeout ); ># 3118 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_read_ext( OSII_SOCKET socket_id, OSII_POINTER buffer, OSII_UINT32 buffer_length, OSII_UINT32* bytes_read, OSII_UINT32 msec_timeout, OSII_BOOL partial ); ># 3129 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_write( OSII_SOCKET socket_id, OSII_POINTER xmitbuf, OSII_UINT32 xmitlen ); ># 3143 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_write_ext( OSII_SOCKET socket_id, OSII_POINTER xmitbuf, OSII_UINT32 xmitlen, OSII_UINT32* bytes_written, OSII_UINT32 msec_timeout ); ># 3162 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_socket_writeto( OSII_SOCKET socket_id, OSII_POINTER msg, OSII_UINT32 msglen, const OSII_CHAR *dest, OSII_PORT port, OSII_UINT32 *bytes_written ); ># 3190 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_snprintf( char *str, size_t count, const char *fmt, ... ); ># 3210 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_snprintf_get_result_size( char *buf, size_t buffSize, size_t *outSize, const char *fmt, ... ); ># 3229 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_snprintf_fast( char *buf, size_t buffSize, const char *fmt, ... ); ># 3246 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_CHAR * osii_snprintf_fast_inline(char *buffer, size_t buffSize, size_t *outSize, const char *format, ...); ># 3258 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_begin( const OSII_CHAR *string, const char *substring ); ># 3270 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_string_cat( OSII_CHAR *dst, const OSII_CHAR *src, size_t dstSize ); ># 3279 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_string_compare( const char *cs1, const char *cs2 ); ># 3290 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_string_compare_n( const char *cs1, const char *cs2, size_t n ); ># 3302 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_string_compare_wildcard( const OSII_CHAR *rstr, const OSII_CHAR *wstr, OSII_BOOL caseSensitive ); ># 3314 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_copy( OSII_STRING destination, const char *source, size_t n_plus_one ); ># 3324 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_end( const OSII_CHAR *string, const char *substring ); ># 3335 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_extract( OSII_STRING subs, const char *orig, size_t pos, size_t n ); ># 3347 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_string_length_n (const char *str, size_t n); ># 3366 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_list_build( OSII_STRING strbuf, OSII_INT32* pbufSize, OSII_INT32 nargs, ... ); >extern OSII_STRING osii_string_list_vbuild( OSII_STRING strbuf, OSII_INT32* pbufSize, OSII_INT32 nargs, va_list marker ); ># 3389 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_string_list_split( OSII_STRING strbuf, size_t bufLen, size_t maxStrSize, OSII_INT32 nargs, ... ); ># 3409 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_string_list_vsplit( OSII_STRING strbuf, size_t bufLen, size_t maxStrSize, OSII_INT32 nargs, va_list marker ); ># 3418 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_lower( OSII_STRING string ); ># 3441 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_replace( OSII_STRING outbuf, size_t outbufSize, OSII_BOOL caseSensitive, > const OSII_CHAR *pFormat, const OSII_CHAR *pKey, const OSII_CHAR *pValue ); ># 3455 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_string_split( OSII_STRING str, const char *set, OSII_UINT32 count, OSII_STRING *out ); ># 3468 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_strip( OSII_STRING string, const char *set ); ># 3480 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_strip_leading( const OSII_CHAR *string, const char *set ); ># 3491 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_strip_trailing( OSII_STRING string, const char *set ); ># 3509 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_token( OSII_STRING string, const char *set, OSII_STRING* rest ); ># 3525 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_string_token_quoted( OSII_STRING string, const char *set, char quote, OSII_STRING* rest ); > > > > > > > >extern OSII_STRING osii_string_upper( OSII_STRING string ); ># 3546 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_fnmatch(const OSII_CHAR *pattern, const OSII_CHAR *string, OSII_INT32 flags); ># 3559 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_vsnprintf( char *buf, size_t count, const char *fmt, va_list args ); ># 3586 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_vsnprintf_fast( char *buf, size_t buffSize, const char *fmt, va_list argptr ); ># 3622 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_BOOL osii_string_is_clean( const OSII_CHAR *str, OSII_UINT32 flags ); ># 3642 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_string_is_numeric( const OSII_CHAR *string, OSII_BOOL signAllowed ); ># 3656 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_CHAR *osii_strrstr( const OSII_CHAR *str, const OSII_CHAR *strSearch ); > > > > > > >extern OSII_USTRING osii_ustring_begin( const OSII_UCHAR *string, const UChar *substring ); >extern OSII_INT32 osii_ustring_compare( const UChar *cs1, const UChar *cs2 ); >extern OSII_INT32 osii_ustring_compare_n( const UChar *cs1, const UChar *cs2, size_t n ); >extern OSII_USTRING osii_ustring_copy( OSII_USTRING destination, const UChar *source, size_t n_plus_one ); >extern size_t osii_ustring_cat(OSII_UCHAR *dst, const OSII_UCHAR *src, size_t dstSize); >extern OSII_USTRING osii_ustring_from_string( OSII_UCHAR *buf, size_t len, const char *str, OSII_UINT32 type ); >extern size_t osii_ustring_len( const UChar *ustr ); >extern OSII_BOOL osii_ustring_string_utf8_safe( const char *str ); >extern OSII_USTRING osii_ustring_strip( OSII_USTRING string, const UChar *set ); >extern OSII_USTRING osii_ustring_strip_leading( const OSII_UCHAR *string, const UChar *set ); >extern OSII_USTRING osii_ustring_strip_trailing( OSII_USTRING string, const UChar *set ); >extern size_t osii_ustring_to_asc( const UChar *from, size_t flen, char *buf, size_t blen ); >extern OSII_USTRING osii_ustring_token_quoted( OSII_USTRING string, const UChar *set, UChar quote, OSII_USTRING* rest ); > > >extern OSII_USTRING osii_ustring_end( const OSII_UCHAR *string, const UChar *substring ); >extern OSII_USTRING osii_ustring_extract( OSII_USTRING subs, const UChar *orig, size_t pos, size_t n ); >extern OSII_USTRING osii_ustring_list_build( OSII_USTRING strbuf, OSII_INT32* pbufSize, OSII_INT32 nargs, ... ); >extern OSII_RETCODE osii_ustring_list_split( OSII_USTRING strbuf, size_t bufLen, size_t maxStrSize, OSII_INT32 nargs, ... ); >extern OSII_USTRING osii_ustring_lower( OSII_USTRING string ); >extern OSII_UINT32 osii_ustring_split( OSII_USTRING str, const UChar *set, OSII_UINT32 count, OSII_USTRING *out ); >extern OSII_USTRING osii_ustring_token( OSII_USTRING string, const UChar *set, OSII_USTRING* rest ); >extern OSII_USTRING osii_ustring_upper( OSII_USTRING string ); ># 3711 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_begin( const OSII_CHAR *string, const char *substring ); ># 3725 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_u8string_cat(char *dst, const char *src, size_t dstSize); ># 3736 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_u8string_compare( const char *cs1, const char *cs2 ); ># 3749 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_u8string_compare_n( const char *cs1, const char *cs2, size_t n ); ># 3762 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_copy( OSII_STRING destination, const char *source, size_t n_plus_one ); ># 3774 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_end( const OSII_CHAR *string, const char *substring ); ># 3788 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_extract( OSII_STRING subs, const char *orig, size_t pos, size_t n ); ># 3799 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_u8string_is_valid( const OSII_CHAR *string ); ># 3810 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_u8string_len( const char *ustr ); ># 3832 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_list_build( OSII_STRING strbuf, OSII_INT32* pbufSize, OSII_INT32 nargs, ... ); ># 3856 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_u8string_list_split( OSII_STRING strbuf, size_t bufLen, size_t maxStrSize, OSII_INT32 nargs, ... ); ># 3870 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_lower( OSII_STRING string ); ># 3884 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_u8string_split( OSII_STRING str, const char *set, OSII_UINT32 count, OSII_STRING *out ); ># 3896 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern const char * osii_u8string_strchr(const char * string, const char * c); ># 3911 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_strip( OSII_STRING string, const char *set ); ># 3925 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_strip_leading( OSII_STRING string, const char *set ); ># 3938 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_strip_trailing( OSII_STRING string, const char *set ); ># 3950 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_u8string_strspn( const char * string, const char * set ); ># 3970 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_token( OSII_STRING string, const char *set, OSII_STRING* rest ); ># 3989 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_token_quoted( OSII_STRING string, const char *set, const char *quote, OSII_STRING* rest ); ># 4003 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_STRING osii_u8string_upper( OSII_STRING string ); ># 4112 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_event_destroy( OSII_EVENT* event ); ># 4123 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_event_init( OSII_EVENT* event, OSII_BOOL manual, OSII_BOOL initial ); ># 4134 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_event_set( OSII_EVENT* event, OSII_BOOL state ); ># 4145 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_event_wait( OSII_EVENT* event ); ># 4157 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_event_wait_timed( OSII_EVENT* event, OSII_UINT32 timeout ); ># 4168 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_locks_destroy( OSII_LOCKS *locks ); ># 4180 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_locks_get_info( OSII_LOCKS* locks, OSII_INT32 *count, OSII_BOOL *write ); ># 4189 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_locks_init( OSII_LOCKS *locks ); ># 4199 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_locks_release( OSII_LOCKS* locks ); ># 4211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_locks_wait( OSII_LOCKS *locks, OSII_BOOL write ); ># 4238 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > extern OSII_MUTEX empty_mutex; ># 4263 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_mutex_init( OSII_MUTEX* mutex ); ># 4303 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_mutex_trylock( OSII_MUTEX* mutex ); ># 4328 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_RETCODE osii_mutex_wait_timed( OSII_MUTEX * mutex, const OSII_INT32 msec ); ># 4351 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_semaphore_destroy( OSII_SEMAPHORE* semaphore ); ># 4370 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_semaphore_init( OSII_SEMAPHORE* semaphore, OSII_UINT32 initial, OSII_UINT32 max ); ># 4387 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_semaphore_signal( OSII_SEMAPHORE* semaphore ); ># 4399 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_semaphore_wait( OSII_SEMAPHORE* semaphore ); ># 4412 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_semaphore_wait_timed( OSII_SEMAPHORE* semaphore, OSII_UINT32 timeout ); > > > > >extern void osii_thread_cleanup( void ); ># 4435 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_thread_create_ext( void ( *thread_function )( void* ), void* arguments, size_t stacksize ); ># 4453 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_thread_create( void ( *thread_function )( void* ), void* arguments ); ># 4470 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_thread_create_multi( void (*func)(), long n, ... ); > > > > > >extern int osii_thread_count( void ); > > > > > > > >extern OSII_INT32 osii_thread_get_exitcode( OSII_INT32 index ); > > > > > >extern OSII_THREAD osii_thread_get_id( void ); > > > > > > > >extern OSII_THREAD osii_thread_get_idbyindex( OSII_INT32 index ); > > > > > >extern OSII_INT32 osii_thread_get_index( void ); ># 4516 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_thread_get_option( OSII_INT32 option ); > > > > > > > >extern OSII_INT32 osii_thread_get_sequence( OSII_INT32 index ); ># 4537 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_thread_get_state( OSII_INT32 index ); > > > > > > >extern void osii_thread_exit( OSII_INT32 exit_code ); ># 4558 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_thread_kill( OSII_INT32 index ); > > > > > > > >extern OSII_BOOL osii_thread_set_name( const OSII_CHAR *name, OSII_UINT32 id ); ># 4584 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_thread_set_option( OSII_INT32 option, OSII_INT32 value ); > > > >extern void osii_thread_yield( void ); ># 4635 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_crypt_decrypt( OSIICRYPT_HANDLE h, const void *in_buf, size_t in_size, void *out_buf, size_t *out_size, OSII_RETCODE *ret ); >extern size_t osii_crypt_decrypt_csharp( OSIICRYPT_HANDLE h, const void *in_buf, size_t in_size, void *out_buf, size_t out_size ); > > > > > > >extern void osii_crypt_destroy( OSIICRYPT_HANDLE h ); ># 4657 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_crypt_encrypt( OSIICRYPT_HANDLE h, const void *in_buf, size_t in_size, void *out_buf, size_t *out_size, OSII_RETCODE *ret ); >extern size_t osii_crypt_encrypt_csharp( OSIICRYPT_HANDLE h, const void *in_buf, size_t in_size, void *out_buf, size_t out_size ); ># 4673 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSIICRYPT_HANDLE osii_crypt_init( OSII_UINT32 type, OSII_BYTE *key, size_t len, OSII_RETCODE *ret ); >extern OSIICRYPT_HANDLE osii_crypt_init_csharp( OSII_UINT32 type, OSII_BYTE *key, size_t len ); ># 4690 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_crypt_new_key( OSII_BYTE *key, size_t len ); ># 4706 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_crypt_set_key( OSIICRYPT_HANDLE h, OSII_BYTE *key, size_t len ); ># 4725 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef void* MEMPOOL_HANDLE; > > >typedef struct _MEMPOOL_INFO_STR >{ > > OSII_UINT32 blocks; > > OSII_UINT32 used_blocks; > > size_t block_size; > > OSII_UINT32 grow_blocks; > >} MEMPOOL_INFO_STR; > > > > > > >extern void osii_mempool_destroy( MEMPOOL_HANDLE h ); ># 4758 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void *osii_mempool_get( MEMPOOL_HANDLE h, OSII_RETCODE *ret ); ># 4776 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_mempool_get_info( MEMPOOL_HANDLE h, MEMPOOL_INFO_STR *info ); ># 4789 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern MEMPOOL_HANDLE osii_mempool_init( OSII_UINT32 initial_blocks, size_t block_size, OSII_UINT8 flags, OSII_RETCODE *ret ); ># 4807 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_mempool_put( MEMPOOL_HANDLE h, void *mem ); ># 4818 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_mempool_set_growth( MEMPOOL_HANDLE h, OSII_UINT32 grow_blocks ); ># 4855 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef void* OSIIRAND_HANDLE; > > > > > > >extern void osii_rand_destroy( OSIIRAND_HANDLE h ); ># 4873 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSIIRAND_HANDLE osii_rand_init( OSII_UINT32 type, OSII_UINT32 seed, OSII_RETCODE *ret ); > > > > > > > >extern OSII_INT32 osii_rand_next( OSIIRAND_HANDLE h ); > > > > > > > >extern OSII_DOUBLE osii_rand_next_double( OSIIRAND_HANDLE h ); > > > > > > > >extern void osii_rand_seed( OSIIRAND_HANDLE h, OSII_UINT32 type, OSII_UINT32 seed ); ># 4936 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef void* PKCRYPT_KEY_HANDLE; ># 4949 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pkcrypt_decrypt( PKCRYPT_KEY_HANDLE key, const void *source, size_t slen, void *target, size_t tlen ); > > > > > >extern void osii_pkcrypt_destroy( PKCRYPT_KEY_HANDLE key ); ># 4967 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pkcrypt_encrypt( PKCRYPT_KEY_HANDLE key, const void *source, size_t slen, void *target, size_t tlen ); ># 4978 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pkcrypt_get_key( OSII_BOOL privateb, PKCRYPT_KEY_HANDLE key_in, OSII_BYTE *key_out, size_t len ); ># 4987 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_pkcrypt_init( OSII_UINT32 type ); ># 4996 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern PKCRYPT_KEY_HANDLE osii_pkcrypt_init_key( const OSII_BYTE *key, size_t len ); > > > > > > > >extern PKCRYPT_KEY_HANDLE osii_pkcrypt_new_key( OSII_UINT32 bits ); ># 5016 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern size_t osii_pkcrypt_sign( PKCRYPT_KEY_HANDLE key, const void *source, size_t slen, void *target, size_t tlen ); ># 5029 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_pkcrypt_verify( PKCRYPT_KEY_HANDLE key, const void *source, size_t slen, void *sig, size_t siglen ); ># 5061 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_pkcs5_hash(const void * input, size_t input_size, int iterations, size_t salt_size, > size_t key_size, void * out_salt, void * out_key); ># 5085 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_pkcs5_validate(const void * input, size_t input_size, int iterations, > const void * salt, size_t salt_size, const void * key, size_t key_size); > > > > > >extern char* osii_asc6bin8( char *s, short len, short *lenout, char mode ); ># 5106 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _OSII_STORE_STR >{ > > void *data; > > void (*free_one_param)( void *data ); > > void (*free_two_param)( void *data, void *userdata ); > > void *userdata; > >} OSII_STORE_STR; ># 5129 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_store_enum( OSII_BOOL (*func)( const char *name, void *data, void *userdata ), void *userdata ); ># 5140 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_store_lookup( const char *name, OSII_STORE_STR *store ); > > > > > > >extern OSII_RETCODE osii_store_mutex_notify( void ); > > > > > >extern OSII_RETCODE osii_store_mutex_wait( void ); ># 5165 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_store_put( const char *name, OSII_STORE_STR *store ); ># 5176 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_store_remove( const char *name, OSII_STORE_STR *store ); ># 5193 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern void osii_tls_clear( void ); ># 5202 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_lookup( const char *name, OSII_STORE_STR *store ); ># 5211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_put( const char *name, OSII_STORE_STR *store ); ># 5220 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_remove( const char *name, OSII_STORE_STR *store ); ># 5232 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_enum( OSII_BOOL (*func)( const char *name, void *data, void *userdata ), void *userdata ); ># 5257 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_err_formatted( const char *lib_name, OSII_STRING buf, size_t len ); ># 5273 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_err_lookup( const char *lib_name, OSII_STRING error_string, size_t error_len, OSII_INT32 *error_code, OSII_STRING file_name, size_t file_len, OSII_INT32 *line_number ); ># 5287 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_err_pass_up( const char *lib_name, const char *error_string, OSII_RETCODE *error_code, const char *nest_lib_name, const char *file_name, OSII_INT32 line_number ); ># 5303 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_tls_err_put( const char *lib_name, const char *error_string, OSII_RETCODE error_code, const char *nest_lib_name, const char *file_name, OSII_INT32 line_number ); ># 5328 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_BOOL osii_console_attach( void ); > > > > > >extern OSII_BOOL osii_console_detach( void ); ># 5348 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_console_get_line( const OSII_CHAR *prompt, OSII_STRING buffer, OSII_INT32 size, OSII_UINT32 mode ); > > > > > >extern OSII_BOOL osii_console_have_console( void ); ># 5365 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_console_printf( const char *format, ... ); ># 5376 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_console_vprintf( const char *format, va_list marker ); ># 5402 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _STREAM_STR *STREAM_HANDLE; > > >typedef struct _STREAM_STR >{ > > void *h; > > void *buf; > > > > > > void (*destroy)( STREAM_HANDLE s ); > > > > > > void (*flush)( STREAM_HANDLE s ); ># 5433 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*seek)( STREAM_HANDLE s, OSII_INT64 offset, int origin ); ># 5443 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read)( STREAM_HANDLE s, void *buffer, size_t count ); ># 5453 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write)( STREAM_HANDLE s, const void *buffer, size_t count ); > > > > > > > > OSII_INT64 (*length)( STREAM_HANDLE s ); ># 5470 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*set_length)( STREAM_HANDLE s, OSII_INT64 length ); > > > > > > > > OSII_INT64 (*position)( STREAM_HANDLE s ); ># 5487 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*set_position)( STREAM_HANDLE s, OSII_INT64 position ); ># 5496 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*end)( STREAM_HANDLE s ); > >} STREAM_STR; > > >typedef struct _STREAM_WRITER_STR *STREAM_WRITER; > > >typedef struct _STREAM_WRITER_STR >{ > > void *h; > > > STREAM_HANDLE stream; > > > OSII_UINT8 flags; ># 5523 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_u8)( STREAM_WRITER sw, OSII_UINT8 val ); ># 5532 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_u16)( STREAM_WRITER sw, OSII_UINT16 val ); ># 5541 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_u32)( STREAM_WRITER sw, OSII_UINT32 val ); ># 5550 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_u64)( STREAM_WRITER sw, OSII_UINT64 val ); ># 5559 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_float)( STREAM_WRITER sw, OSII_FLOAT val ); ># 5568 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_double)( STREAM_WRITER sw, OSII_DOUBLE val ); ># 5577 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_string)( STREAM_WRITER sw, const char *val ); ># 5586 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*write_ustring)( STREAM_WRITER sw, const UChar *val ); > OSII_INT64 (*write_ustring_len)( STREAM_WRITER sw, const UChar *val, size_t len ); > > > > > > void (*destroy)( STREAM_WRITER sw ); > >} STREAM_WRITER_STR; > > >typedef struct _STREAM_READER_STR *STREAM_READER; > > >typedef struct _STREAM_READER_STR >{ > > void *h; > > > STREAM_HANDLE stream; > > > OSII_UINT16 flags; ># 5620 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_u8)( STREAM_READER sr, OSII_UINT8 *val ); ># 5629 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_u16)( STREAM_READER sr, OSII_UINT16 *val ); ># 5638 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_u32)( STREAM_READER sr, OSII_UINT32 *val ); ># 5647 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_u64)( STREAM_READER sr, OSII_UINT64 *val ); ># 5664 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_float)( STREAM_READER sr, OSII_FLOAT *val ); ># 5673 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_double)( STREAM_READER sr, OSII_DOUBLE *val ); ># 5683 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_string)( STREAM_READER sr, OSII_STRING val, size_t len ); ># 5693 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT64 (*read_ustring)( STREAM_READER sr, UChar *val, size_t len ); ># 5704 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_STRING (*get_string)( STREAM_READER sr, OSII_INT64 *result ); ># 5714 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > UChar *(*get_ustring)( STREAM_READER sr, OSII_INT64 *result ); > > > > > > > void (*destroy)( STREAM_READER sr ); > >} STREAM_READER_STR; ># 5735 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern STREAM_HANDLE osii_memstream_fixed_buf( void *buf, size_t size, OSII_UINT8 flags ); ># 5747 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern STREAM_HANDLE osii_memstream_resizable( size_t initial_size, size_t max_size, OSII_UINT8 flags ); ># 5758 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern float osii_stream_read_float( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5768 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern double osii_stream_read_double( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5778 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT8 osii_stream_read_u8( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5788 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT16 osii_stream_read_u16( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5798 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT32 osii_stream_read_u32( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5808 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UINT64 osii_stream_read_u64( STREAM_HANDLE h, OSII_UINT8 flags, OSII_INT64 *result ); ># 5818 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_float( STREAM_HANDLE h, float val, OSII_UINT8 flags ); ># 5828 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_double( STREAM_HANDLE h, double val, OSII_UINT8 flags ); ># 5838 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_u8( STREAM_HANDLE h, OSII_UINT8 val, OSII_UINT8 flags ); ># 5848 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_u16( STREAM_HANDLE h, OSII_UINT16 val, OSII_UINT8 flags ); ># 5858 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_u32( STREAM_HANDLE h, OSII_UINT32 val, OSII_UINT8 flags ); ># 5868 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT64 osii_stream_write_u64( STREAM_HANDLE h, OSII_UINT64 val, OSII_UINT8 flags ); > > >extern STREAM_READER osii_stream_reader( STREAM_HANDLE stream, OSII_UINT8 flags ); >extern STREAM_WRITER osii_stream_writer( STREAM_HANDLE stream, OSII_UINT8 flags ); >extern size_t osii_stream_writer_string_bytes( const char *str ); >extern size_t osii_stream_writer_ustring_bytes( const UChar *str ); >extern size_t osii_stream_writer_ustring_len_bytes( const UChar *str, size_t len ); > > > > > >typedef struct _OSII_RESIZEBUF_STR >{ > char *str; > size_t size; > char buf[ 512 ]; > >} OSII_RESIZEBUF_STR; > >extern char *osii_resizebuf( OSII_RESIZEBUF_STR *buf, size_t size, OSII_BYTE flags ); >extern void osii_resizebuf_destroy( OSII_RESIZEBUF_STR *buf ); ># 5913 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _FILE_STR *FILE_HANDLE; > > >typedef struct _FILE_STR >{ > > void *h; > > > > > > > void (*destroy)( FILE_HANDLE f ); > > > > > > > > STREAM_HANDLE (*stream)( FILE_HANDLE f ); ># 5951 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_RETCODE (*lock)( FILE_HANDLE f, OSII_UINT64 start, OSII_UINT64 len, OSII_UINT8 flags ); ># 5964 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_RETCODE (*unlock)( FILE_HANDLE f ); ># 5973 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_BOOL (*have_lock)( FILE_HANDLE f ); ># 5982 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_BOOL (*have_read_lock)( FILE_HANDLE f ); ># 5991 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_BOOL (*have_write_lock)( FILE_HANDLE f ); > >} FILE_STR; ># 6005 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern FILE_HANDLE osii_file_open( const char *filename, const char *open_mode, OSII_UINT8 flags, OSII_RETCODE *err_code ); ># 6019 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern FILE_HANDLE osii_file_posix_open( const char *filename, int oflag, int pmode, OSII_UINT8 flags, OSII_RETCODE *err_code ); ># 6187 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _LOGGER_STR *LOGGER_HANDLE; > > >typedef struct _LOGGER_STR >{ > > void *h; > > > > > > void (*destroy)( LOGGER_HANDLE l ); > > > > > > void (*flush)( LOGGER_HANDLE l ); ># 6215 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > int (*printf)( LOGGER_HANDLE l, const char *format, ... ); ># 6225 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > int (*vprintf)( LOGGER_HANDLE l, const char *format, va_list marker ); > >} LOGGER_STR; ># 6251 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _LINE_LOGGER_FILE_INIT_STR >{ > > int file_count; > > int severity; > > size_t file_size; > > size_t file_flush; > > OSII_CHAR date_format[ 64 ]; > >} LINE_LOGGER_FILE_INIT_STR; ># 6276 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_line_buffer( OSII_UINT8 flags, const char *filename, LINE_LOGGER_FILE_INIT_STR *init, OSII_RETCODE *error ); ># 6287 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_line_file( OSII_UINT8 flags, const char *filename, LINE_LOGGER_FILE_INIT_STR *init, OSII_RETCODE *error ); ># 6297 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_buffered_event_log( size_t file_flush, OSII_RETCODE *ret ); ># 6307 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_buffered_support_log( size_t file_flush, OSII_RETCODE *ret ); ># 6316 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_error_log( OSII_RETCODE *ret ); ># 6325 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_security_log( OSII_RETCODE *ret ); ># 6334 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_event_log( OSII_RETCODE *ret ); ># 6343 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern LOGGER_HANDLE osii_logger_support_log( OSII_RETCODE *ret ); ># 6355 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern int osii_logger_tls_err_printf( LOGGER_HANDLE h, const char *library, const char *format, ... ); >extern LOGGER_HANDLE osii_logger_console( OSII_UINT8 flags, OSII_RETCODE *error ); ># 6376 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_INT32 osii_findprog( const OSII_CHAR *progtofind, OSII_CHAR *outstrbuf, OSII_INT32 outbufsize ); ># 6393 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_RETCODE osii_findprog_full_path( const OSII_CHAR *progtofind, OSII_CHAR *outstrbuf, size_t outbufsize ); ># 6409 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_uri_to_uri_text( OSII_STRING dest_text, size_t dest_size, const OSII_CHAR *orig ); ># 6424 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >size_t osii_uri_from_uri_text( OSII_STRING dest_text, size_t dest_size, const OSII_CHAR *orig ); ># 6436 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _PROC_FOLDERS_STR * PROC_FOLDERS; > > >typedef struct _PROC_FOLDERS_STR >{ > > void *h; > > OSII_BOOL (*reg_name)( PROC_FOLDERS pf, const char *name, const char *path ); > OSII_STRING (*get_folder)( PROC_FOLDERS pf, const char *name, OSII_STRING buf, size_t size, OSII_BOOL create ); > OSII_STRING (*get_path)( PROC_FOLDERS pf, const char *path, const char *filename, OSII_STRING buf, size_t size, OSII_BOOL create ); > OSII_STRING (*get_path_copy)( PROC_FOLDERS pf, const char *path, const char *def_path, const char *filename, OSII_STRING buf, size_t size, OSII_BOOL overwrite ); > OSII_BOOL (*dir_path_copy)( PROC_FOLDERS pf, const char *path, const char *def_path, OSII_BOOL overwrite ); > > > > > > > void (*destroy)( PROC_FOLDERS df ); > >} PROC_FOLDERS_STR; > > > extern PROC_FOLDERS process_folders; > > > > >extern PROC_FOLDERS osii_process_folders_new( OSII_UINT32 flags, long n, ... ); >extern OSII_BOOL osii_process_folders_reg( const char *name, const char *path ); ># 6503 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _osii_tr_str * OSII_TR_HANDLE; > > >typedef struct _osii_tr_str >{ > > void *h; ># 6520 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_STRING (*snprintf)( OSII_TR_HANDLE h, OSII_STRING buffer, size_t sz, const OSII_CHAR * fmt_id, const OSII_CHAR * format, ... ); ># 6531 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_STRING (*vsnprintf)( OSII_TR_HANDLE h, OSII_STRING buffer, size_t sz, const OSII_CHAR * fmt_id, const OSII_CHAR * format, va_list args ); > > > > > > void (*destroy)( OSII_TR_HANDLE h ); > >} OSII_TR_STR; > >typedef struct _osii_tr_init_str >{ > > OSII_STRING language; > > OSII_UINT32 buckets; > > OSII_UINT32 token_length; > > OSII_UINT32 param_count; > > OSII_BOOL disable_logging; > > > > > OSII_BOOL support_xml_space_attribute; > >} OSII_TR_INIT_STR; ># 6574 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_TR_HANDLE osii_tr_init_ext( const OSII_CHAR *basename, OSII_TR_INIT_STR *options, OSII_RETCODE * ret ); > > > > >extern size_t osii_string_cat_n( OSII_CHAR * dest, size_t dstSize, const OSII_CHAR *str, size_t nFromStr); >OSII_STRING osii_string_copy_base( OSII_STRING destination, const OSII_STRING source, OSII_UINT32 n_plus_one ); >OSII_CHAR * osii_strnchr( const OSII_CHAR *source, OSII_CHAR c, OSII_UINT32 len ); >OSII_STRING osii_string_token_all( OSII_STRING string, OSII_STRING set, OSII_STRING* rest ); >size_t osii_strncat( OSII_CHAR * dest, size_t destSize, const OSII_CHAR *str, size_t nFromStr); >OSII_UINT32 osii_string_vcatf(OSII_CHAR *dest, size_t destSize, const OSII_CHAR *fmt, va_list args); >OSII_UINT32 osii_string_catf(OSII_CHAR * dest, size_t destSize, const OSII_CHAR * fmt, ...); >OSII_UINT32 osii_xtoi( const OSII_STRING str); >OSII_RETCODE osii_get_os_user( OSII_STRING user, OSII_UINT32 usize, OSII_STRING domain, OSII_UINT32 dsize ); >OSII_INT32 osii_truncLL( OSII_INT64 valin, OSII_INT32 *valout, OSII_BOOL *overflow ); >OSII_INT64 osii_truncLL_ext( OSII_INT64 valin, OSII_INT64 max, OSII_INT64 min, OSII_INT64 *valout, OSII_BOOL *overflow ); >OSII_UINT32 osii_truncULL( OSII_UINT64 valin, OSII_UINT32 *valout, OSII_BOOL *overflow ); >OSII_UINT64 osii_truncULL_ext( OSII_UINT64 valin, OSII_UINT64 max, OSII_UINT64 *valout, OSII_BOOL *overflow ); >OSII_INT32 osii_cal_compare_day_deprecated( time_t time1, time_t time2 ); >OSII_INT32 osii_cal_compare_hour_deprecated( time_t time1, time_t time2 ); >int osii_getEchoPort( void ); >void osii_setEchoPort( int port ); >OSII_INT32 osii_checkport( const OSII_CHAR *s, OSII_INT32 port, OSII_INT32 timeoutsec ); >OSII_RETCODE osii_crc_file_ext( const OSII_CHAR *filename, OSII_UINT32 *val, OSII_INT32 throttle ); >OSII_RETCODE osii_crc_file( const OSII_CHAR *filename, OSII_UINT32 *val ); >OSII_STRING osii_envsub_hint( const OSII_CHAR *string, OSII_STRING result, OSII_UINT32 result_size, OSII_UINT32 *required_size ); >OSII_STRING osii_envsub_ext_hint( const OSII_CHAR *string, OSII_STRING result, OSII_UINT32 result_size, OSII_UINT32 *required_size_hint ); >void osii_fix_path_separator( OSII_STRING s ); >OSII_RETCODE osii_delete_path( const OSII_CHAR *path ); >OSII_DOUBLE osii_round_double( OSII_DOUBLE dval ); >OSII_FLOAT osii_round_float( OSII_FLOAT fval ); >OSII_BYTE osii_float_check(OSII_FLOAT fval); >OSII_BOOL osii_is_float_valid(OSII_FLOAT fval); >OSII_BYTE osii_double_check(OSII_DOUBLE dval); >OSII_BOOL osii_is_double_valid(OSII_DOUBLE dval); >char* osii_asc6bin8( char *s, short len, short *lenout, char mode ); >void osii_closedir_r( void ); >OSII_RETCODE osii_socket_open_udp( OSII_SOCKET* socket_id); >OSII_STRING osii_tempnam( const OSII_CHAR *directory, const OSII_CHAR *prefix ); >OSII_UINT32 osii_zlib_compress_max( void *src, OSII_UINT32 ssize, void *dest, OSII_UINT32 dsize ); >OSII_RETCODE osii_zlib_compress_file( const char * filein, const char * fileout, int level); >OSII_RETCODE osii_zlib_uncompress_file( const char * filein, const char * fileout); >void osii_putenv( const OSII_CHAR *variable ); >OSII_STRING osii_getenv( const OSII_CHAR *variable ); >void osii_unsetenv( const OSII_CHAR *variable ); ># 6655 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _osii_abs_periodic_timer OSII_ABS_PERIODIC_TIMER; >typedef OSII_ABS_PERIODIC_TIMER * OSII_APT_HANDLE; ># 6668 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >OSII_APT_HANDLE osii_abs_periodic_timer_init( OSII_UINT32 frequency_seconds, OSII_UINT32 offset_seconds ); > >struct _osii_abs_periodic_timer { > void *h; > > > > > > > > OSII_INT32 (*get_percent_expired)( OSII_APT_HANDLE h ); ># 6689 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_INT32 (*get_next_expiry_time)( OSII_APT_HANDLE h, OSII_STRING str_time, size_t sz ); > > > > > > void (*destroy)( OSII_APT_HANDLE h ); >}; ># 6717 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >typedef struct _OSII_UUID_GENERATOR_STRUCT *OSII_UUID_GENERATOR_HANDLE; > > >typedef struct _OSII_UUID_GENERATOR_STRUCT >{ > > > void *h; ># 6734 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > void ( *destroy )( OSII_UUID_GENERATOR_HANDLE hGenerator ); ># 6749 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" > OSII_RETCODE ( *generate )( OSII_UUID_GENERATOR_HANDLE hGenerator, OSII_STRING uuid, size_t uuidSize ); > >} OSII_UUID_GENERATOR_STRUCT; ># 6761 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_lowlevel.h" >extern OSII_UUID_GENERATOR_HANDLE osii_uuid_generator_init( void ); > > > > > > > >} ># 55 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" 1 ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" 1 ># 183 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" ># 1 "/usr/include/assert.h" 1 3 4 ># 65 "/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__)); > > >} ># 184 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" 2 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h" 1 3 4 ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" 2 ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 186 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" 2 ># 196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >extern "C" { ># 237 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >typedef enum { > > PROTOBUF_C_FIELD_FLAG_PACKED = (1 << 0), > > > PROTOBUF_C_FIELD_FLAG_DEPRECATED = (1 << 1), >} ProtobufCFieldFlag; ># 253 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >typedef enum { > > PROTOBUF_C_LABEL_REQUIRED, > > > > > > PROTOBUF_C_LABEL_OPTIONAL, > > > > > > > PROTOBUF_C_LABEL_REPEATED, >} ProtobufCLabel; ># 279 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >typedef enum { > PROTOBUF_C_TYPE_INT32, > PROTOBUF_C_TYPE_SINT32, > PROTOBUF_C_TYPE_SFIXED32, > PROTOBUF_C_TYPE_INT64, > PROTOBUF_C_TYPE_SINT64, > PROTOBUF_C_TYPE_SFIXED64, > PROTOBUF_C_TYPE_UINT32, > PROTOBUF_C_TYPE_FIXED32, > PROTOBUF_C_TYPE_UINT64, > PROTOBUF_C_TYPE_FIXED64, > PROTOBUF_C_TYPE_FLOAT, > PROTOBUF_C_TYPE_DOUBLE, > PROTOBUF_C_TYPE_BOOL, > PROTOBUF_C_TYPE_ENUM, > PROTOBUF_C_TYPE_STRING, > PROTOBUF_C_TYPE_BYTES, > PROTOBUF_C_TYPE_MESSAGE, >} ProtobufCType; ># 307 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >typedef enum { > PROTOBUF_C_WIRE_TYPE_VARINT = 0, > PROTOBUF_C_WIRE_TYPE_64BIT = 1, > PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED = 2, > > PROTOBUF_C_WIRE_TYPE_32BIT = 5, >} ProtobufCWireType; > >struct ProtobufCAllocator; >struct ProtobufCBinaryData; >struct ProtobufCBuffer; >struct ProtobufCBufferSimple; >struct ProtobufCEnumDescriptor; >struct ProtobufCEnumValue; >struct ProtobufCEnumValueIndex; >struct ProtobufCFieldDescriptor; >struct ProtobufCIntRange; >struct ProtobufCMessage; >struct ProtobufCMessageDescriptor; >struct ProtobufCMessageUnknownField; >struct ProtobufCMethodDescriptor; >struct ProtobufCService; >struct ProtobufCServiceDescriptor; > >typedef struct ProtobufCAllocator ProtobufCAllocator; >typedef struct ProtobufCBinaryData ProtobufCBinaryData; >typedef struct ProtobufCBuffer ProtobufCBuffer; >typedef struct ProtobufCBufferSimple ProtobufCBufferSimple; >typedef struct ProtobufCEnumDescriptor ProtobufCEnumDescriptor; >typedef struct ProtobufCEnumValue ProtobufCEnumValue; >typedef struct ProtobufCEnumValueIndex ProtobufCEnumValueIndex; >typedef struct ProtobufCFieldDescriptor ProtobufCFieldDescriptor; >typedef struct ProtobufCIntRange ProtobufCIntRange; >typedef struct ProtobufCMessage ProtobufCMessage; >typedef struct ProtobufCMessageDescriptor ProtobufCMessageDescriptor; >typedef struct ProtobufCMessageUnknownField ProtobufCMessageUnknownField; >typedef struct ProtobufCMethodDescriptor ProtobufCMethodDescriptor; >typedef struct ProtobufCService ProtobufCService; >typedef struct ProtobufCServiceDescriptor ProtobufCServiceDescriptor; > > >typedef int protobuf_c_boolean; > >typedef void (*ProtobufCClosure)(const ProtobufCMessage *, void *closure_data); >typedef void (*ProtobufCMessageInit)(ProtobufCMessage *); >typedef void (*ProtobufCServiceDestroy)(ProtobufCService *); > > > > >struct ProtobufCAllocator { > > void *(*alloc)(void *allocator_data, size_t size); > > > void (*free)(void *allocator_data, void *pointer); > > > void *allocator_data; >}; ># 375 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >struct ProtobufCBinaryData { > size_t len; > uint8_t *data; >}; ># 415 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >struct ProtobufCBuffer { > > void (*append)(ProtobufCBuffer *buffer, > size_t len, > const uint8_t *data); >}; ># 450 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >struct ProtobufCBufferSimple { > > ProtobufCBuffer base; > > size_t alloced; > > size_t len; > > uint8_t *data; > > protobuf_c_boolean must_free_data; > > ProtobufCAllocator *allocator; >}; > > > > >struct ProtobufCEnumDescriptor { > > uint32_t magic; > > > const char *name; > > const char *short_name; > > const char *c_name; > > const char *package_name; > > > unsigned n_values; > > const ProtobufCEnumValue *values; > > > unsigned n_value_names; > > const ProtobufCEnumValueIndex *values_by_name; > > > unsigned n_value_ranges; > > const ProtobufCIntRange *value_ranges; > > > void *reserved1; > > void *reserved2; > > void *reserved3; > > void *reserved4; >}; > > > > >struct ProtobufCEnumValue { > > const char *name; > > > const char *c_name; > > > int value; >}; > > > > >struct ProtobufCEnumValueIndex { > > const char *name; > > unsigned index; >}; > > > > >struct ProtobufCFieldDescriptor { > > const char *name; > > > uint32_t id; > > > ProtobufCLabel label; > > > ProtobufCType type; > > > > > > > unsigned quantifier_offset; > > > > > > unsigned offset; ># 570 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > const void *descriptor; > > > const void *default_value; > > > > > > uint32_t flags; > > > unsigned reserved_flags; > > void *reserved2; > > void *reserved3; >}; ># 597 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >struct ProtobufCIntRange { > int start_value; > unsigned orig_index; > > > > > >}; ># 622 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" >struct ProtobufCMessage { > > const ProtobufCMessageDescriptor *descriptor; > > unsigned n_unknown_fields; > > ProtobufCMessageUnknownField *unknown_fields; >}; > > > > >struct ProtobufCMessageDescriptor { > > uint32_t magic; > > > const char *name; > > const char *short_name; > > const char *c_name; > > const char *package_name; > > > > > > size_t sizeof_message; > > > unsigned n_fields; > > const ProtobufCFieldDescriptor *fields; > > const unsigned *fields_sorted_by_name; > > > unsigned n_field_ranges; > > const ProtobufCIntRange *field_ranges; > > > ProtobufCMessageInit message_init; > > > void *reserved1; > > void *reserved2; > > void *reserved3; >}; > > > > >struct ProtobufCMessageUnknownField { > > uint32_t tag; > > ProtobufCWireType wire_type; > > size_t len; > > uint8_t *data; >}; > > > > >struct ProtobufCMethodDescriptor { > > const char *name; > > const ProtobufCMessageDescriptor *input; > > const ProtobufCMessageDescriptor *output; >}; > > > > >struct ProtobufCService { > > const ProtobufCServiceDescriptor *descriptor; > > void (*invoke)(ProtobufCService *service, > unsigned method_index, > const ProtobufCMessage *input, > ProtobufCClosure closure, > void *closure_data); > > void (*destroy)(ProtobufCService *service); >}; > > > > >struct ProtobufCServiceDescriptor { > > uint32_t magic; > > > const char *name; > > const char *short_name; > > const char *c_name; > > const char *package; > > unsigned n_methods; > > const ProtobufCMethodDescriptor *methods; > > const unsigned *method_indices_by_name; >}; > > > > > > > > >const char * >protobuf_c_version(void); ># 758 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >uint32_t >protobuf_c_version_number(void); ># 793 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >const ProtobufCEnumValue * >protobuf_c_enum_descriptor_get_value_by_name( > const ProtobufCEnumDescriptor *desc, > const char *name); ># 814 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >const ProtobufCEnumValue * >protobuf_c_enum_descriptor_get_value( > const ProtobufCEnumDescriptor *desc, > int value); ># 833 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >const ProtobufCFieldDescriptor * >protobuf_c_message_descriptor_get_field_by_name( > const ProtobufCMessageDescriptor *desc, > const char *name); ># 852 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >const ProtobufCFieldDescriptor * >protobuf_c_message_descriptor_get_field( > const ProtobufCMessageDescriptor *desc, > unsigned value); ># 866 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >size_t >protobuf_c_message_get_packed_size(const ProtobufCMessage *message); ># 886 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >size_t >protobuf_c_message_pack(const ProtobufCMessage *message, uint8_t *out); ># 903 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >size_t >protobuf_c_message_pack_to_buffer( > const ProtobufCMessage *message, > ProtobufCBuffer *buffer); ># 926 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >ProtobufCMessage * >protobuf_c_message_unpack( > const ProtobufCMessageDescriptor *descriptor, > ProtobufCAllocator *allocator, > size_t len, > const uint8_t *data); ># 946 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >void >protobuf_c_message_free_unpacked( > ProtobufCMessage *message, > ProtobufCAllocator *allocator); ># 963 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >protobuf_c_boolean >protobuf_c_message_check(const ProtobufCMessage *); ># 978 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >void >protobuf_c_message_init( > const ProtobufCMessageDescriptor *descriptor, > void *message); > > > > > > > > >void >protobuf_c_service_destroy(ProtobufCService *service); ># 1007 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >const ProtobufCMethodDescriptor * >protobuf_c_service_descriptor_get_method_by_name( > const ProtobufCServiceDescriptor *desc, > const char *name); ># 1052 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/protobuf-c/protobuf-c.h" > >void >protobuf_c_buffer_simple_append( > ProtobufCBuffer *buffer, > size_t len, > const unsigned char *data); > > >void >protobuf_c_service_generated_init( > ProtobufCService *service, > const ProtobufCServiceDescriptor *descriptor, > ProtobufCServiceDestroy destroy); > > >void >protobuf_c_service_invoke_internal( > ProtobufCService *service, > unsigned method_index, > const ProtobufCMessage *input, > ProtobufCClosure closure, > void *closure_data); > > > >} ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" 2 > > > > > > > >extern "C" { ># 70 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct OSII_LIST_ELEM_STR_ >{ > > void *data; > > struct OSII_LIST_ELEM_STR_ *prev; > > struct OSII_LIST_ELEM_STR_ *next; > >} OSII_LIST_ELEM_STR; > > >typedef struct _OSII_LIST_STR >{ > > int count; > > MEMPOOL_HANDLE mempool; > > OSII_LIST_ELEM_STR *head; > > OSII_LIST_ELEM_STR *tail; > > > > > > > void (*destroy)(void *data); > > > > > > > void (*destroy_ud)( void *ud, void *data ); > > void *d_ud; > > > > > > > void *(*copy)( void *data ); > > > > > > > void *(*copy_ud)( void *ud, void *data ); > > void *c_ud; > >} OSII_LIST_STR; ># 137 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_destroy( OSII_LIST_STR *list ); ># 147 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_init( OSII_LIST_STR *list, void (*destroy)(void *data) ); ># 159 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_init_ext( OSII_LIST_STR *list, void (*destroy)(void *data), MEMPOOL_HANDLE mempool ); ># 173 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_ins_next( OSII_LIST_STR *list, OSII_LIST_ELEM_STR *element, void *data ); ># 194 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_ins_prev( OSII_LIST_STR *list, OSII_LIST_ELEM_STR *element, void *data ); ># 211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_list_remove( OSII_LIST_STR *list, OSII_LIST_ELEM_STR *element, void **data ); ># 221 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_LIST_STR *osii_list_copy( OSII_LIST_STR *dest, OSII_LIST_STR *source ); ># 260 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSII_ALIST_STR * OSII_ALIST_HANDLE; > >typedef struct _OSII_ALIST_STR >{ > > void *h; ># 274 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*add)( OSII_ALIST_HANDLE a, void *value ); ># 284 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*add_debug)( OSII_ALIST_HANDLE a, void *value, const char *fname, int lNumber ); ># 293 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*get_at)( OSII_ALIST_HANDLE a, int index, void *buf ); ># 304 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*insert_at)( OSII_ALIST_HANDLE a, int index, void *value ); ># 317 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*insert_at_debug)( OSII_ALIST_HANDLE a, int index, void *value, const char *fname, int lNumber ); ># 331 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*replace_at)( OSII_ALIST_HANDLE a, int index, void *new_value, OSII_UINT8 flags ); ># 347 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*replace_at_debug)( OSII_ALIST_HANDLE a, int index, void *new_value, OSII_UINT8 flags, const char *fname, int lNumber ); ># 360 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*replace)( OSII_ALIST_HANDLE a, void *old_value, void *new_value, OSII_UINT8 flags ); ># 375 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*replace_debug)( OSII_ALIST_HANDLE a, void *old_value, void *new_value, OSII_UINT8 flags, const char *fname, int lNumber ); ># 391 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*remove_at)( OSII_ALIST_HANDLE a, int index, OSII_UINT8 flags ); ># 407 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*remove)( OSII_ALIST_HANDLE a, void *value, OSII_UINT8 flags ); ># 417 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*clear)( OSII_ALIST_HANDLE a, OSII_UINT8 flags ); > > > > > > void (*destroy)( OSII_ALIST_HANDLE a ); > > > > > > void (*sort)( OSII_ALIST_HANDLE a ); > > > > > > > int (*count)( OSII_ALIST_HANDLE a ); ># 446 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*find)( OSII_ALIST_HANDLE a, void *value ); > > > > > > void (*force_sort)( OSII_ALIST_HANDLE a ); >} OSII_ALIST_STR; ># 469 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_ALIST_HANDLE osii_alist_init( size_t element_size, size_t array_size, int (*compare)( const void *, const void * ), > OSII_UINT16 flags, OSII_DESTROY_STR *destroy_int ); ># 498 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef void* HASHTABLE_HANDLE; > >typedef void* HASHTABLE_ITER_HANDLE; > > >typedef struct table_entry >{ > > void * key; > > void * data; > >} TABLE_ENTRY; ># 554 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern int osii_hash_compare_u32( const void *v1, const void *v2 ); ># 565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern int osii_hash_compare_u64( const void *v1, const void *v2 ); > > > > > > > >extern OSII_UINT32 osii_hash_count( HASHTABLE_HANDLE h ); > > > > > > > >extern OSII_UINT32 osii_hash_buckets( HASHTABLE_HANDLE h ); > > > > > >extern void osii_hash_destroy( HASHTABLE_HANDLE h ); ># 596 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_UINT32 osii_hash_hash_u32( const void *key, void *userdata ); ># 605 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_UINT32 osii_hash_hash_u64( const void *key, void *userdata ); ># 620 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern HASHTABLE_HANDLE osii_hash_init( OSII_UINT32 buckets, NODE_HASH_FUNC h, NODE_COMP_FUNC match, NODE_HASH_FREE_FUNC destroy, void *h_user, void *d_user ); ># 645 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern HASHTABLE_HANDLE osii_hash_init_ext( OSII_UINT32 buckets, NODE_HASH_FUNC h, NODE_COMP_FUNC match, NODE_HASH_FREE_FUNC destroy, void *h_user, void *d_user, OSII_UINT32 flags ); ># 666 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_hash_insert( HASHTABLE_HANDLE h, const void *key, const void *data ); ># 686 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_hash_resize( HASHTABLE_HANDLE h, OSII_UINT32 buckets ); ># 703 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern HASHTABLE_ITER_HANDLE osii_hash_iter( HASHTABLE_HANDLE h ); ># 716 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_hash_iter_next( HASHTABLE_ITER_HANDLE h, TABLE_ENTRY *info ); > > > > > >extern void osii_hash_iter_destroy( HASHTABLE_ITER_HANDLE h ); ># 734 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_hash_lookup( HASHTABLE_HANDLE h, const void *key, void **data ); ># 744 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void osii_hash_mempool_free( void *user, void *key, void *data ); ># 753 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void osii_hash_single_free( void *user, void *key, void *data ); ># 762 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void osii_hash_double_free( void *user, void *key, void *data ); ># 774 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_hash_remove( HASHTABLE_HANDLE h, void **key, void **data ); ># 783 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_UINT32 osii_hash_string( const void *kptr, void *unused ); ># 810 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef void* OSIIOBJ_HANDLE; > >typedef void* OSIIOBJ_TEMPLATE_HANDLE; ># 825 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef OSII_RETCODE ( *OSII_SER_FUNC )( void *user_data, void *data_in, size_t size_in, void *data_out, size_t *size_out ); ># 836 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef size_t ( *OSII_SIZE_FUNC )( void *user_data, void *data_in, size_t size_in ); ># 852 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_build( OSIIOBJ_HANDLE obj, void *stream_buf, size_t *stream_size, void *user_data ); ># 862 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_destroy( OSIIOBJ_HANDLE obj ); ># 872 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern size_t osii_obj_chunk_size( OSIIOBJ_HANDLE h, OSII_INT32 pos, void *user_data ); ># 884 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSIIOBJ_HANDLE osii_obj_create( OSIIOBJ_TEMPLATE_HANDLE th, OSII_POINTER buffer, OSII_RETCODE* ret ); ># 900 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_get( OSIIOBJ_HANDLE obj, OSII_INT32 pos, void *out_block, size_t *out_size, void *user_data ); ># 917 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_get_multi( OSIIOBJ_HANDLE obj, OSII_INT32 pos, OSII_INT32 multi, void *out_block, size_t *out_size, void *user_data ); ># 926 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern size_t osii_obj_get_size( OSIIOBJ_TEMPLATE_HANDLE th, OSII_POINTER buffer ); ># 937 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSIIOBJ_HANDLE osii_obj_new( OSIIOBJ_TEMPLATE_HANDLE th, OSII_RETCODE* ret ); ># 950 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_put( OSIIOBJ_HANDLE obj, OSII_INT32 pos, void *in_block, size_t in_size ); ># 964 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_put_multi( OSIIOBJ_HANDLE obj, OSII_INT32 pos, OSII_UINT32 multi, void *in_block, size_t in_size ); ># 977 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSIIOBJ_TEMPLATE_HANDLE osii_obj_template( const OSII_CHAR *template_name, OSII_INT32 max_chunk, OSII_UINT32 num_blocks, OSII_RETCODE* ret ); ># 992 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_INT32 osii_obj_template_add( OSIIOBJ_TEMPLATE_HANDLE th, const OSII_CHAR *chunk_name, OSII_SER_FUNC serial_in, OSII_SER_FUNC serial_out, OSII_SIZE_FUNC size_func, OSII_BYTE chunk_flags, OSII_RETCODE* ret ); ># 1001 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE osii_obj_template_destroy( OSIIOBJ_TEMPLATE_HANDLE th ); ># 1022 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _QUEUE_STR *QUEUE_HANDLE; > > >typedef struct _QUEUE_STR >{ > > void *h; > > > > > > > void (*destroy)( QUEUE_HANDLE q ); ># 1045 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*pop)( QUEUE_HANDLE q, void *extra, OSII_RETCODE *retcode ); ># 1055 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*peek)( QUEUE_HANDLE q, void *extra, OSII_RETCODE *retcode ); ># 1065 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*wait)( QUEUE_HANDLE q, void *extra, OSII_RETCODE *retcode ); ># 1075 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*push)( QUEUE_HANDLE q, void *val, void *extra ); ># 1085 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*push_front)( QUEUE_HANDLE q, void *val, void *extra ); ># 1094 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > size_t (*count)( QUEUE_HANDLE q, void *extra ); ># 1105 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*wait_timed)( QUEUE_HANDLE q, void *extra, OSII_UINT32 timeout, OSII_RETCODE *retcode ); > >} QUEUE_STR; ># 1121 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern QUEUE_HANDLE osii_queue_init( size_t initial_size, size_t max_size, OSII_UINT8 flags ); ># 1143 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern QUEUE_HANDLE osii_queue_probability( size_t initial_size, size_t max_size, OSII_UINT8 flags, OSII_UINT32 def_priority ); ># 1164 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _LOGGER_GROUP_STR *LOGGER_GROUP_HANDLE; > > >typedef struct _LOGGER_GROUP_STR >{ > > void *h; ># 1182 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE (*add)( LOGGER_GROUP_HANDLE lg, OSII_UINT8 logger_group, LOGGER_HANDLE l ); > > > > > > void (*destroy)( LOGGER_GROUP_HANDLE lg ); > > > > > > void (*flush)( LOGGER_GROUP_HANDLE lg ); ># 1205 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*printf)( LOGGER_GROUP_HANDLE lg, OSII_UINT8 logger_group, const char *format, ... ); ># 1216 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*vprintf)( LOGGER_GROUP_HANDLE lg, OSII_UINT8 logger_group, const char *format, va_list marker ); > > > > > > > OSII_BOOL (*test)( LOGGER_GROUP_HANDLE lg, OSII_UINT8 logger_group ); ># 1237 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*duplicate) (LOGGER_GROUP_HANDLE lg, OSII_UINT8 dest, OSII_UINT8 src); > >} LOGGER_GROUP_STR; ># 1249 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern LOGGER_GROUP_HANDLE osii_logger_group( OSII_UINT8 flags, OSII_RETCODE *error ); ># 1262 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern int osii_logger_group_tls_err_printf( LOGGER_GROUP_HANDLE h, const char *library, OSII_UINT8 logger_group, const char *format, ... ); ># 1311 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _TagChunkManager* TAGCHUNKMANAGER_HANDLE; ># 1320 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _TagChunkHeader* TAGCHUNKHEADER_HANDLE; > > > > >typedef struct _TagChunkHeader >{ > > OSII_UINT16 endian; > > OSII_UINT8 version; > > OSII_UINT8 padding; > > OSII_INT32 type; > > OSII_INT32 subtype; > > OSII_INT32 chunksize; ># 1349 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_UINT8 (*getstreamflags)( TAGCHUNKHEADER_HANDLE header ); ># 1359 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*setstreamflags)( TAGCHUNKHEADER_HANDLE header, OSII_UINT8 flags ); > > > > > > void (*setpadding)( TAGCHUNKHEADER_HANDLE header ); > > > > > > void (*destroy)( TAGCHUNKHEADER_HANDLE header ); ># 1380 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > int (*compare)( TAGCHUNKHEADER_HANDLE hdr1, TAGCHUNKHEADER_HANDLE hdr2 ); >} TagChunkHeader; > > > > > >typedef struct _TagChunk* TAGCHUNK_HANDLE; > > > > > >typedef struct _TagChunk >{ > > TagChunkHeader header; > > OSII_CHAR key[24]; > > void* data; ># 1410 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*isvalid)( TAGCHUNK_HANDLE chunk ); ># 1423 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*read)( TAGCHUNK_HANDLE chunk, TAGCHUNKMANAGER_HANDLE manager, STREAM_READER sr ); ># 1435 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*write)( TAGCHUNK_HANDLE chunk, TAGCHUNKMANAGER_HANDLE manager, STREAM_WRITER sw ); > > > > > > > > TAGCHUNKHEADER_HANDLE (*getheader)( TAGCHUNK_HANDLE chunk ); ># 1453 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > TAGCHUNKHEADER_HANDLE (*fullheader)( TAGCHUNK_HANDLE chunk ); > > > > > > void (*destroy)( TAGCHUNK_HANDLE chunk ); > > > > > > > > TAGCHUNK_HANDLE (*create)( TAGCHUNK_HANDLE chunk ); > >} TagChunk; ># 1480 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void tag_chunk_header_init( TAGCHUNKHEADER_HANDLE header, OSII_INT32 type, > OSII_INT32 subtype, OSII_UINT8 version ); ># 1491 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern int tag_chunk_compare_header( TAGCHUNK_HANDLE c1, TAGCHUNK_HANDLE c2 ); ># 1509 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNKMANAGER_HANDLE tag_chunk_manager( void ); ># 1521 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE tag_chunk_manager_registertagchunk( TAGCHUNKMANAGER_HANDLE manager, TAGCHUNK_HANDLE chunk ); ># 1533 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE tag_chunk_manager_unregistertagchunk( TAGCHUNKMANAGER_HANDLE manager, OSII_INT32 type, OSII_INT32 subtype, OSII_BYTE version ); ># 1544 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_manager_build( TAGCHUNKMANAGER_HANDLE manager, STREAM_HANDLE s, TAGCHUNK_HANDLE chunk ); ># 1553 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_manager_create( TAGCHUNKMANAGER_HANDLE manager, STREAM_HANDLE s ); > > > > > >extern void tag_chunk_manager_destroy( TAGCHUNKMANAGER_HANDLE manager ); >extern OSII_BOOL tag_chunk_manager_write_file( TAGCHUNKMANAGER_HANDLE manager, TAGCHUNK_HANDLE chunk, const char *filename ); >extern TAGCHUNK_HANDLE tag_chunk_manager_read_file( TAGCHUNKMANAGER_HANDLE manager, const char *filename ); >extern TAGCHUNK_HANDLE tag_chunk_manager_package( TAGCHUNKMANAGER_HANDLE manager, TAGCHUNK_HANDLE chunk, int compress_size ); >extern void tag_chunk_set_key( TAGCHUNK_HANDLE chunk ); ># 1585 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_container_create( TAGCHUNK_HANDLE unused ); ># 1597 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_container_add( TAGCHUNK_HANDLE contchunk, TAGCHUNK_HANDLE chunk ); ># 1609 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_container_remove( TAGCHUNK_HANDLE contchunk, TAGCHUNK_HANDLE chunk ); ># 1618 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_container_getitem( TAGCHUNK_HANDLE chunk, int index ); > > > > > > > >extern int tag_chunk_container_count( TAGCHUNK_HANDLE chunk ); > > > > > > >extern void tag_chunk_container_enableinternaldestroys( TAGCHUNK_HANDLE chunk, OSII_BOOL enable ); ># 1642 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_container_isvalid( TAGCHUNK_HANDLE chunk ); > > > > > > >extern void tag_chunk_container_compress( TAGCHUNK_HANDLE chunk, OSII_BOOL compress ); > > > > > > > >extern void tag_chunk_container_compress_lzox( TAGCHUNK_HANDLE chunk, OSII_BOOL compress ); > > > > > > > >extern void tag_chunk_container_compress_lz4( TAGCHUNK_HANDLE chunk, OSII_BOOL compress ); ># 1685 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_string_create( TAGCHUNK_HANDLE unused ); ># 1696 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_STRING tag_chunk_string_get( TAGCHUNK_HANDLE chunk, OSII_STRING value_buf, size_t len, size_t* len_out ); ># 1707 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE tag_chunk_string_put( TAGCHUNK_HANDLE chunk, const char *value ); ># 1716 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_string_isvalid( TAGCHUNK_HANDLE chunk ); > > > > > > > >extern size_t tag_chunk_string_length( TAGCHUNK_HANDLE chunk ); ># 1743 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_binary_create( TAGCHUNK_HANDLE unused ); ># 1754 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BYTE *tag_chunk_binary_get( TAGCHUNK_HANDLE chunk, OSII_BYTE *value_buf, size_t len, size_t* len_out ); ># 1765 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE tag_chunk_binary_put( TAGCHUNK_HANDLE chunk, const OSII_BYTE *value, size_t len ); ># 1774 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_binary_isvalid( TAGCHUNK_HANDLE chunk ); > > > > > > > >extern size_t tag_chunk_binary_length( TAGCHUNK_HANDLE chunk ); >extern OSII_BOOL tag_chunk_binary_get_unknown( TAGCHUNK_HANDLE chunk, OSII_INT32 *type, OSII_INT32 *sub_type, OSII_BYTE *version ); ># 1812 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_properties_create( TAGCHUNK_HANDLE unused ); >extern TAGCHUNK_HANDLE tag_chunk_properties_fast_create( TAGCHUNK_HANDLE unused ); >extern TAGCHUNK_HANDLE tag_chunk_properties_slow_create( TAGCHUNK_HANDLE unused ); ># 1826 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_STRING tag_chunk_properties_get( TAGCHUNK_HANDLE chunk, const char *key, OSII_STRING value_buf, size_t len, size_t* len_out ); >extern OSII_USTRING tag_chunk_properties_get_u( TAGCHUNK_HANDLE chunk, const char *key, OSII_USTRING value_buf, size_t len, size_t* len_out ); ># 1838 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_properties_put( TAGCHUNK_HANDLE chunk, const char *key, const char *value ); >extern OSII_BOOL tag_chunk_properties_put_u( TAGCHUNK_HANDLE chunk, const char *key, const UChar *value ); ># 1851 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_properties_remove( TAGCHUNK_HANDLE chunk, const char *id ); ># 1860 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_properties_isvalid( TAGCHUNK_HANDLE chunk ); ># 1869 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern HASHTABLE_HANDLE tag_chunk_properties_get_hash( TAGCHUNK_HANDLE chunk, OSII_BOOL unicode ); ># 1883 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSIITEM_STR* GRIDCELLELEM_HANDLE; > > > > > > >extern OSII_BOOL grid_row_chunk_addcell( TAGCHUNK_HANDLE chunk, GRIDCELLELEM_HANDLE cell ); >extern TAGCHUNK_HANDLE grid_row_chunk_create( TAGCHUNK_HANDLE unused ); >extern TAGCHUNK_HANDLE grid_row_chunk_create_pool( TAGCHUNK_HANDLE unused, MEMPOOL_HANDLE mempool ); >extern void grid_row_chunk_setrowid( TAGCHUNK_HANDLE chunk, const OSII_CHAR *rowid ); > >extern OSII_BOOL table_tag_chunk_addrow( TAGCHUNK_HANDLE chunk, TAGCHUNK_HANDLE gridRowChunk ); >extern OSII_BOOL table_tag_chunk_addtablemetafield( TAGCHUNK_HANDLE chunk, const OSII_CHAR *name, OSII_UINT16 type, OSII_UINT32 size, OSII_UINT16 flags ); >extern TAGCHUNK_HANDLE table_tag_chunk_create( TAGCHUNK_HANDLE unused ); >extern TAGCHUNK_HANDLE table_tag_chunk_create_pool( TAGCHUNK_HANDLE unused, MEMPOOL_HANDLE listpool ); >extern OSII_INT32 table_tag_chunk_getrowcount( TAGCHUNK_HANDLE chunk ); >extern void table_tag_chunk_settableid( TAGCHUNK_HANDLE chunk, OSII_UINT64 tableID ); > > > > > > > >extern TAGCHUNK_HANDLE tag_chunk_table_stream_create( TAGCHUNK_HANDLE unused ); >extern TAGCHUNK_HANDLE tag_chunk_table_stream_create_size( TAGCHUNK_HANDLE unused, size_t estimated_size ); >extern OSII_BOOL tag_chunk_table_stream_get_info( TAGCHUNK_HANDLE chunk, OSII_UINT16 *cols, OSII_STRING name, size_t size, OSII_UINT64 *id ); >extern OSII_BOOL tag_chunk_table_stream_set_info( TAGCHUNK_HANDLE chunk, OSII_UINT16 cols, const OSII_CHAR *name, OSII_UINT64 id ); >extern OSII_BOOL tag_chunk_table_stream_get_column( TAGCHUNK_HANDLE chunk, OSII_STRING name, size_t len, enum OSITypeCode *type_code, OSII_UINT16 *array_len, OSII_UINT32 *elem_size, OSII_UINT32 *custom ); >extern OSII_BOOL tag_chunk_table_stream_set_column_offset( TAGCHUNK_HANDLE chunk, int col, OSII_UINT32 offset ); >extern OSII_BOOL tag_chunk_table_stream_set_string_column_handling( TAGCHUNK_HANDLE chunk, int col, OSII_BOOL string_as_buffer ); >extern OSII_BOOL tag_chunk_table_stream_set_column( TAGCHUNK_HANDLE chunk, const OSII_CHAR *name, enum OSITypeCode type_code, OSII_UINT16 array_len, OSII_UINT32 elem_size, OSII_UINT32 custom, OSII_UINT32 offset ); >extern OSII_BOOL tag_chunk_table_stream_get_row( TAGCHUNK_HANDLE chunk, void *data, OSII_STRING id, size_t len ); >extern OSII_BOOL tag_chunk_table_stream_set_row( TAGCHUNK_HANDLE chunk, void *data, const OSII_CHAR *id ); >extern OSII_BOOL tag_chunk_table_stream_isvalid( TAGCHUNK_HANDLE chunk ); >extern OSII_INT64 tag_chunk_table_stream_set_reader_position( TAGCHUNK_HANDLE chunk, OSII_INT64 position); >extern OSII_BOOL tag_chunk_table_stream_get_reader_position( TAGCHUNK_HANDLE chunk, OSII_INT64 *position); ># 1945 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef ProtobufCMessage *(*PROTOBUF_UNPACK_FUNC)(ProtobufCAllocator *allocator, size_t bufLen, const uint8_t *buffer); > > > > > > > >typedef void (*PROTOBUF_FREE_RESP_FUNC)(ProtobufCMessage *msg, ProtobufCAllocator *allocator); ># 1962 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef size_t (*PROTOBUF_GET_PACKED_SIZE_FUNC)(const ProtobufCMessage *msg); ># 1972 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef size_t (*PROTOBUF_PACK_FUNC)(const ProtobufCMessage *msg, uint8_t *buffer); ># 1982 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef size_t (*PROTOBUF_INIT_FUNC)(const ProtobufCMessage *msg); > > >typedef struct _PB_TYPE_MANAGER* PB_TYPE_MANAGER_HANDLE; >typedef struct _PB_TYPE_MANAGER >{ > void *h; ># 2002 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*register_type)(PB_TYPE_MANAGER_HANDLE pb_type_manager, OSII_INT32 message_sub_type_id, > PROTOBUF_UNPACK_FUNC protobuf_unpack_func, PROTOBUF_FREE_RESP_FUNC protobuf_free_func, > PROTOBUF_GET_PACKED_SIZE_FUNC protobuf_get_size_func, PROTOBUF_PACK_FUNC protobuf_pack_func, > PROTOBUF_INIT_FUNC protobuf_init_func); ># 2015 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*unregister_type)(PB_TYPE_MANAGER_HANDLE pb_type_manager, OSII_INT32 message_sub_type_id); ># 2025 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*is_type_registered)(PB_TYPE_MANAGER_HANDLE pb_type_manager, OSII_INT32 message_sub_type_id); ># 2036 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE (*init_buf)(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg, OSII_INT32 message_sub_type_id); ># 2053 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_UINT32 (*encode_buf)(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg_buf, > OSII_INT32 message_sub_type_id, OSII_BYTE *buffer, size_t bufferSize); ># 2070 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BYTE *(*encode_buf_alloc)(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg_buf, > OSII_INT32 message_sub_type_id, size_t *bufferSize); ># 2082 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*free_encode_buf)(PB_TYPE_MANAGER_HANDLE pb_type_manager, OSII_BYTE *data); ># 2096 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > size_t (*get_encoded_size)(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg_buf, > OSII_INT32 message_sub_type_id); ># 2113 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > ProtobufCMessage *(*decode_buf)(PB_TYPE_MANAGER_HANDLE pb_type_manager, > OSII_INT32 message_sub_type_id, OSII_BYTE *buffer, size_t bufferSize, OSII_BYTE **extended_data_start); ># 2127 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void (*free_decoded_buf)(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg_buf, OSII_INT32 message_sub_type_id); > >} PB_TYPE_MANAGER; ># 2140 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >PB_TYPE_MANAGER_HANDLE pb_type_manager_create(TAGCHUNKMANAGER_HANDLE manager); > > > > > > >void pb_type_manager_destroy(PB_TYPE_MANAGER_HANDLE pb_type_manager); ># 2160 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >TAGCHUNK_HANDLE tag_chunk_pb_create( TAGCHUNK_HANDLE chunk ); > > > > > > >void tag_chunk_pb_destroy( TAGCHUNK_HANDLE chunk ); ># 2179 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >ProtobufCMessage *tag_chunk_pb_get(PB_TYPE_MANAGER_HANDLE pb_type_manager, TAGCHUNK_HANDLE chunk, OSII_INT32 *message_sub_type_id); ># 2190 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >void tag_chunk_pb_free_retrieved_protobuf(PB_TYPE_MANAGER_HANDLE pb_type_manager, ProtobufCMessage *msg_buf, OSII_INT32 message_sub_type_id); ># 2202 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >OSII_BOOL tag_chunk_pb_put(PB_TYPE_MANAGER_HANDLE pb_type_manager, TAGCHUNK_HANDLE chunk, ProtobufCMessage *msg_buf, OSII_INT32 message_sub_type_id); ># 2211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >OSII_BOOL tag_chunk_pb_isvalid( TAGCHUNK_HANDLE chunk ); ># 2237 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef int (*ArrayElementSize)( void* element ); ># 2249 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef OSII_BOOL (*ArrayElementRead)( void* element, TAGCHUNK_HANDLE chunk, int length, STREAM_READER sr ); ># 2260 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef OSII_BOOL (*ArrayElementWrite)( void* element, TAGCHUNK_HANDLE chunk, STREAM_WRITER sw ); > > > > > >typedef void (*ArrayElementDestroy)( void* element ); > > > > > >typedef void* (*ArrayElementCreate)( void ); ># 2281 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef void* (*ArrayElementCreateBulk)( size_t count, size_t *elem_size ); > > > > > > >typedef void (*ArrayElementDestroyBulk)( void *data, size_t count ); > >typedef struct _ArrayElementCallbackStr >{ > ArrayElementSize size; > ArrayElementRead read; > ArrayElementWrite write; > ArrayElementDestroy destroy; > ArrayElementCreate create; > ArrayElementCreateBulk createbulk; > ArrayElementDestroyBulk destroybulk; > >} ArrayElementCallbackStr; ># 2310 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_array_create( TAGCHUNK_HANDLE chunk ); >extern TAGCHUNK_HANDLE tag_chunk_array_create_pool( TAGCHUNK_HANDLE originChunk, MEMPOOL_HANDLE listpool ); ># 2323 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_array_create_fixed_array( TAGCHUNK_HANDLE originChunk, void *data, size_t elem_size, size_t count ); ># 2339 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_array_init( TAGCHUNK_HANDLE chunk, OSII_INT32 subtype, > ArrayElementSize size, ArrayElementRead read, ArrayElementWrite write, > ArrayElementDestroy destroy, ArrayElementCreate create ); >extern OSII_BOOL tag_chunk_array_init_ext( TAGCHUNK_HANDLE chunk, OSII_INT32 subtype, ArrayElementCallbackStr *cb ); ># 2352 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_BOOL tag_chunk_array_add( TAGCHUNK_HANDLE chunk, void* item ); ># 2361 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_RETCODE tag_chunk_array_add_fast( TAGCHUNK_HANDLE chunk, void* item ); >extern OSII_BOOL tag_chunk_array_isvalid( TAGCHUNK_HANDLE chunk ); > > > > > > > >extern int tag_chunk_array_count( TAGCHUNK_HANDLE chunk ); ># 2379 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void* tag_chunk_array_getitem( TAGCHUNK_HANDLE chunk, int index ); ># 2389 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern void** tag_chunk_array_getarray( TAGCHUNK_HANDLE chunk ); > > > > > > >extern void tag_chunk_array_enableinternaldestroys( TAGCHUNK_HANDLE chunk, OSII_BOOL enable ); ># 2405 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern TAGCHUNK_HANDLE tag_chunk_array_string( int type ); > > > > > >extern void *tag_chunk_array_string_create( void ); ># 2421 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_STRING tag_chunk_array_string_get( void *ele, char *str, size_t len ); > > > > > > >extern OSII_BOOL tag_chunk_array_string_put( void *ele, const char *str ); >extern void tag_chunk_array_string_destroy( void *ele ); ># 2451 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSII_REFERENCE_STR * OSII_REFERENCE; > > >typedef struct _OSII_REFERENCE_OPT_STR * OSII_REFERENCE_OPT; > > >typedef struct _OSII_REFERENCE_STR >{ > > void *h; ># 2469 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void *(*obtain)( OSII_REFERENCE ref ); > > > > > > > void (*release)( OSII_REFERENCE ref ); > > > > > > > void (*mark)( OSII_REFERENCE ref ); ># 2492 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_BOOL (*marked)( OSII_REFERENCE ref ); ># 2502 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE (*options)( OSII_REFERENCE ref, OSII_REFERENCE_OPT options ); > >} OSII_REFERENCE_STR; > > >typedef struct _REFERENCE_ITER_STR * REFERENCE_ITER; > > >typedef struct _REFERENCE_ITER_OPT_STR * REFERENCE_ITER_OPT; > > >typedef struct _REFERENCE_ITER_STR >{ > > void *h; ># 2525 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_REFERENCE (*next)( REFERENCE_ITER ri ); > > > > > > > > OSII_REFERENCE (*prev)( REFERENCE_ITER ri ); > > > > > > > > OSII_REFERENCE (*curr)( REFERENCE_ITER ri ); > > > > > > > > OSII_REFERENCE (*front)( REFERENCE_ITER ri ); > > > > > > > > OSII_REFERENCE (*end)( REFERENCE_ITER ri ); ># 2566 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE (*ins_next)( REFERENCE_ITER ri, OSII_REFERENCE ref ); ># 2575 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE (*ins_prev)( REFERENCE_ITER ri, OSII_REFERENCE ref ); > > > > > > > > size_t (*count)( REFERENCE_ITER ri ); > > > > > > void (*destroy)( REFERENCE_ITER ri ); > >} REFERENCE_ITER_STR; > > >typedef struct _OSII_REFERENCE_OPT_STR >{ > > OSII_DESTROY_STR destroy; > > OSII_MUTEX *pmutex; > > void (*on_mark)( void *data ); > >} OSII_REFERENCE_OPT_STR; > > >typedef struct _REFERENCE_ITER_OPT_STR >{ > > OSII_MUTEX *pmutex; > > OSII_LIST_STR *plist; > > MEMPOOL_HANDLE list_pool; > >} REFERENCE_ITER_OPT_STR; ># 2624 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_REFERENCE osii_reference_create( void *data, OSII_REFERENCE_OPT options, OSII_RETCODE *ret ); > > > > > > >extern REFERENCE_ITER osii_reference_iter_create( OSII_UINT32 flags, REFERENCE_ITER_OPT opt, OSII_RETCODE *ret ); ># 2641 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSIITEM_STR* OSIITEM_HANDLE; > > >typedef struct _OSIITEM_STR >{ > > void *h; > > > void *data; > > > enum OSITypeCode code; > > > > > > > void (*destroy)( OSIITEM_HANDLE item ); > >} OSIITEM_STR; > >extern OSII_RETCODE osii_item_size( OSIITEM_HANDLE item, size_t *size ); >extern void *osii_item_getdata( OSIITEM_HANDLE item, enum OSITypeCode *code, size_t *size ); >extern OSII_INT64 osii_item_stream_size( OSIITEM_HANDLE item ); >extern OSII_INT64 osii_item_stream_size_ext( enum OSITypeCode code, const void *data, size_t size ); >extern OSII_RETCODE osii_item_convert( OSIITEM_HANDLE item, enum OSITypeCode code, void *buf, size_t size_in, size_t *size_out ); >extern OSIITEM_HANDLE osii_item_read( STREAM_READER sr, OSII_INT64 *ret ); >extern OSII_INT64 osii_item_write( OSIITEM_HANDLE item, STREAM_WRITER sw ); >extern OSII_INT64 osii_item_write_ext( enum OSITypeCode code, const void *data, size_t size, STREAM_WRITER sw ); > >extern OSIITEM_HANDLE osii_item_create_int8( OSII_INT8 value ); >extern OSIITEM_HANDLE osii_item_create_uint8( OSII_UINT8 value ); >extern OSIITEM_HANDLE osii_item_create_int16( OSII_INT16 value ); >extern OSIITEM_HANDLE osii_item_create_uint16( OSII_UINT16 value ); >extern OSIITEM_HANDLE osii_item_create_int32( OSII_INT32 value ); >extern OSIITEM_HANDLE osii_item_create_uint32( OSII_UINT32 value ); >extern OSIITEM_HANDLE osii_item_create_int64( OSII_INT64 value ); >extern OSIITEM_HANDLE osii_item_create_uint64( OSII_UINT64 value ); >extern OSIITEM_HANDLE osii_item_create_float( OSII_FLOAT value ); >extern OSIITEM_HANDLE osii_item_create_double( OSII_DOUBLE value ); >extern OSIITEM_HANDLE osii_item_create_ascii( const char *value ); >extern OSIITEM_HANDLE osii_item_create_string( const UChar *value ); >extern OSIITEM_HANDLE osii_item_create_empty( void ); >extern OSIITEM_HANDLE osii_item_create_ascii_array_from_fixed( const char *top, size_t size_elem, size_t count ); ># 2696 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSIITEM_HANDLE osii_item_create( enum OSITypeCode code, const void *data, size_t size, OSII_RETCODE *ret ); >extern void *osii_item_create_nodata( void ); >extern void osii_item_destroy( OSIITEM_HANDLE item ); >extern void osii_item_setdata( OSIITEM_HANDLE item, enum OSITypeCode code, size_t size, const void *data ); ># 2720 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSII_TREE_NODE_STR >{ > > void *data; > void (*destroy)(void *data); > > OSII_LIST_STR children; > > OSII_LIST_ELEM_STR*elem; > struct _OSII_TREE_NODE_STR *parent; > struct _OSII_TREE_NODE_STR *root; > struct _OSII_TREE_NODE_STR *next; > struct _OSII_TREE_NODE_STR *prev; > >} OSII_TREE_NODE_STR; > > >extern OSII_TREE_NODE_STR *osii_tree_create( void *data, void (*destroy)(void *data), MEMPOOL_HANDLE mempool ); ># 2746 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >extern OSII_TREE_NODE_STR *osii_tree_node_create( OSII_TREE_NODE_STR *parent, void *data ); > > > > > > > >extern OSII_UINT32 osii_tree_node_count( OSII_TREE_NODE_STR *root ); >extern void osii_tree_node_destroy( OSII_TREE_NODE_STR *node ); ># 2769 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >typedef struct _OSII_KVPLIST_STRUCT * OSII_KVPLIST_HANDLE; > > >typedef struct _OSII_KVPLIST_STRUCT >{ > > void *h; ># 2789 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_INT32 ( *add )( OSII_KVPLIST_HANDLE hKvpList, const OSII_CHAR *pKey, const OSII_CHAR *pValue ); ># 2802 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_INT32 ( *count )( OSII_KVPLIST_HANDLE hKvpList ); ># 2813 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > void ( *destroy )( OSII_KVPLIST_HANDLE hKvpList ); ># 2834 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_RETCODE ( *get_kvp )( OSII_KVPLIST_HANDLE hKvpList, OSII_INT32 index, OSII_STRING key, > size_t keySize, OSII_STRING value, size_t valueSize ); ># 2857 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" > OSII_STRING ( *string_replace )( OSII_KVPLIST_HANDLE hKvpList, OSII_STRING outbuf, > size_t outbufSize, OSII_BOOL caseSensitive, const OSII_CHAR *pFormat ); > >} OSII_KVPLIST_STRUCT; ># 2875 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_container.h" >OSII_KVPLIST_HANDLE osii_kvplist_init( void ); > > > > > >} ># 56 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" 1 ># 35 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef void* MEMMGR_HANDLE; > > >typedef struct _MEMMGR_INIT_STR >{ > > size_t size; > > OSII_UINT16 initial; > > OSII_UINT8 flags; > >} MEMMGR_INIT_STR; > > >typedef MEMPOOL_INFO_STR MEMMGR_INFO_STR; > > > > > > >extern void osii_memmgr_destroy( MEMMGR_HANDLE h ); ># 70 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern void *osii_memmgr_get( MEMMGR_HANDLE h, size_t size, OSII_RETCODE *ret ); ># 87 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern void *osii_memmgr_get_clear( MEMMGR_HANDLE h, size_t size, OSII_RETCODE *ret ); ># 106 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern MEMMGR_HANDLE osii_memmgr_init( MEMMGR_INIT_STR *init, OSII_UINT32 count, OSII_RETCODE *ret ); ># 125 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern OSII_RETCODE osii_memmgr_put( MEMMGR_HANDLE h, void *mem ); ># 136 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern OSII_RETCODE osii_memmgr_get_info( MEMMGR_HANDLE h, MEMMGR_INFO_STR *info ); >extern MEMPOOL_HANDLE osii_memmgr_get_mempool( MEMMGR_HANDLE h, size_t size, OSII_RETCODE *ret ); ># 156 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef struct _PERIODIC_THREAD_STR *PERIODIC_THREAD_HANDLE; > > >typedef struct _PERIODIC_THREAD_STR >{ > > void *h; > > OSII_INT32 thread_index; > > OSII_UINT32 period; > > OSII_UINT32 offset; > > > > > > void (*destroy)( PERIODIC_THREAD_HANDLE pt ); ># 185 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_UINT32 (*add)( PERIODIC_THREAD_HANDLE pt, void ( *callback )( void * ), void *userdata, OSII_UINT32 periods ); ># 195 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*remove)( PERIODIC_THREAD_HANDLE pt, OSII_UINT32 at ); > > > > > > > OSII_UINT32 (*count)( PERIODIC_THREAD_HANDLE pt ); ># 211 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*start)( PERIODIC_THREAD_HANDLE pt ); ># 221 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*stop)( PERIODIC_THREAD_HANDLE pt, OSII_UINT32 timeout ); > >} PERIODIC_THREAD_STR; ># 232 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern PERIODIC_THREAD_HANDLE osii_periodic_thread_create( const char *name ); ># 251 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef void* THREADPOOL_HANDLE; > > >typedef struct _THREADPOOL_INFO_STR >{ > > OSII_UINT32 threads; > > OSII_UINT32 max_threads; > > OSII_UINT32 free_threads; > > OSII_UINT32 queue_count; > >} THREADPOOL_INFO_STR; > > > > > > >extern void osii_threadpool_destroy( THREADPOOL_HANDLE h ); ># 283 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern OSII_RETCODE osii_threadpool_get_info( THREADPOOL_HANDLE h, THREADPOOL_INFO_STR *info ); > > > > > > >extern OSII_BOOL osii_threadpool_in_thread( THREADPOOL_HANDLE h ); ># 308 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern THREADPOOL_HANDLE osii_threadpool_init( OSII_UINT32 initial_threads, OSII_UINT32 max_threads, const char *name, QUEUE_HANDLE queue, OSII_RETCODE *ret ); ># 324 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern OSII_RETCODE osii_threadpool_queue( THREADPOOL_HANDLE h, void ( *callback )( void * ), void *user_data, void *extra, OSII_SEMAPHORE *sem ); ># 338 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern OSII_RETCODE osii_threadpool_queue_multi( THREADPOOL_HANDLE h, void (*func)(), void *extra, OSII_SEMAPHORE *sem, long n, ... ); ># 356 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef struct _DICT_FACTORY_STR * DICT_FACTORY; > > >typedef struct _DICT_FACTORY_CREATOR_STR * DICT_FACTORY_CREATOR; > > >typedef struct _DICT_FACTORY_STR >{ > > void *h; ># 375 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > void *(*create)( DICT_FACTORY df, const void *key ); ># 384 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > void *(*get)( DICT_FACTORY df, const void *key ); ># 395 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_RETCODE (*remove)( DICT_FACTORY df, const void* key, TABLE_ENTRY *out ); ># 406 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > void (*destroy_elem)( DICT_FACTORY df, void *key, void *data ); > > > > > > void (*destroy)( DICT_FACTORY df ); > > void (*lock)( DICT_FACTORY df ); > void (*unlock)( DICT_FACTORY df ); > HASHTABLE_ITER_HANDLE (*iter)( DICT_FACTORY df ); > >} DICT_FACTORY_STR; > > >typedef struct _DICT_FACTORY_CREATOR_STR >{ > > void *h; > > > OSII_UINT32 buckets; ># 437 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_UINT32 (*hash)( DICT_FACTORY_CREATOR creator, const void *key ); ># 447 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > void *(*create)( DICT_FACTORY_CREATOR creator, const void *key_in, void **key_out ); ># 458 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > int (*compare)( const void *key1, const void *key2 ); > > > > > > > > void (*destroy_elem)( DICT_FACTORY_CREATOR creator, void *key, void *data ); > > > > > > void (*destroy)( DICT_FACTORY_CREATOR creator ); > >} DICT_FACTORY_CREATOR_STR; ># 487 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern DICT_FACTORY osii_dict_factory_new( DICT_FACTORY_CREATOR creator, OSII_UINT32 flags, OSII_RETCODE *ret ); ># 500 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >enum INI_ERROR >{ > INI_ERROR_NONE, > INI_ERROR_BLANK_AFTER_CONTINUE, > INI_ERROR_COMMENT_AFTER_CONTINUE, > INI_ERROR_HEADER_AFTER_CONTINUE, > INI_ERROR_NEW_LINE_AFTER_CONTINUE, > INI_ERROR_MULTIPLE_EQUALS, > INI_ERROR_UNEXPECTED_LINE, > INI_ERROR_MULTIPLE_CONTINUATION_SYMBOLS, > INI_ERROR_CONTINUATION_SYMBOL_WITHIN_LINE, > INI_ERROR_HEADER_MISSING_NAME, > INI_ERROR_DEFINITION_MISSING_LEFT_SIDE, > INI_ERROR_DEFINITION_BEFORE_HEADER, > INI_ERROR_INVALID_PARAMETERS, > INI_ERROR_FOPEN_FAILED, > INI_ERROR_ALLOCATION_FAILED, >}; > >typedef struct _INI_PATH_VALUE_STR >{ > OSII_CHAR path[ 10240 ]; > OSII_CHAR value[ 10240 ]; > OSII_CHAR filename[ 256 ]; > OSII_INT32 file_line_nr; > >} INI_PATH_VALUE_STR; > >extern OSII_ALIST_HANDLE osii_ini_load( FILE *f, const char *filename, OSII_ALIST_HANDLE alist_to_add_to, OSII_INT32 *errorcode, OSII_INT32 *pline_number ); >extern OSII_ALIST_HANDLE osii_ini_load_file( const char *filename, OSII_ALIST_HANDLE alist_to_add_to, OSII_INT32 *errorcode, OSII_INT32 *pline_number ); >extern OSII_RETCODE osii_ini_write( OSII_ALIST_HANDLE alist, STREAM_HANDLE s ); ># 579 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef enum _destination_t { > log_disk = 1, log_syslog >} DESTINATION_T; > > > > >typedef struct _logger_opts_str { > OSII_INT32 Priority; > OSII_CHAR Category[100]; > OSII_CHAR Subcategory[100]; > OSII_CHAR ProcessName[128]; > OSII_CHAR Domain[128]; > OSII_BOOL SendNow; > OSII_INT32 rollover; >} LoggerOptions; ># 610 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >LoggerOptions * BuildOptions( OSII_INT32 p, const OSII_CHAR * cat, const OSII_CHAR * sc, const OSII_CHAR * proc, const OSII_CHAR * dom); >LoggerOptions * LoggerOptionsEquals( LoggerOptions * dest, LoggerOptions * src ); > > > >typedef struct _logger_message { > OSII_CHAR hostname[256]; > OSII_UINT64 pid; > OSII_CHAR processname[128]; > OSII_CHAR domain[128]; > > time_t mtime; > OSII_UINT32 mtime_ms; > > OSII_CHAR category[100]; > OSII_INT32 priority; > OSII_CHAR subcat[4][100]; > > OSII_CHAR message[1024]; > OSII_CHAR tags[1024]; > OSII_BOOL send_now; > > void (*setHostname)(struct _logger_message *, const char *); > void (*setProcessName)(struct _logger_message *, const char *); > void (*setDomain)(struct _logger_message *, const char *); > void (*setCategory)(struct _logger_message *, const char *); > void (*addSubcategory)(struct _logger_message *, const char *); > void (*removeSubcategory)(struct _logger_message *, const char *); > void (*setMessage)(struct _logger_message *, const char *); > void (*setTime)(struct _logger_message *, long); > void (*setPid)(struct _logger_message *, long); > void (*setPriority)(struct _logger_message *, OSII_INT32); > void (*addTag)(struct _logger_message *, const char *); > TAGCHUNK_HANDLE (*toPropertiesTagChunk)( struct _logger_message * msg ); > char * (*toTextArray)( struct _logger_message * msg ); > > void * _private_data; >} LoggerMessage; > >LoggerMessage * LoggerMessage_create_from_txt( LoggerOptions * opts, const OSII_CHAR * msg_in, ... ); >LoggerMessage * LoggerMessage_create_from_txt_va(LoggerOptions *, const OSII_CHAR *, va_list); >LoggerMessage * create_logger_message_from_properties( TAGCHUNK_HANDLE prop , LoggerOptions * def); >void LoggerMessage_destroy_internal ( LoggerMessage * lm ); > >extern char * message_properties[]; >extern OSII_UINT32 MESSAGE_PROPERTY_COUNT; > > > > >typedef struct _logger_str { > void * _private_data; > > OSII_BOOL (*Log)(struct _logger_str *, const OSII_CHAR *, ...); > OSII_BOOL (*LogMessage)(struct _logger_str *, LoggerMessage *); > > LoggerOptions * (*GetDefaultOptions)(struct _logger_str *); > OSII_RETCODE (*SetDefaultOptions)(struct _logger_str *, LoggerOptions *); > > OSII_RETCODE (*SetLogFileName)(struct _logger_str *, const OSII_CHAR *); > OSII_RETCODE (*SetBaseFileName)(struct _logger_str *, const OSII_CHAR *); > OSII_RETCODE (*SetLogFilePath)(struct _logger_str *, const OSII_CHAR *); > OSII_BOOL (*SetRolloverOptions)(struct _logger_str *, OSII_INT32, OSII_UINT32, OSII_UINT32); > > OSII_RETCODE (*SetServerMode)(struct _logger_str *, OSII_BOOL ); > OSII_BOOL (*GetServerMode)(struct _logger_str * ); > > OSII_RETCODE (*Test)(struct _logger_str * ); > > TAGCHUNK_HANDLE (*GetQueue)(struct _logger_str *); > TAGCHUNK_HANDLE (*Flush)(struct _logger_str *); > OSII_UINT32 (*GetCount)(struct _logger_str *); > >} LogFactory; > >LogFactory * LogFactory_create(LoggerOptions * opts ); ># 701 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >typedef struct _THREAD_MON_STR * THREAD_MON; > > >typedef struct _THREAD_MON_INFO_STR >{ > > OSII_CHAR name[ 127 ]; > > > OSII_BOOL ignore; > > > OSII_UINT32 timeout; > > > OSII_INT32 index; > > > OSII_THREAD os_id; > > > OSII_UINT32 frequency; > > > THREADPOOL_HANDLE pool; > > > THREAD_MON parent; > > > OSII_TIME_STR heartbeat; > > > OSII_TIME_STR last_heartbeat_enqueue; > >} THREAD_MON_INFO_STR; > > >typedef struct _THREAD_MON_STR >{ > > void *h; > > > OSII_UINT32 timeout; ># 756 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_INT32 (*register_thread)( THREAD_MON tm, const char* thread_name, OSII_UINT32 timeout ); ># 769 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_INT32 (*register_pool)( THREAD_MON tm, THREADPOOL_HANDLE pool, const char* pool_name, OSII_UINT32 timeout, OSII_UINT32 frequency ); ># 779 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*heartbeat)( THREAD_MON tm ); ># 791 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*heartbeat_thread)( THREAD_MON tm, const char* thread_name, OSII_INT32 index ); ># 804 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*ignore_thread)( THREAD_MON tm, const char* thread_name, OSII_INT32 index, OSII_BOOL ignore ); ># 817 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*ignore_thread_timed)( THREAD_MON tm, const char* thread_name, OSII_INT32 index, OSII_UINT32 ignore_time ); ># 828 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*is_healthy)( THREAD_MON tm, THREAD_MON_INFO_STR *info ); ># 840 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*is_thread_healthy)( THREAD_MON tm, const char* thread_name, OSII_INT32 index ); ># 853 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*get_thread_info)( THREAD_MON tm, const char* thread_name, OSII_INT32 index, THREAD_MON_INFO_STR *info ); ># 862 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_INT32 (*get_index)( THREAD_MON tm ); ># 872 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > THREAD_MON_INFO_STR *(*get_info)( THREAD_MON tm, OSII_UINT32 *count ); ># 884 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*unregister_thread)( THREAD_MON tm, const char* thread_name, OSII_INT32 index ); ># 896 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" > OSII_BOOL (*unregister_pool)( THREAD_MON tm, const char* pool_name, OSII_INT32 index ); > > > > > > > void (*destroy)( THREAD_MON tm ); > >} THREAD_MON_STR; ># 914 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern THREAD_MON osii_thread_mon_new( OSII_UINT32 timeout ); ># 925 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >extern THREAD_MON osii_thread_mon_new_ext( OSII_UINT32 timeout, OSII_BOOL reuse_indexes ); ># 936 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system_advanced.h" >OSII_RETCODE osii_gbl_mutex_init( const char *name, OSII_MUTEX **mutex ); ># 57 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" 1 ># 15 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >typedef void* STRINGMAP_HANDLE; > > >typedef void* STRINGMAP_ITER_HANDLE; ># 46 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern STRINGMAP_HANDLE osii_stringmap_init( NODE_HASH_FREE_FUNC destroy, void* d_user ); ># 66 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern STRINGMAP_HANDLE osii_stringmap_init_ext( OSII_UINT32 buckets, NODE_HASH_FUNC h, NODE_COMP_FUNC match, NODE_HASH_FREE_FUNC destroy, void *h_user, void *d_user, OSII_UINT32 flags ); > > > > > > >extern void osii_stringmap_destroy( STRINGMAP_HANDLE h ); ># 82 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_UINT32 osii_stringmap_count( STRINGMAP_HANDLE h ); ># 97 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_RETCODE osii_stringmap_insert( STRINGMAP_HANDLE h, const char* key, const void *data ); ># 111 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_RETCODE osii_stringmap_lookup( STRINGMAP_HANDLE h, const char* key, void** data ); ># 122 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern void osii_stringmap_single_free( void *user, void *key, void *data ); ># 133 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern void osii_stringmap_double_free( void *user, void *key, void *data ); ># 148 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_RETCODE osii_stringmap_remove( STRINGMAP_HANDLE h, const char* key, TABLE_ENTRY* entry ); ># 161 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_RETCODE osii_stringmap_delete( STRINGMAP_HANDLE h, const char* key ); ># 173 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern STRINGMAP_ITER_HANDLE osii_stringmap_iter( STRINGMAP_HANDLE h ); ># 188 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_cpp_system_container.h" >extern OSII_RETCODE osii_stringmap_iter_next( STRINGMAP_HANDLE h, STRINGMAP_ITER_HANDLE it_h, TABLE_ENTRY *info ); > > > > > > > >extern void osii_stringmap_iter_destroy( STRINGMAP_HANDLE h, STRINGMAP_ITER_HANDLE it_h ); ># 60 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_license.h" 1 > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_erc.h" 1 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 1 ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_erc.h" 2 ># 138 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_erc.h" >extern void *osii_erc_open( OSII_STRING file_name, OSII_RETCODE *ret ); >extern OSII_RETCODE osii_erc_get_option( void *handle, OSII_STRING category, OSII_STRING option, OSII_STRING value ); >extern OSII_RETCODE osii_erc_get_option_n( void *handle, OSII_STRING category, OSII_STRING option, OSII_STRING value, OSII_UINT32 valueSz ); >extern OSII_RETCODE osii_erc_close( void *handle ); >extern OSII_RETCODE osii_erc_iterate_options( void *handle, OSII_STRING category, OSII_STRING option, OSII_STRING value, OSII_BOOL first_time ); >extern void *osii_erc_open_write( OSII_STRING file_name, OSII_RETCODE *ret, OSII_UINT32 max_options ); >extern void *osii_erc_open_create( OSII_STRING file_name, OSII_RETCODE *ret, OSII_UINT32 max_options ); >extern void *osii_erc_open_create_legacy( OSII_STRING file_name, OSII_RETCODE *ret, OSII_UINT32 max_options ); >extern void *osii_erc_open_memory( OSII_POINTER ptr, OSII_INT32 size, OSII_RETCODE *ret ); >extern OSII_RETCODE osii_erc_get_header_option( void *handle, OSII_UINT32 option, void *value, OSII_UINT32 *size ); >extern OSII_RETCODE osii_erc_set_option( void *handle, OSII_STRING category, OSII_STRING option, OSII_STRING value ); >extern OSII_RETCODE osii_erc_set_header_option( void *handle, OSII_UINT32 option, void *value, OSII_UINT32 size ); >extern OSII_RETCODE osii_erc_flush( void *handle ); ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_license.h" 2 ># 139 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_license.h" > extern "C" { > > >extern LIC_HANDLE osii_license_open( OSII_RETCODE *ret ); >extern OSII_RETCODE osii_license_get_option( LIC_HANDLE handle, OSII_STRING category, OSII_STRING option, OSII_STRING value, OSII_BOOL *printable ); >extern OSII_RETCODE osii_license_get_computer_option( LIC_HANDLE handle, OSII_STRING computer, OSII_STRING option, OSII_STRING value ); >extern OSII_RETCODE osii_license_close( LIC_HANDLE h ); >extern OSII_BOOL osii_license_is_host_server(OSII_STRING computer); >extern OSII_BOOL osii_license_is_server(); > > > } ># 64 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 2 ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_messaging.h" 1 ># 58 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_messaging.h" >extern int Messaging_check_version_internal( const char *name, int arch, int major, int minor, int patch ); ># 15 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" 2 > > >extern "C" { ># 123 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >typedef void* OSIIMSG_HANDLE; > > >typedef struct _OSIIMSG_MESSAGE_STATUS_INFO >{ > > OSII_UINT32 sub_type; > > OSII_UINT32 status; > > OSII_UINT32 priority; > > OSII_UINT32 aux; > >} OSIIMSG_MESSAGE_STATUS_INFO; > >typedef struct _OSIIMSG_INIT_EXTRA_STR >{ > > OSII_INT32 max_client_queues; > > OSII_BOOL dont_load_shared; > > void (*stats_cb)( OSIIMSG_HANDLE msgh, TAGCHUNK_HANDLE container, void *ud ); > > void *stats_cb_ud; > > OSII_BOOL reuse_indexes; > >} OSIIMSG_INIT_EXTRA_STR; > >typedef struct _OSIIMSG_SSO_INFO_STR >{ > OSII_CHAR realm[ 127 ]; > OSII_UINT8 mode; > >} OSIIMSG_SSO_INFO_STR; ># 169 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >typedef struct _OSIIMSG_MESSAGE * OSIIMSG_MESSAGE_HANDLE; > > >typedef struct _OSIIMSG_DOMAIN_STR >{ > > OSII_CHAR domain[ 256 ]; > > > OSII_CHAR profile[ 256 ]; > >} OSIIMSG_DOMAIN_STR; > > >struct _OSIIMSG_MESSAGE >{ > > void *h; > > > > > > void (*destroy)( OSIIMSG_MESSAGE_HANDLE msg ); ># 204 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_data)( OSIIMSG_MESSAGE_HANDLE msg, const void *buf, size_t size ); ># 217 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_data_from_pb)(OSIIMSG_MESSAGE_HANDLE msg, PB_TYPE_MANAGER_HANDLE pb_type_mgr, > ProtobufCMessage *msg_buf, OSII_INT32 message_sub_type_id); ># 230 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_extra)( OSIIMSG_MESSAGE_HANDLE msg, const void *buf, size_t size ); ># 242 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_extra_parms)( OSIIMSG_MESSAGE_HANDLE msg, OSIIMSG_MESSAGE_HANDLE old_msg ); ># 252 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_from_node)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 262 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_from_prog)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 272 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_from_queue)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 283 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_priority)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 priority ); ># 293 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_aux)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 aux ); ># 303 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_status)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 status ); ># 313 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_sub_type)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 sub_type ); ># 323 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 333 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to_id)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT64 id ); ># 343 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to_node)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 353 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to_pid)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 pid ); ># 363 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to_prog)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 373 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_to_queue)( OSIIMSG_MESSAGE_HANDLE msg, const char *buf ); ># 383 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_type)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 type ); ># 392 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > size_t (*data_size)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > size_t (*extra_size)( OSIIMSG_MESSAGE_HANDLE msg ); ># 410 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*from)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT64 (*from_id)( OSIIMSG_MESSAGE_HANDLE msg ); ># 428 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*from_node)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*from_pid)( OSIIMSG_MESSAGE_HANDLE msg ); ># 446 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*from_prog)( OSIIMSG_MESSAGE_HANDLE msg ); ># 456 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*from_queue)( OSIIMSG_MESSAGE_HANDLE msg ); ># 466 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > size_t (*get_data)( OSIIMSG_MESSAGE_HANDLE msg, void *buf, size_t size ); ># 477 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > ProtobufCMessage *(*get_data_from_pb)(OSIIMSG_MESSAGE_HANDLE msg, PB_TYPE_MANAGER_HANDLE pb_type_mgr); ># 487 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > size_t (*get_extra)( OSIIMSG_MESSAGE_HANDLE msg, void *buf, size_t size ); ># 497 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*get_extra_parms)( OSIIMSG_MESSAGE_HANDLE msg, OSIIMSG_MESSAGE_STATUS_INFO *info ); > > > > > > > > OSIIMSG_HANDLE (*get_h)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*priority)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*aux)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*status)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*sub_type)( OSIIMSG_MESSAGE_HANDLE msg ); ># 547 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*to)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT64 (*to_id)( OSIIMSG_MESSAGE_HANDLE msg ); ># 565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*to_node)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*to_pid)( OSIIMSG_MESSAGE_HANDLE msg ); ># 583 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*to_prog)( OSIIMSG_MESSAGE_HANDLE msg ); ># 593 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_STRING (*to_queue)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > > OSII_UINT32 (*type)( OSIIMSG_MESSAGE_HANDLE msg ); > > > > > > > void (*inc_ref_count)( OSIIMSG_MESSAGE_HANDLE msg ); ># 617 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_UINT32 (*extra_flags)( OSIIMSG_MESSAGE_HANDLE msg ); ># 628 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*set_extra_flags)( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 extra_flags ); > >}; ># 639 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >typedef struct _OSIIMSG_MESSAGE_INFO >{ > > OSII_UINT32 send_queue_count; > > OSII_UINT32 sent_osii_stat; > > OSII_UINT64 sent_bytes_stat; > > OSII_UINT32 recv_osii_stat; > > OSII_UINT64 recv_bytes_stat; > > OSII_UINT32 send_retry_count; > > OSII_UINT32 recv_retry_count; > > OSII_UINT32 recv_num_threads; > > OSII_UINT32 recv_used_threads; > > OSII_UINT32 recv_queue_depth; > > OSII_UINT32 recv_queue_maximum; > > OSII_UINT32 send_queue_threshold; > > OSII_UINT32 send_queue_maximum; > > OSII_UINT32 send_queue_highest; > > OSII_UINT32 messaging_queues; > > OSII_UINT32 messaging_queues_max; > >} OSIIMSG_MESSAGE_INFO; > > > >typedef struct _OSIIMSGLOCAL_STR >{ > OSII_CHAR domain[ 256 ]; > TAGCHUNKMANAGER_HANDLE manager; > OSIIMSG_HANDLE msgc; > OSII_CHAR dest_program[ 256 ]; > OSII_UINT32 dest_pid; > OSII_CHAR dest_queue[ 256 ]; > OSII_UINT32 subtype; > OSII_UINT32 priority; > OSII_UINT32 timeout; > OSII_UINT64 id; > OSII_MUTEX id_mutex; > HASHTABLE_HANDLE id_hash; > HASHTABLE_HANDLE queue_hash; > OSII_BOOL initiated_connection; >} OSIIMSGLOCAL_STR; > >typedef struct _OSIIMSGLOCAL_STR * OSIIMSGLOCAL_HANDLE; > > >typedef void (*OSIIMSG_CALLBACK)( void *userdata, OSIIMSG_MESSAGE_HANDLE msg ); >typedef void (*OSIIMSG_BIN_CALLBACK)( void *userdata, OSIIMSG_MESSAGE_HANDLE msg, OSII_INT64 id, OSII_INT32 sub_type, size_t data_size, OSIIMSGLOCAL_HANDLE mh ); >typedef void (*OSIIMSG_TC_CALLBACK)( void *userdata, OSIIMSG_MESSAGE_HANDLE msg, OSII_INT64 id, TAGCHUNK_HANDLE chunk, OSIIMSGLOCAL_HANDLE mh ); > >typedef struct _OSIIMSGLOCAL_OPT_STR >{ > TAGCHUNKMANAGER_HANDLE manager; > OSIIMSG_HANDLE msgc; > OSII_CHAR dest_program[ 256 ]; > OSII_UINT32 dest_pid; > OSII_CHAR dest_queue[ 256 ]; > OSII_UINT32 subtype; > OSII_UINT32 priority; > OSII_UINT32 timeout; > OSII_INT32 num_threads; > OSIIMSG_CALLBACK def_bin_cb; > OSII_BOOL reuse_indexes; >} OSIIMSGLOCAL_OPT_STR; > >typedef struct _OSIIMSGLOCAL_OPT_STR * OSIIMSGLOCAL_OPT_HANDLE; ># 764 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >typedef struct _OSIIMSG_APPSCOM_STR >{ > > OSII_UINT32 sig; > > OSII_UINT16 command; > > OSII_UINT16 buf_len; > > OSII_INT32 pid; > > OSII_UINT32 plugin_id; > > OSII_CHAR com_buf [ 256 ]; > > OSII_CHAR domain [ 80 ]; > > OSII_CHAR node_name [ 80 ]; > > OSII_CHAR prog_name [ 80 ]; > > OSII_CHAR plugin_type[ 80 ]; > >} OSIIMSG_APPSCOM_STR; > > >typedef struct _OSIIMSG_APPSCOM_COMPONENTS* OSIIMSG_APPSCOM_HANDLE; > > > >typedef struct _OSIIMSG_APPSCOM_COMPONENTS >{ > > OSIIMSG_HANDLE msgc; > > TAGCHUNKMANAGER_HANDLE manager; > > OSII_UINT32 timeout; > > > > > > > void (*destroy)( OSIIMSG_APPSCOM_HANDLE h ); > > > > > > > OSII_RETCODE (*send)( OSIIMSG_APPSCOM_HANDLE h, OSIIMSG_APPSCOM_STR* a ); > > > > > > > > OSII_RETCODE (*send_msg_simple)( OSIIMSG_APPSCOM_HANDLE h, const char *format, ... ); ># 832 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*send_vmsg_simple)( OSIIMSG_APPSCOM_HANDLE h, const char *format, va_list args ); > > > > > > > > OSII_RETCODE (*send_msg)( OSIIMSG_APPSCOM_HANDLE h, OSIIMSG_APPSCOM_STR* a, const char *format, ... ); ># 849 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" > OSII_RETCODE (*send_vmsg)( OSIIMSG_APPSCOM_HANDLE h, OSIIMSG_APPSCOM_STR* a, const char *format, va_list args ); > >} OSIIMSG_APPSCOM_COMPONENTS; > >typedef enum >{ > OSII_AGENT_ALARM_STATUS_TYPE_NONE = 0, > OSII_AGENT_ALARM_STATUS_TYPE_RETURN_TO_NORMAL = 1, > OSII_AGENT_ALARM_STATUS_TYPE_ABNORMAL = 2 >} OSII_AGENT_ALARM_STATUS_TYPE_ENUM; > > >typedef struct _OSII_AGENT_ALARM_STR >{ > OSII_INT16 alarm_D; > OSII_INT16 alarm_O; > OSII_INT16 alarm_F; > OSII_UINT32 alarm_R; > OSII_UINT16 alarm_I; > OSII_UINT32 alarm_class; > OSII_BYTE aor_group; > OSII_CHAR station_name[ 64 ]; > OSII_INT32 station_number; > OSII_CHAR source[ 128 ]; > OSII_CHAR event[ 128 ]; > OSII_CHAR value_str[ 64 ]; > OSII_UINT64 alarm_time; > OSII_AGENT_ALARM_STATUS_TYPE_ENUM status_type; > OSII_CHAR identifier_string[ 256 ]; > >} OSII_AGENT_ALARM_STR, *OSII_AGENT_ALARM; ># 905 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_HANDLE osii_msg_init( OSII_BOOL agent, const OSII_CHAR *prog_name, const OSII_CHAR *domain, OSII_UINT32 thread_count, OSIIMSG_CALLBACK def_callback, void *user_data, void *extra ); ># 924 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_HANDLE osii_msg_init_ext( OSII_BOOL agent, const OSII_CHAR *prog_name, const OSII_CHAR *domain, OSII_UINT32 thread_count, OSIIMSG_CALLBACK def_callback, void *user_data, void *extra, OSIIMSG_INIT_EXTRA_STR *extra2 ); > > > > > >extern void osii_msg_destroy( OSIIMSG_HANDLE h ); ># 940 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_enable( OSIIMSG_HANDLE h, OSII_BOOL enable ); ># 950 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_enable_wait( OSIIMSG_HANDLE h, OSII_UINT32 timeout ); ># 962 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_add_queue( OSIIMSG_HANDLE h, const OSII_CHAR *queue, OSIIMSG_CALLBACK callback, void *user_data ); ># 973 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_add_callback( OSIIMSG_HANDLE h, const OSII_CHAR *queue, OSIIMSG_CALLBACK callback ); ># 984 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_get_domain( OSIIMSG_HANDLE h, OSII_STRING domain, size_t len ); ># 998 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_send( OSIIMSG_HANDLE h, OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT8 flags ); ># 1011 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_MESSAGE_HANDLE osii_msg_send_receive( OSIIMSG_HANDLE h, OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT8 flags, OSII_UINT32 timeout ); ># 1021 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_remove_queue( OSIIMSG_HANDLE h, const OSII_CHAR *queue ); ># 1041 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSGLOCAL_HANDLE osii_msg_local_init(const OSII_CHAR *domain, const OSII_CHAR *prog_name, OSIIMSGLOCAL_OPT_HANDLE options); ># 1055 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_change_opts(OSIIMSGLOCAL_HANDLE msg_handle, OSIIMSGLOCAL_OPT_HANDLE options); ># 1068 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSGLOCAL_OPT_HANDLE osii_msg_local_retrieve_opts(OSIIMSGLOCAL_HANDLE msg_handle, OSIIMSGLOCAL_OPT_HANDLE options); ># 1084 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_destroy(OSIIMSGLOCAL_HANDLE msg_handle); ># 1097 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_tc_send_easy(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc); ># 1114 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >TAGCHUNK_HANDLE osii_msg_local_tc_send_receive_easy(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT64 *out_id); ># 1128 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_tc_reply_easy(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT64 out_id ); ># 1146 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >TAGCHUNK_HANDLE osii_msg_local_tc_reply_receive_easy(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT64 id, OSII_UINT64 *out_id); ># 1166 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_tc_send(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, const OSII_CHAR *dest_program, OSII_INT32 dest_pid, const OSII_CHAR *dest_queue, OSII_UINT32 priority ); ># 1191 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >TAGCHUNK_HANDLE osii_msg_local_tc_send_receive(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT32 timeout, const OSII_CHAR *dest_program, OSII_INT32 dest_pid, const OSII_CHAR *dest_queue, OSII_UINT32 priority, OSII_UINT64 *out_id); ># 1204 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_tc_reply(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT32 priority, OSII_UINT64 id ); ># 1223 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >TAGCHUNK_HANDLE osii_msg_local_tc_reply_receive(OSIIMSGLOCAL_HANDLE msg_handle, TAGCHUNK_HANDLE tc, OSII_UINT32 timeout, OSII_UINT64 reply_to_id, OSII_UINT32 priority, OSII_UINT64 *out_id); ># 1237 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_bin_send_easy(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size); ># 1254 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSG_MESSAGE_HANDLE osii_msg_local_bin_send_receive_easy(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data , size_t data_size, OSII_UINT64 *out_id); ># 1269 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_bin_reply_easy(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT64 reply_to_id ); ># 1287 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSG_MESSAGE_HANDLE osii_msg_local_bin_reply_receive_easy(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT64 reply_to_id, OSII_UINT64 *out_id); ># 1308 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_bin_send(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT32 subtype, const OSII_CHAR *dest_program, OSII_INT32 dest_pid, const OSII_CHAR *dest_queue, OSII_UINT32 priority ); ># 1335 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSG_MESSAGE_HANDLE osii_msg_local_bin_send_receive(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT32 subtype, OSII_UINT32 timeout, const OSII_CHAR *dest_program, OSII_INT32 dest_pid, const OSII_CHAR *dest_queue, OSII_UINT32 priority, OSII_UINT64 *out_id); ># 1351 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_bin_reply(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT32 subtype, OSII_UINT32 priority, OSII_UINT64 reply_to_id ); ># 1372 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSIIMSG_MESSAGE_HANDLE osii_msg_local_bin_reply_receive(OSIIMSGLOCAL_HANDLE msg_handle, void *send_data, size_t data_size, OSII_UINT32 subtype, OSII_UINT32 timeout, OSII_UINT32 priority, OSII_UINT64 reply_to_id, OSII_UINT64 *out_id); ># 1394 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_tc_id_cleanup(OSIIMSGLOCAL_HANDLE msg_handle, OSII_UINT64 id); ># 1410 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_add_bin_cb(OSIIMSGLOCAL_HANDLE msg_handle, const OSII_CHAR *queue, OSIIMSG_BIN_CALLBACK callback, void *user_data); ># 1426 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_add_tc_cb(OSIIMSGLOCAL_HANDLE msg_handle, const OSII_CHAR *queue, OSIIMSG_TC_CALLBACK callback, void *user_data); ># 1438 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_remove_bin_cb(OSIIMSGLOCAL_HANDLE msg_handle, const OSII_CHAR *queue); ># 1450 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >OSII_RETCODE osii_msg_local_remove_tc_cb(OSIIMSGLOCAL_HANDLE msg_handle, const OSII_CHAR *queue); ># 1464 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_MESSAGE_HANDLE osii_msg_message_new( OSIIMSG_HANDLE h, OSIIMSG_MESSAGE_HANDLE replyto ); ># 1480 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern LOGGER_HANDLE osii_msg_debug_logger_get( OSIIMSG_HANDLE h ); ># 1489 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_STRING osii_msg_get_default_domain( OSII_STRING buf, size_t len ); > > > > > > > >extern void *osii_msg_get_domain_xml( const OSII_CHAR *domain ); ># 1507 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_DOMAIN_STR *osii_msg_get_domains( OSII_INT32 *n ); ># 1517 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_get_info( OSIIMSG_HANDLE h, OSIIMSG_MESSAGE_INFO *info ); ># 1530 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_parse_address( const char *addr, OSII_STRING node, OSII_STRING prog, OSII_UINT32 *pid, OSII_STRING queue ); >extern OSII_RETCODE osii_msg_parse( const char *addr, OSII_STRING node, size_t nlen, OSII_STRING prog, size_t plen, OSII_UINT32 *pid, OSII_STRING queue, size_t qlen ); ># 1546 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_STRING osii_msg_build_url( OSIIMSG_HANDLE h, const OSII_CHAR *queue, OSII_STRING buf, size_t len ); ># 1555 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_UINT8 osii_msg_debug_get_mode( OSIIMSG_HANDLE h ); ># 1565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern int osii_msg_debug_printf( OSIIMSG_HANDLE h, const char *format, ... ); ># 1575 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern int osii_msg_debug_vprintf( OSIIMSG_HANDLE h, const char *format, va_list marker ); ># 1586 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern void osii_msg_debug_set_mode( OSIIMSG_HANDLE h, OSII_UINT8 flags ); ># 1600 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_BOOL osii_msg_server_online( OSIIMSG_HANDLE h ); >extern OSII_BOOL osii_msg_server_online_alt( OSIIMSG_HANDLE h, const char *str ); >extern OSII_BOOL osii_msg_server_failover_info( OSIIMSG_HANDLE h, OSII_STRING buf, size_t len ); > > > > > > >extern OSII_INT8 osii_msg_server_state( OSIIMSG_HANDLE h ); ># 1622 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_get_enabled_domain( OSIIMSG_HANDLE h, OSII_STRING buf, size_t sz ) ; >extern OSII_BOOL osii_msg_get_enabled_domain_configured( OSIIMSG_HANDLE h ) ; >extern OSII_RETCODE osii_msg_get_enabled_domain_init( OSIIMSG_HANDLE h ) ; ># 1639 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_BOOL osii_msg_server_heartbeat( OSIIMSG_HANDLE h ); ># 1655 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_BOOL osii_msg_server_alarm_send( OSIIMSG_HANDLE h, OSII_AGENT_ALARM alarm ); ># 1671 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_BOOL osii_msg_server_heartbeat_alt( OSIIMSG_HANDLE h, const char *str ); >extern OSII_BOOL osii_msg_server_heartbeat_info( OSIIMSG_HANDLE h, OSII_STRING buf, size_t len ); ># 1681 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSIIMSG_APPSCOM_HANDLE osii_msg_appscom_create( OSIIMSG_HANDLE msgc ); >extern OSII_RETCODE osii_msg_appscom_send_slow_msg_simple( OSIIMSG_HANDLE msgc, OSII_UINT32 timeout, const char* format, ... ); >extern OSII_RETCODE osii_msg_appscom_send_slow_msg( OSIIMSG_HANDLE msgc, OSII_UINT32 timeout, OSIIMSG_APPSCOM_STR* a, const char* format, ... ); >extern OSII_RETCODE osii_msg_appscom_send_slow( OSIIMSG_HANDLE msgc, OSII_UINT32 timeout, OSIIMSG_APPSCOM_STR* a ); > > > > > > > >extern OSII_BOOL osii_msg_timed_block( OSIIMSG_HANDLE msgc, OSII_UINT32 msec_duration ); ># 1701 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_BOOL osii_msg_is_timed_blocked( OSIIMSG_HANDLE msgc ); ># 1710 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern PROC_FOLDERS osii_msg_get_folders( OSIIMSG_HANDLE msgc ); ># 1720 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern PROC_FOLDERS osii_msg_get_folders_by_domain( const OSII_CHAR *domainName ); ># 1730 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_LIST_STR *osii_msg_get_local_failover_aliases( OSIIMSG_HANDLE msgc ); > >extern OSII_BOOL osii_msg_get_sso_info( OSIIMSG_HANDLE h, OSIIMSG_SSO_INFO_STR *info ); ># 1741 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern THREAD_MON osii_msg_get_thread_mon( OSIIMSG_HANDLE msgc ); ># 1750 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern void osii_msg_server_heartbeat_config( OSIIMSG_HANDLE msgc, OSII_UINT32 flags ); ># 1763 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_INT32 osii_msg_thread_create( OSIIMSG_HANDLE msgc, void ( *thread_function )( void* ), void* arguments, OSII_UINT32 heartbeat_timeout, const char *name ); ># 1785 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern THREADPOOL_HANDLE osii_msg_threadpool_init( OSIIMSG_HANDLE msgc, OSII_UINT32 initial_threads, OSII_UINT32 max_threads, const char *name, QUEUE_HANDLE queue, OSII_RETCODE *ret, OSII_UINT32 timeout, OSII_UINT32 frequency ); ># 1795 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_messaging.h" >extern OSII_RETCODE osii_msg_threadpool_destroy( OSIIMSG_HANDLE msgc, THREADPOOL_HANDLE tpool, const char *name ); > > > >typedef struct _OSIIMSG_RUNNING_STR >{ > char *path; > char domain[ 256 ]; > > void (*hb)( void *running ); > >} OSIIMSG_RUNNING_STR; > >extern OSII_BOOL osii_msg_is_running( const char *domain, const char *prog, OSII_UINT32 *pid ); >extern OSII_BOOL osii_msg_running_remove( OSIIMSG_RUNNING_STR *running ); >extern OSII_BOOL osii_msg_running_init( const char *domain, const char *prog, OSIIMSG_RUNNING_STR *running ); >extern OSII_BOOL osii_msg_invoke_messaging( const char *domain, OSII_UINT32 *apid, OSII_UINT32 *mpid ); >extern OSII_BOOL osii_msg_keep_self_only( const char *domain, const char *prog ); >extern OSII_BOOL osii_msg_is_connected( OSIIMSG_HANDLE h ); >extern void osii_msg_set_requeue_mode( OSIIMSG_HANDLE h, OSII_BOOL mode ); >extern void osii_msg_deadlock_test( OSIIMSG_HANDLE h ); > > >typedef struct >{ > OSII_UINT64 connect_time; > OSII_UINT32 q_count[ 11 ]; > OSII_UINT32 q_total_out_count[ 11 ]; > OSII_UINT64 q_total_out_size[ 11 ]; > OSII_UINT32 q_total_count[ 11 ]; > OSII_UINT64 q_total_size[ 11 ]; > OSII_UINT32 recv_count; > OSII_UINT32 send_count; > OSII_UINT32 pid; > OSII_UINT32 rejected_to_count; > OSII_UINT32 max_rejected_to_count; > OSII_UINT32 total_rejected_to_count; > OSII_UINT32 rejected_sent_count; > OSII_UINT32 max_rejected_sent_count; > OSII_UINT32 total_rejected_sent_count; > OSII_UINT32 rejected_for_count; > OSII_UINT32 max_rejected_for_count; > OSII_UINT32 total_rejected_for_count; > OSII_CHAR name[ 256 ]; > >} OSII_AGENT_PROCESSES_STR; > >extern TAGCHUNK_HANDLE osii_msg_process_ds( OSIIMSG_MESSAGE_HANDLE msg ); >extern OSIIMSG_MESSAGE_HANDLE osii_msg_build_ds_request( OSIIMSG_HANDLE h, const OSII_CHAR *server, OSII_UINT32 priority ); >extern TAGCHUNK_HANDLE osii_msg_get_ds( OSIIMSG_HANDLE h, const OSII_CHAR *server, OSII_UINT32 priority, OSII_UINT32 timeout ); >extern TAGCHUNK_HANDLE osii_msg_process_process_stats( OSIIMSG_MESSAGE_HANDLE msg ); >extern OSIIMSG_MESSAGE_HANDLE osii_msg_build_process_stats_request( OSIIMSG_HANDLE h, const OSII_CHAR *server, const OSII_CHAR *process, OSII_UINT32 pid, OSII_UINT32 priority ); >extern TAGCHUNK_HANDLE osii_msg_get_process_stats( OSIIMSG_HANDLE h, const OSII_CHAR *server, const OSII_CHAR *process, OSII_UINT32 pid, OSII_UINT32 priority, OSII_UINT32 timeout ); > > > > > >} ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_common.h" 1 > > > > > > >typedef struct _SARC_SERVICE_PROVIDER_STR * SARC_SERVICE_PROVIDER; > > >typedef void * SARC_HANDLE; ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" 1 ># 18 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" >typedef struct _SARC_THIN_CLIENT_STR* SARC_THIN_CLIENT; > >typedef struct _SARC_THIN_RESULT_STR* SARC_THIN_RESULT; > >typedef struct _SARC_THIN_META_STR* SARC_THIN_META; > >typedef struct _SARC_THIN_CLIENT_STR >{ > > void* h; ># 36 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" > OSII_BOOL( *wait )( SARC_THIN_CLIENT thin, int timeout ); > > > > > > > > SARC_THIN_META( *meta )( SARC_THIN_CLIENT thin ); ># 58 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" > OSII_RETCODE( *send_string_command )( SARC_THIN_CLIENT thin, const OSII_CHAR* command, const OSII_CHAR* body, void( *callback )( SARC_THIN_RESULT result ), void* user_data, int timeout, OSII_INT64* out_request_id ); ># 73 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" > OSII_RETCODE( *send_chunk_command )( SARC_THIN_CLIENT thin, const OSII_CHAR* command, TAGCHUNK_HANDLE chunk, void( *callback )( SARC_THIN_RESULT result ), void* user_data, int timeout, OSII_INT64* out_request_id ); ># 85 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" > OSII_RETCODE( *unregister_callback )( SARC_THIN_CLIENT thin, OSII_INT64 request_id, void** out_user_data ); ># 95 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" > OSII_RETCODE( *send_raw_chunk )( SARC_THIN_CLIENT thin, TAGCHUNK_HANDLE chunk ); > > > > > > void( *unsolicited_callback )( TAGCHUNK_HANDLE chunk ); > > > > > SARC_SERVICE_PROVIDER( *sarc_service )( SARC_THIN_CLIENT thin ); > > > > > > void( *destroy )( SARC_THIN_CLIENT thin ); > >} SARC_THIN_CLIENT_STR; > >typedef struct _SARC_THIN_RESULT_STR >{ > > OSII_RETCODE ret_code; > > > OSII_INT64 request_id; > > > OSII_BOOL done; > > > > > > TAGCHUNK_HANDLE chunk; > > > void* user_data; > >} SARC_THIN_RESULT_STR; > >typedef struct _SARC_THIN_META_STR >{ > > void* h; > > > > > > > OSII_STRING* supported_commands; > > > OSII_UINT32 num_supported_commands; > > > > > > > OSII_INT32 negotiated_version_index; > > > > > > void( *destroy )( SARC_THIN_META m ); > >} SARC_THIN_META_STR; > > > > > >typedef struct _SARC_THIN_CLIENT_OPTS >{ > > int messaging_priority; > > > OSII_CHAR server_command[ 1024 ]; > > > OSII_UINT32 timeout_scan_periods; > > > OSII_BOOL do_not_discard_expired; > > > > > > OSII_STRING *supported_client_versions; > > > OSII_UINT32 num_supported_client_versions; > > > TAGCHUNKMANAGER_HANDLE manager; > > > > > > > > THREADPOOL_HANDLE tpool; > >} SARC_THIN_CLIENT_OPTS; ># 216 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_client.h" >extern SARC_THIN_CLIENT osii_sarc_thin_client_init( SARC_HANDLE sarc, OSII_UINT32 user_ref, const OSII_CHAR* service, SARC_THIN_CLIENT_OPTS* options ); ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc_thin_protocol.h" 1 ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" 2 ># 128 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef void (*SARC_LOGIN_CALLBACK)( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT32 flags, void* user_data ); ># 137 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef void (*SARC_REBIND_FAIL_CALLBACK)( SARC_HANDLE h, const char *service_name, void* user_data ); ># 148 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef void (*SARC_CALLBACK)( SARC_HANDLE h, OSIIMSG_MESSAGE_HANDLE msgh, OSII_UINT32 conn_ref, void* user_data ); ># 157 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef void (*SARC_STATS_CALLBACK)( SARC_HANDLE h, TAGCHUNK_HANDLE container, void* user_data ); > > >typedef struct _SARC_INIT_EXTRA_STR >{ > > OSII_UINT32 thread_count; > > OSII_UINT32 conn_timeout; > > LOGGER_HANDLE logger; > > void *extra; > > OSII_UINT32 num_conns; > > OSII_BOOL dont_load_shared; > > OSII_UINT32 num_binds; > > SARC_STATS_CALLBACK stats_cb; > > void *stats_cb_ud; > > OSII_BOOL reuse_indexes; > > OSII_UINT32 num_logins; >} SARC_INIT_EXTRA_STR; > > >typedef struct _SARC_BIND_EXTRA_STR >{ > > SARC_REBIND_FAIL_CALLBACK rf_cb; > > void *rf_ud; > > OSII_STRING *adaptor_versions; > > OSII_UINT32 num_adaptor_versions; > > SARC_CALLBACK sl_cb; > > void *sl_ud; > >} SARC_BIND_EXTRA_STR; > > >typedef struct _SARC_CONN_INFO_STR >{ > > OSII_CHAR username[ 128 ]; > > OSII_CHAR address[ 256 ]; > > OSII_CHAR service_name[ 128 ]; > >} SARC_CONN_INFO_STR; > > >typedef struct _SARC_SERVICE_STR >{ > > OSII_CHAR service_name[ 128 ]; > > size_t public_key_len; > > OSII_BYTE public_key[ 256 ]; > > OSII_CHAR address[ 256 ]; > > OSII_UINT32 flags; > > OSII_CHAR spares[ 3 ]; > > OSII_LIST_STR supported_versions; > >} SARC_SERVICE_STR; > > >typedef struct _SARC_SERVICE_NAME_STR >{ > > OSII_CHAR service_name[ 128 ]; > >} SARC_SERVICE_NAME_STR; ># 265 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef struct _SARC_ENABLED_SITE_STR >{ > > OSII_INT32 type; > > OSII_INT64 time; > > OSII_CHAR domain[ 256 ]; > >} SARC_ENABLED_SITE_STR; ># 284 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef OSII_RETCODE (*SARC_DOMAIN_CALLBACK)( SARC_HANDLE s, OSII_BOOL complete, OSII_STRING domain ); > > > > > > > >extern OSII_RETCODE osii_sarc_register_domain_callback( SARC_HANDLE s, SARC_DOMAIN_CALLBACK dom_callback ); > > > > > > > >extern OSII_RETCODE osii_sarc_parse_enabled_service( SARC_SERVICE_STR *service, SARC_ENABLED_SITE_STR *info ); > > > > > > >extern OSII_RETCODE osii_sarc_site_status_send( SARC_HANDLE h, SARC_ENABLED_SITE_STR * info ); ># 328 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef struct _SARC_SERVICE_FACTORY_STR * SARC_SERVICE_FACTORY; >typedef struct _SARC_SERVICE_PROVIDER_INIT_STR * SARC_SERVICE_PROVIDER_INIT; > > >typedef void (*SARC_STATE_CHANGE_CALLBACK)( void *ud, SARC_SERVICE_PROVIDER ss, int state ); > >typedef SARC_SERVICE_PROVIDER (*SARC_SERVICE_PROVIDER_CREATOR)( void *ud, const char *create_string, SARC_SERVICE_PROVIDER_INIT init ); > > >typedef struct _SARC_SERVICE_PROVIDER_INIT_STR >{ > > SARC_HANDLE sarc; > > OSII_UINT32 user_ref; > > THREADPOOL_HANDLE tpool; > > TAGCHUNKMANAGER_HANDLE manager; > > PB_TYPE_MANAGER_HANDLE pb_type_manager; > > OSII_INT32 set_state_prio; > > OSII_INT32 data_prio; > > OSII_BOOL single_threaded_callback; ># 367 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > void (*chunk_callback)( void *ud, TAGCHUNK_HANDLE tc, OSII_INT64 id ); ># 377 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > void (*unknown_callback)( void *ud, OSIIMSG_MESSAGE_HANDLE msg ); ># 386 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > int (*state_change)( void *ud, int state ); > > > > > > void (*destroy_cb)( void *ud ); > > > > > void (*chunk_callback_with_statusmsg)( void *ud, TAGCHUNK_HANDLE tc, OSIIMSG_MESSAGE_HANDLE statusmsg ); > >} SARC_SERVICE_PROVIDER_INIT_STR; ># 410 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >typedef struct _SARC_SERVICE_PROVIDER_STR >{ > > void *h; > > void *ud; > > OSII_BOOL no_reconn; > > OSII_CHAR service_name[ 128 ]; > > OSII_CHAR create_string[ 128 ]; > > SARC_SERVICE_FACTORY parent; ># 435 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > int (*state)( SARC_SERVICE_PROVIDER ss ); > > > > > > > void (*set_state)( SARC_SERVICE_PROVIDER ss, int state ); ># 452 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > OSII_BOOL (*wait)( SARC_SERVICE_PROVIDER ss, int state, int timeout ); ># 464 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > int (*register_cb)( SARC_SERVICE_PROVIDER ss, SARC_STATE_CHANGE_CALLBACK cb, void *userdata ); ># 474 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > OSII_RETCODE (*unregister_cb)( SARC_SERVICE_PROVIDER ss, int id ); > > > > > > OSII_UINT32 (*user_reference)( SARC_SERVICE_PROVIDER ss ); > > > > > > SARC_HANDLE (*sarc)( SARC_SERVICE_PROVIDER ss ); > > > > > > > > OSII_UINT32 (*conn_ref)( SARC_SERVICE_PROVIDER ss ); ># 507 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > OSII_RETCODE (*send)( SARC_SERVICE_PROVIDER ss, TAGCHUNK_HANDLE tc, OSII_UINT32 priority ); ># 521 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > OSII_RETCODE (*send_reply)( SARC_SERVICE_PROVIDER ss, TAGCHUNK_HANDLE tc, OSII_UINT32 priority, OSII_INT64 id ); ># 532 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > TAGCHUNK_HANDLE (*send_receive)( SARC_SERVICE_PROVIDER ss, TAGCHUNK_HANDLE tc, OSII_UINT32 priority, OSII_UINT32 timeout ); > > > > > > void (*start)( SARC_SERVICE_PROVIDER ss ); > > > > > > void (*stop)( SARC_SERVICE_PROVIDER ss ); > > > > > > > > void (*disconnect)( SARC_SERVICE_PROVIDER ss, OSII_BOOL full); > > > > > > > void (*destroy)( SARC_SERVICE_PROVIDER ss ); > > > > > > > OSII_BOOL (*is_joined)( SARC_SERVICE_PROVIDER ss ); > > > > > > > SARC_SERVICE_PROVIDER (*get_child)( SARC_SERVICE_PROVIDER ss, OSII_STRING child_name ); > > > > > > > void (*join)( SARC_SERVICE_PROVIDER ss, SARC_SERVICE_PROVIDER parent ); > > > > > > void (*split)( SARC_SERVICE_PROVIDER ss ); > >} SARC_SERVICE_PROVIDER_STR; > > > > > > >typedef struct _SARC_SERVICE_FACTORY_STR >{ > > void *h; > > void *ud; > > > > > > > > SARC_SERVICE_PROVIDER (*get_service)( SARC_SERVICE_FACTORY sf, const char *name ); ># 620 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > OSII_BOOL (*create_nb)( SARC_SERVICE_FACTORY sf, const char *create_string, OSII_UINT32 timeout, void (*callback)( void *userdata, SARC_SERVICE_PROVIDER ), void *userdata ); ># 630 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > SARC_SERVICE_PROVIDER (*create)( SARC_SERVICE_FACTORY sf, const char *create_string, OSII_UINT32 timeout ); > > > > > > > > OSII_BOOL (*remove)( SARC_SERVICE_FACTORY sf, const char *name, SARC_SERVICE_PROVIDER *out ); > > > > > > > void (*destroy)( SARC_SERVICE_FACTORY sf ); > > HASHTABLE_ITER_HANDLE (*start_iter)( SARC_SERVICE_FACTORY sf ); > OSII_RETCODE (*iter_next)( SARC_SERVICE_FACTORY sf, HASHTABLE_ITER_HANDLE iter, TABLE_ENTRY *info ); > void (*end_iter)( SARC_SERVICE_FACTORY sf, HASHTABLE_ITER_HANDLE iter ); > > OSII_BOOL (*unregister_cb)( SARC_SERVICE_FACTORY sf, const char *create_string, void (*callback)( void *userdata, SARC_SERVICE_PROVIDER ), void *userdata ); > >} SARC_SERVICE_FACTORY_STR; ># 666 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_SERVICE_PROVIDER osii_sarc_service_provider_init( const char* service_name, SARC_SERVICE_PROVIDER_INIT_STR *init, void *ud, OSII_UINT32 flags ); ># 678 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" > SARC_SERVICE_PROVIDER osii_sarc_service_provider_init_versioned( const char* service_name, SARC_SERVICE_PROVIDER_INIT_STR *init, void *ud, > OSII_UINT32 flags, OSII_STRING *supported_user_versions, OSII_UINT32 num_supported_user_versions ); ># 690 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_SERVICE_FACTORY osii_sarc_service_factory_init( SARC_SERVICE_PROVIDER_CREATOR creator, SARC_SERVICE_PROVIDER_INIT init, void *ud, OSII_UINT32 flags ); ># 740 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_flags( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, > void *ud, SARC_LOGIN_CALLBACK login_cb, void *login_ud, OSII_UINT32 flags); ># 771 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_ext( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, void *ud, > SARC_LOGIN_CALLBACK login_cb, void *login_ud, SARC_REBIND_FAIL_CALLBACK rf_cb, void *rf_ud, OSII_UINT32 flags ); ># 800 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_str( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, > void *ud, SARC_LOGIN_CALLBACK login_cb, void *login_ud, OSII_UINT32 flags, SARC_BIND_EXTRA_STR *extra ); ># 826 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_flags_ext( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, > void *ud, SARC_LOGIN_CALLBACK login_cb, void *login_ud, SARC_REBIND_FAIL_CALLBACK rf_cb, void *rf_ud, OSII_UINT32 flags); ># 853 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_flags_versioned( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, > void *ud, SARC_LOGIN_CALLBACK login_cb, void *login_ud, OSII_UINT32 flags, OSII_STRING *adaptor_versions, OSII_UINT32 num_adaptor_versions); ># 882 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_bind_flags_versioned_ext( SARC_HANDLE h, const OSII_CHAR *service_name, const OSII_CHAR *queue, SARC_CALLBACK data_cb, > void *ud, SARC_LOGIN_CALLBACK login_cb, void *login_ud, SARC_REBIND_FAIL_CALLBACK rf_cb, void *rf_ud, OSII_UINT32 flags, OSII_STRING *adaptor_versions, OSII_UINT32 num_adaptor_versions); ># 930 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_connect_flags( SARC_HANDLE h, OSII_UINT32 user_ref, const char *service_name, SARC_CALLBACK data_cb, void *data_ud, SARC_LOGIN_CALLBACK login_cb, > void *login_ud, OSII_UINT32 *conn_ref, OSII_UINT32 timeout, OSII_UINT32 flags ); ># 955 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_connect_flags_versioned( SARC_HANDLE h, OSII_UINT32 user_ref, const char *service_name, SARC_CALLBACK data_cb, void *data_ud, SARC_LOGIN_CALLBACK login_cb, > void *login_ud, OSII_UINT32 *conn_ref, OSII_UINT32 timeout, OSII_UINT32 flags, OSII_STRING *supported_client_versions, OSII_UINT32 num_supported_client_versions ); > > > > > >extern void osii_sarc_destroy( SARC_HANDLE h ); ># 972 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_disconnect( SARC_HANDLE h, OSII_UINT32 conn_ref ); ># 981 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_SERVICE_NAME_STR *osii_sarc_get_binds( SARC_HANDLE h, OSII_UINT32 *count ); ># 992 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_get_conn_info( SARC_HANDLE h, OSII_UINT32 conn_ref, SARC_CONN_INFO_STR *info ); ># 1004 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_get_message_info( OSIIMSG_MESSAGE_HANDLE msg, OSII_UINT32 *type, OSII_UINT32 *sub_type, size_t *data_size ); > > > > > > > >extern OSIIMSG_HANDLE osii_sarc_get_msgc( SARC_HANDLE h ); ># 1022 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_SERVICE_STR *osii_sarc_get_service_info( SARC_HANDLE h, const OSII_CHAR *service_name, OSII_UINT32 *count ); ># 1031 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_SERVICE_NAME_STR *osii_sarc_get_service_names( SARC_HANDLE h, OSII_UINT32 *count ); ># 1043 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_INT32 osii_sarc_get_chosen_user_version(SARC_HANDLE h, OSII_UINT32 conn_ref); ># 1053 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern PERIODIC_THREAD_HANDLE osii_sarc_get_thread( SARC_HANDLE sarc ); ># 1065 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_get_user_info( SARC_HANDLE h, OSII_UINT32 user_ref, OSII_STRING username, size_t len ); ># 1074 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_HANDLE osii_sarc_init( const OSII_CHAR *domain, OSIIMSG_CALLBACK def_callback, void *def_user_data, SARC_INIT_EXTRA_STR *extra ); ># 1086 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern SARC_HANDLE osii_sarc_init_timed( const OSII_CHAR *domain, OSIIMSG_CALLBACK def_callback, void *def_user_data, OSII_UINT32 timeout, SARC_INIT_EXTRA_STR *extra ); ># 1100 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_login( SARC_HANDLE h, const OSII_CHAR *username, const OSII_CHAR *password, OSII_UINT32 *user_ref ); ># 1115 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_login_with_cb( SARC_HANDLE h, const OSII_CHAR *username, const OSII_CHAR *password, OSII_UINT32 *user_ref, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1132 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_login_with_type( SARC_HANDLE h, const OSII_CHAR *username, const OSII_CHAR *password, OSII_UINT32 *user_ref, const OSII_CHAR *type, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1148 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_login_with_session_name( SARC_HANDLE h, const OSII_CHAR *username, const OSII_CHAR *password, OSII_UINT32 *user_ref, const OSII_CHAR *session_name, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1159 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_sso_login( SARC_HANDLE h, OSII_UINT32 *user_ref ); ># 1173 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_sso_login_with_cb( SARC_HANDLE h, OSII_UINT32 *user_ref, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1188 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_sso_login_with_type( SARC_HANDLE h, OSII_UINT32 *user_ref, const OSII_CHAR *type, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1204 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >OSII_RETCODE osii_sarc_sso_login_with_session_name( SARC_HANDLE h, OSII_UINT32 *user_ref, const OSII_CHAR *type, const OSII_CHAR *session_name, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1215 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_logout( SARC_HANDLE h, OSII_UINT32 user_ref ); ># 1226 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >OSII_RETCODE osii_sarc_verify_password( SARC_HANDLE h, const OSII_CHAR *username, const OSII_CHAR *password ); ># 1239 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_program_login( SARC_HANDLE h, OSII_UINT32 *user_ref ); ># 1252 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_program_login_with_cb( SARC_HANDLE h, OSII_UINT32 *user_ref, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1266 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_program_login_with_type( SARC_HANDLE h, OSII_UINT32 *user_ref, const OSII_CHAR *type, void (*callback)( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1279 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_fake_login( SARC_HANDLE h, const OSII_CHAR *username, OSII_UINT32 *user_ref, void( *callback )( void *ud, OSII_UINT32 userRef ), void *ud ); ># 1292 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_reinit( SARC_HANDLE h, OSII_UINT32 user_ref, const char *service_name, OSII_UINT32 timeout ); ># 1304 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_set_pkcrypt_key( SARC_HANDLE h, OSII_BYTE *key_buf, size_t key_len ); ># 1314 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_unbind( SARC_HANDLE h, const OSII_CHAR *service_name ); > > > > > > > >extern void osii_sarc_unregister_ud( SARC_HANDLE h, void *ud ); > > > > > > > >extern void osii_sarc_set_logger( SARC_HANDLE h, LOGGER_HANDLE logger ); ># 1339 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_UINT32 osii_sarc_get_max_conns ( SARC_HANDLE h ); ># 1352 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern char *osii_sarc_get_mcp_info( SARC_HANDLE h, OSII_UINT32 user_ref, OSII_UINT32 priority, OSII_UINT32 timeout ); > > > > > > > >extern void osii_sarc_deadlock_test( SARC_HANDLE h ); ># 1370 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_STRING osii_sarc_get_enabled_domain( SARC_HANDLE h ); ># 1398 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_send( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags ); ># 1416 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_send_id_reply( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT64 id, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags ); ># 1431 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSIIMSG_MESSAGE_HANDLE osii_sarc_send_receive( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags, OSII_UINT32 timeout ); ># 1449 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSIIMSG_MESSAGE_HANDLE osii_sarc_send_receive_id_reply( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT64 id, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags, OSII_UINT32 timeout ); ># 1466 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSIIMSG_MESSAGE_HANDLE osii_sarc_send_receive_reply( SARC_HANDLE h, OSIIMSG_MESSAGE_HANDLE omsg, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags, OSII_UINT32 timeout ); ># 1480 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSIIMSG_MESSAGE_HANDLE osii_sarc_send_receive_sl( SARC_HANDLE h, OSII_UINT32 user_ref, const char *service_name, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT32 timeout ); ># 1493 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSIIMSG_MESSAGE_HANDLE osii_sarc_send_receive_slc( SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT32 timeout ); ># 1508 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_send_reply( SARC_HANDLE h, OSIIMSG_MESSAGE_HANDLE omsg, OSII_UINT32 msg_type, OSII_UINT32 priority, void *data, size_t data_size, OSII_UINT8 send_flags ); ># 1519 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_add_scheduler_pb_types(PB_TYPE_MANAGER_HANDLE handle); ># 1530 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_sarc.h" >extern OSII_RETCODE osii_sarc_init_pb_funcs(PB_TYPE_MANAGER_HANDLE pb_type_mgr); ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_types.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_MonarchInterface.h" 1 > > > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_ServicesNET.h" 1 ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_MonarchInterface.h" 2 ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_types.h" 2 > > > typedef OSII_INT16 OSII_DATABASE; > > > > > typedef OSII_INT16 OSII_OBJECT; > > > > > typedef OSII_INT16 OSII_FIELD; > > > > > typedef OSII_UINT32 OSII_RECORD; > > > > > typedef OSII_UINT16 OSII_INDEX; > > > > > typedef OSII_INT16 OSII_INSTANCE; > > > > > typedef OSII_INT8 OSII_MODE; ># 58 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_types.h" > typedef OSII_INT8 OSII_STATUS; ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" 2 > > >extern "C" { ># 32 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/monarch_interface.h" > typedef struct > { > OSII_DATABASE D; > OSII_OBJECT O; > OSII_FIELD F; > OSII_INDEX I; > OSII_RECORD R; > } > OSII_DOFRI_STR; > > > >extern OSII_BOOL tag_chunk_permq_isvalid( TAGCHUNK_HANDLE chunk ); >extern OSII_RETCODE tag_chunk_permq_put( TAGCHUNK_HANDLE chunk, const DBMS_DOFR_STR *dofr, const char *user, const char *con ); >extern DBMS_DOFR_STR *tag_chunk_permq_get( TAGCHUNK_HANDLE chunk, DBMS_DOFR_STR *dofr, OSII_STRING user, size_t usize, OSII_STRING con, size_t csize ); >extern TAGCHUNK_HANDLE tag_chunk_permq_create( TAGCHUNK_HANDLE unused ); > >extern void osii_dbms_cleanup( void ); >extern OSII_BOOL osii_dbms_init( const char *program_name ); >extern OSII_BOOL osii_dbms_notify( void ); >extern OSII_BOOL osii_dbms_wait( void ); > > >} ># 50 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/dbms.h" 1 ># 51 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_system.h" 1 ># 52 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" 1 ># 43 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" >enum UDS_ATTRIBUTE_TYPE >{ > > UDS_METADATA = 0x00, > > UDS_RIGHTS = 0x01, > > UDS_BITS = 0x02, > > UDS_ENUM = 0x04, > > UDS_STRING = 0x08, > > UDS_INTEGER = 0x10, > > UDS_ARRAY = 0x20 >}; > > >enum UDS_ATTRIBUTE_CHANGE_TYPE >{ > > UDS_CHANGE_TYPE_NONE = 0, > > UDS_CHANGE_TYPE_STORED = 1, > > UDS_CHANGE_TYPE_EFFECTIVE = 2 >}; > > >typedef struct _UDS UDS; > >typedef struct _UDS* UDS_HANDLE; > >typedef struct _UDS_USER_TICKET UDS_USER_TICKET_STR; > >typedef struct _UDS_USER_TICKET* UDS_USER_TICKET; > >typedef struct _UDS_USER_ATTRIBUTE UDS_USER_ATTRIBUTE_STR; > >typedef struct _UDS_USER_ATTRIBUTE* UDS_USER_ATTRIBUTE; > >typedef struct _UDS_RIGHT_ENUM UDS_RIGHT_ENUM_STR; > >typedef struct _UDS_RIGHT_ENUM* UDS_RIGHT_ENUM; > >typedef struct _UDS_RIGHT_ENUM_VALUE UDS_RIGHT_ENUM_VALUE_STR; > >typedef struct _UDS_RIGHT_ENUM_VALUE* UDS_RIGHT_ENUM_VALUE; > >typedef void (*UDS_DATA_CHANGE_CALLBACK)( void *ud, UDS_USER_TICKET ut ); > >typedef void (*UDS_NAMES_CHANGE_CALLBACK)( void *ud, UDS_HANDLE uds ); > > > > >struct _UDS >{ > void *h; ># 111 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*add_names_change_callback)( UDS_HANDLE uds, UDS_NAMES_CHANGE_CALLBACK cb, void *ud ); ># 120 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*remove_names_change_callback)( UDS_HANDLE uds, UDS_NAMES_CHANGE_CALLBACK cb, void *ud ); ># 131 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_USER_TICKET (*get_user)( UDS_HANDLE uds, const OSII_CHAR *username, OSII_UINT32 timeout ); ># 141 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_USER_TICKET (*get_console)( UDS_HANDLE uds, const OSII_CHAR *console, OSII_UINT32 timeout ); ># 151 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_USER_TICKET (*get_group)( UDS_HANDLE uds, const OSII_CHAR *group, OSII_UINT32 timeout ); ># 160 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_LIST_STR* (*user_names)( UDS_HANDLE uds, OSII_LIST_STR *list ); ># 169 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_LIST_STR* (*console_names)( UDS_HANDLE uds, OSII_LIST_STR *list ); ># 178 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_LIST_STR* (*group_names)( UDS_HANDLE uds, OSII_LIST_STR *list ); ># 187 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_USER_ATTRIBUTE (*allowed_attributes_get)( UDS_HANDLE uds, const char *name ); ># 196 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_RIGHT_ENUM (*allowed_enums_get)( UDS_HANDLE uds, const char *name ); ># 206 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*copy_allowed_attributes)( UDS_HANDLE uds, OSII_LIST_STR *allowed_attributes ); ># 216 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*copy_allowed_enums)( UDS_HANDLE uds, OSII_LIST_STR *allowed_enums ); ># 226 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*get_synchronous_xml_text)( UDS_HANDLE uds, OSII_STRING *pXmlText ); > > > > > > > void (*free_buffer)( UDS_HANDLE hUds, void *pBuffer ); ># 243 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*synchronize_data)( UDS_HANDLE hUds, const OSII_CHAR *udsXmlText ); ># 253 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_STRING (*get_last_error)( UDS_HANDLE uds, OSII_STRING buf, size_t len ); > > > > > > void (*destroy) ( UDS_HANDLE uds ); ># 269 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*wait) ( UDS_HANDLE uds, OSII_UINT32 timeout ); ># 278 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*is_connected)( UDS_HANDLE uds ); > > > > > > > void (*set_logger) ( UDS_HANDLE uds, LOGGER_HANDLE logger ); > SARC_HANDLE (*get_sarc)( UDS_HANDLE uds ); >}; > > >struct _UDS_USER_TICKET >{ > void *h; > void *userdata; > OSII_CHAR dn[ 256 ]; > UDS_HANDLE uds; > OSII_BOOL console_user; > OSII_BOOL group_user; > OSII_BOOL admin_user; > OSII_BOOL deleted; ># 308 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*add_data_change_callback)( UDS_USER_TICKET ut, UDS_DATA_CHANGE_CALLBACK cb, void *ud ); ># 317 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_RETCODE (*remove_data_change_callback)( UDS_USER_TICKET ut, UDS_DATA_CHANGE_CALLBACK cb, void *ud ); ># 327 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > UDS_USER_ATTRIBUTE (*attributes_get) ( UDS_USER_TICKET ut, const char *name ); ># 337 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*copy_attributes)( UDS_USER_TICKET ut, OSII_LIST_STR* attr_list ); > > > > > > > void (*free_attributes)( UDS_USER_TICKET ut, OSII_LIST_STR* attr_list ); ># 353 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_LIST_STR* (*groups)( UDS_USER_TICKET ut, OSII_LIST_STR *list ); > > > > > > > void (*data_changed)( UDS_USER_TICKET ut ); > > > OSII_BOOL (*commit_change)( UDS_USER_TICKET ut, UDS_USER_ATTRIBUTE ua, OSII_INT32 priority ); ># 374 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > void (*set_uds_user_number)( UDS_USER_TICKET ut, > OSII_INT32 user_record_number, > OSII_INT32 flags, > OSII_INT32 priority ); > > > > > > void (*set_uds_user_number_fast)( UDS_USER_TICKET ut, > OSII_INT32 user_record_number ); ># 396 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > int (*state)( UDS_USER_TICKET ut ); > >}; > > >struct _UDS_USER_ATTRIBUTE >{ > void *h; > void *userdata; > OSII_CHAR name[ 128 ]; > OSII_LIST_STR bit_names; > > enum UDS_ATTRIBUTE_TYPE type; > enum UDS_ATTRIBUTE_CHANGE_TYPE change_type; > enum UDS_ATTRIBUTE_CHANGE_TYPE access_type; > enum UDS_ATTRIBUTE_CHANGE_TYPE waiting_commit; > > > > > > > void (*destroy)( UDS_USER_ATTRIBUTE ua ); ># 429 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_STRING (*get_value)( UDS_USER_ATTRIBUTE ua, enum UDS_ATTRIBUTE_CHANGE_TYPE ct, OSII_STRING buf, size_t len ); ># 439 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > OSII_BOOL (*set_value)( UDS_USER_ATTRIBUTE ua, enum UDS_ATTRIBUTE_CHANGE_TYPE ct, const char *value ); ># 448 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" > size_t (*get_length)( UDS_USER_ATTRIBUTE ua, enum UDS_ATTRIBUTE_CHANGE_TYPE ct ); > > > > > > > void (*data_changed)( UDS_USER_ATTRIBUTE ua ); > >}; > > >struct _UDS_RIGHT_ENUM >{ > > OSII_CHAR name[ 128 - sizeof( OSII_LIST_STR ) ]; > > OSII_LIST_STR val_list; >}; > > >struct _UDS_RIGHT_ENUM_VALUE >{ > OSII_INT32 id; > OSII_CHAR value[ 128 - sizeof( OSII_INT32 ) ]; >}; > > >typedef struct _OSII_UDS_AOR_GROUP >{ > OSII_UINT16 id; > OSII_CHAR * name; > int site_id; > OSII_BYTE * included_aors; > size_t included_aors_size; >} OSII_UDS_AOR_GROUP_STR; > > >typedef struct _OSII_UDS_DATA_AORS OSII_UDS_DATA_AORS_STR; >struct _OSII_UDS_DATA_AORS >{ > time_t export_time; > OSII_UDS_AOR_GROUP_STR ** aor_groups; > OSII_UINT16 aor_groups_count; > > > > > > > void (*destroy)( OSII_UDS_DATA_AORS_STR * data_aors ); >}; > > > > > > > >typedef struct _OSII_UDS_DATA_AORS_LOAD_PARAMS >{ > > PROC_FOLDERS pf; > OSII_BOOL read_site_id; > OSII_BOOL read_name; > OSII_BOOL read_aors; > > > > > > > OSII_UDS_DATA_AORS_STR * ret_data_aors; >} OSII_UDS_DATA_AORS_LOAD_PARAMS_STR; > >extern UDS_HANDLE osii_uds_init( SARC_HANDLE sarc, OSII_UINT32 user_ref, THREADPOOL_HANDLE tpool ); > >extern UDS_USER_TICKET osii_user_ticket_get( UDS_HANDLE uds, const OSII_CHAR *username, OSII_UINT32 timeout ); >extern OSII_BOOL osii_user_ticket_get_nb( UDS_HANDLE uds, const OSII_CHAR *username, OSII_UINT32 timeout, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); >extern void osii_user_ticket_unregister( UDS_HANDLE uds, const OSII_CHAR *username, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); > >extern UDS_USER_TICKET osii_console_ticket_get( UDS_HANDLE uds, const OSII_CHAR *console, OSII_UINT32 timeout ); >extern OSII_BOOL osii_console_ticket_get_nb( UDS_HANDLE uds, const OSII_CHAR *console, OSII_UINT32 timeout, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); >extern void osii_console_ticket_unregister( UDS_HANDLE uds, const OSII_CHAR *console, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); > >extern UDS_USER_TICKET osii_group_ticket_get( UDS_HANDLE uds, const OSII_CHAR *group, OSII_UINT32 timeout ); >extern OSII_BOOL osii_group_ticket_get_nb( UDS_HANDLE uds, const OSII_CHAR *group, OSII_UINT32 timeout, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); >extern void osii_group_ticket_unregister( UDS_HANDLE uds, const OSII_CHAR *group, void (*callback)( void*, SARC_SERVICE_PROVIDER ), void *ud ); > > > >extern OSII_BYTE *uds_right_get_bits( UDS_USER_ATTRIBUTE, enum UDS_ATTRIBUTE_CHANGE_TYPE, OSII_BYTE *buf, size_t len, size_t *len_out ); >extern OSII_BOOL uds_right_set_bits( UDS_USER_ATTRIBUTE, enum UDS_ATTRIBUTE_CHANGE_TYPE, const OSII_BYTE *value, size_t len ); >extern OSII_INT32 uds_right_get_enum( UDS_USER_ATTRIBUTE, enum UDS_ATTRIBUTE_CHANGE_TYPE ); >extern OSII_BOOL uds_right_set_enum( UDS_USER_ATTRIBUTE, enum UDS_ATTRIBUTE_CHANGE_TYPE, OSII_INT32 value ); >extern UDS_RIGHT_ENUM uds_right_enum( UDS_USER_ATTRIBUTE ); >extern OSII_BOOL osii_uds_data_aor_stat( PROC_FOLDERS pf, osii_stat_struct *finfo ); >extern OSII_ALIST_HANDLE osii_uds_load_data_aor( PROC_FOLDERS pf, size_t *count, size_t *width ); >extern OSII_ALIST_HANDLE osii_uds_load_aor_sites( PROC_FOLDERS pf ); >extern UDS_USER_ATTRIBUTE osii_user_right_init( UDS_HANDLE uds, OSII_STRING name, OSII_STRING value, OSII_STRING evalue, enum UDS_ATTRIBUTE_TYPE type, enum UDS_ATTRIBUTE_CHANGE_TYPE change_type, UDS_RIGHT_ENUM right_enum, OSII_BOOL modify, enum UDS_ATTRIBUTE_CHANGE_TYPE access_type ); >extern UDS_USER_ATTRIBUTE osii_user_right_init_ext( UDS_HANDLE uds, OSII_STRING name, OSII_STRING value, OSII_STRING evalue, enum UDS_ATTRIBUTE_TYPE type, enum UDS_ATTRIBUTE_CHANGE_TYPE change_type, UDS_RIGHT_ENUM right_enum, OSII_BOOL modify, OSII_LIST_STR *bit_names, enum UDS_ATTRIBUTE_CHANGE_TYPE access_type ); >extern UDS_USER_ATTRIBUTE osii_user_attribute_clone( UDS_HANDLE uds, UDS_USER_ATTRIBUTE orig ); ># 565 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/osii_uds.h" >extern OSII_RETCODE osii_uds_load_data_aor_ext( OSII_UDS_DATA_AORS_LOAD_PARAMS_STR * params ); ># 54 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" 2 ># 72 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" >} ># 90 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" >class HSHLogger { >public: > class CustomLogger { > private: > CustomLogger(const CustomLogger&) = delete; CustomLogger& operator=(const CustomLogger&) = delete; CustomLogger(CustomLogger&&) = delete;; > LOGGER_HANDLE log_handle; > std::string prefix; > > public: > CustomLogger(const std::string &filename); > CustomLogger(const std::string &filename, OSII_INT32 num_files, size_t file_size, OSII_BOOL is_buffered); > ~CustomLogger(); > > void set_prefix(const std::string &new_val) { prefix = new_val; } > > void log(const OSII_CHAR *format, const char * filename, int line, ...) const; > void log_no_file_no_line(const OSII_CHAR *format, ...) const; > void v_log(const OSII_CHAR *format, va_list &args) const; > void flush() const; > }; > >private: > HSHLogger(const HSHLogger&) = delete; HSHLogger& operator=(const HSHLogger&) = delete; HSHLogger(HSHLogger&&) = delete;; > static HSHLogger *instance; > static const OSII_INT32 LOG_BIT_CRITICAL = 0x1; > static const OSII_INT32 LOG_BIT_ERROR = 0x2; > static const OSII_INT32 LOG_BIT_TRACE_STATUS = 0x4; > static const OSII_INT32 LOG_BIT_TRACE_COMMS = 0x8; > > HSHLogger(OSII_INT32 debug_level, const std::string &filename) : logfile(filename), syslogfile("syslog.csv"), debug_level_filter(debug_level | LOG_BIT_CRITICAL | LOG_BIT_ERROR), > syslog_filter(0x1), error_log_filter(0x3), trace_log_filter(0) {} > > CustomLogger logfile; > CustomLogger syslogfile; > std::string prefix; > > OSII_INT32 debug_level_filter; > OSII_INT32 syslog_filter; > OSII_INT32 error_log_filter; > OSII_INT32 trace_log_filter; > > static void print_log(OSII_UCHAR options, const OSII_CHAR *format, va_list &args); > >public: > static void intitialize(OSII_INT32 debug_level, const std::string &filename); > > static void set_debug_level(OSII_INT32 debug_level); > static void set_prefix(const std::string &prefix); > static const std::string &get_prefix() { return instance->prefix; } > > static void CRITICAL(const OSII_CHAR *format, const char * filename, int line, ...); > static void LOG(const OSII_CHAR *format, const char * filename, int line, ...); > static void TRACE(const OSII_CHAR *format, ...); > static void COMMS(const OSII_CHAR *format, ...); >}; ># 158 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" >class HSHException : public std::exception { >private: > std::string m_message; > >public: > HSHException(const std::string &message) : m_message(message) {} > > HSHException(const char* format, ...) { > va_list va_args; > __builtin_va_start(va_args,format); > char buffer[1024]; > osii_vsnprintf_fast(buffer, sizeof(buffer), format, va_args); > m_message = std::string(buffer); > __builtin_va_end(va_args); > } > > virtual ~HSHException(void) throw() {} > > virtual const char* what(void) const throw() { return m_message.c_str(); } >}; > > >class IOSITranslator { >public: > static IOSITranslator *create_handle(const std::string &olf_name); > static void destroy_handle(IOSITranslator *handle); > > virtual std::string get_translation(const std::string &key) = 0; > virtual std::string get_translation(const std::string &key, const char* format, ...) = 0; >}; > > > >class IAlarmGenerator { >public: > > struct QueuedAlarm { > QueuedAlarm(OSII_BYTE aor, OSII_UINT32 alarm_station_num, OSII_UINT32 alarm_class, const std::string &event_text, const std::string &desc_text, const std::string &value_text) : > aor(aor), alarm_station_num(alarm_station_num), alarm_class(alarm_class), event_text(event_text), desc_text(desc_text), value_text(value_text), is_latchable(0), is_latched(0) {} > QueuedAlarm(OSII_BYTE aor, OSII_UINT32 alarm_station_num, OSII_UINT32 alarm_class, const std::string &event_text, const std::string &desc_text, const std::string &value_text, const std::string &alarm_source_uid, OSII_BOOL is_latched) : > aor(aor), alarm_station_num(alarm_station_num), alarm_class(alarm_class), event_text(event_text), desc_text(desc_text), value_text(value_text), is_latchable(1), alarm_source_uid(alarm_source_uid), is_latched(is_latched) {} > > OSII_BYTE aor; > OSII_UINT32 alarm_station_num; > OSII_UINT32 alarm_class; > std::string event_text; > std::string desc_text; > std::string value_text; > > > OSII_BOOL is_latchable; > OSII_BOOL is_latched; > std::string alarm_source_uid; > }; > > > class IAlarmSender { > public: > virtual OSII_BOOL send_alarm(const QueuedAlarm &alarm) = 0; > }; > >public: > static IAlarmGenerator *create_alarm_generator(THREAD_MON thread_mon, OSII_BYTE default_alarm_aor, OSII_UINT32 default_alarm_station_num, OSII_UINT32 default_alarm_class, IAlarmSender *alarm_sender); > static void destroy_alarm_generator(IAlarmGenerator *generator); > > virtual ~IAlarmGenerator(){} > > > class IMomentaryAlarm { > public: > virtual void trigger(const std::string &value) = 0; > }; > virtual IMomentaryAlarm *create_momentary_alarm(const std::string &event, const std::string &description, OSII_BYTE default_alarm_aor, OSII_UINT32 default_alarm_station_num, OSII_UINT32 default_alarm_class) = 0; > virtual IMomentaryAlarm *create_momentary_alarm(const std::string &event, const std::string &description) = 0; > virtual void destroy_momentary_alarm(IMomentaryAlarm *latching_alarm) = 0; > > > class ILatchingAlarm { > public: > virtual void set_condition(const std::string &value) = 0; > virtual void clear_condition(const std::string &value) = 0; > }; > virtual ILatchingAlarm *create_latching_alarm(const std::string &start_event, const std::string &start_description, const std::string &end_event, const std::string &end_description, > const std::string & alarm_source_uid, OSII_BYTE default_alarm_aor, OSII_UINT32 default_alarm_station_num, OSII_UINT32 default_alarm_class) = 0; > virtual ILatchingAlarm *create_latching_alarm(const std::string &start_event, const std::string &start_description, const std::string &end_event, const std::string &end_description, const std::string & alarm_source_uid) = 0; > virtual void destroy_latching_alarm(ILatchingAlarm *latching_alarm) = 0; >}; > > > > >class IGClientConnMgr { >public: > class IGClientDomainConn { > public: > class IGClientConn { > public: > class IGClientConnListener { > public: > virtual void handle_response(OSII_UINT32 conn_ref, OSII_STRING service_name, OSII_INT64 id, TAGCHUNK_HANDLE data) = 0; > virtual void handle_login(SARC_HANDLE h, OSII_UINT32 conn_ref, OSII_UINT32 flags) = 0; > }; > > public: > virtual ~IGClientConn() {} > > > virtual OSII_BOOL is_connected() const = 0; > virtual std::string get_service_name() const = 0; > > > virtual OSII_RETCODE send(TAGCHUNK_HANDLE msg, OSII_UINT32 priority) = 0; > virtual TAGCHUNK_HANDLE send_recieve(TAGCHUNK_HANDLE msg, OSII_UINT32 priority, OSII_UINT32 timeout) = 0; > }; > > virtual IGClientConn *connect_to_service(const std::string &service_name, OSII_UINT32 timeout, OSII_BOOL auto_reconnect, IGClientConn::IGClientConnListener *listener) = 0; > virtual void disconnect_from_service(IGClientConn *connection) = 0; > virtual const std::string &get_domain() const = 0; > virtual TAGCHUNKMANAGER_HANDLE get_tag_chunk_manager() const = 0; > virtual PB_TYPE_MANAGER_HANDLE get_pb_type_manager() const = 0; > virtual OSII_UINT32 get_user_ref() const = 0; > virtual void *get_gclient_handle() = 0; > }; > >public: > > static IGClientConnMgr *create_instance(OSII_UINT32 debug_level); > static IGClientConnMgr *get_instance(); > > virtual void set_alarm_domain(const std::string &alarm_domain_name) = 0; > > virtual PB_TYPE_MANAGER_HANDLE get_pb_type_manager() const = 0; > virtual void prime_domain_conn(const std::string &domain, void *sarc_handle, TAGCHUNKMANAGER_HANDLE custom_tc_manager, OSII_UINT32 user_ref) = 0; > virtual IGClientDomainConn *retrieve_or_create_domain_conn(const std::string &domain_name, OSII_BOOL &was_created) = 0; > virtual OSII_RETCODE register_custom_tag_chunk(TAGCHUNK_HANDLE new_tagchunk) = 0; > > virtual IAlarmGenerator::IAlarmSender *get_alarm_sender() = 0; >}; > > > > >class IAORManager { >public: > static const OSII_INT32 SECURITY_GROUP_BYTES = 32; > typedef OSII_BYTE SecurityGroups[SECURITY_GROUP_BYTES]; > > > static IAORManager *create(OSII_DATABASE db, const std::string &domain_name ); > static OSII_BOOL test_bit(const SecurityGroups bits, OSII_INT32 bit_num) { > return osii_bytebuf_is_bit_set((OSII_BYTE*)bits, SECURITY_GROUP_BYTES, bit_num); > } > > static void destroy(IAORManager *aor_manager); > > > virtual OSII_RETCODE perform_aor_scan(OSII_BOOL *changed_detected) = 0; > > > virtual OSII_RETCODE get_security_groups_mask(OSII_INT32 aor_index, SecurityGroups &out_data) = 0; > > virtual size_t get_num_aor_groups() = 0; >}; > > >class IOSIDB{ >public: > class IDatabaseMetadata { > public: > class IObjectMetadata { > public: > virtual OSII_OBJECT get_table_id() const = 0; > virtual std::string get_table_field_name() const = 0; > virtual std::string get_record_available_field_name() const = 0; > virtual std::string get_key_field_name() const = 0; > virtual std::string get_key_change_field_name() const = 0; > virtual std::string get_aor_field_name() const = 0; > virtual OSII_UINT16 get_record_available_field_type() const = 0; > virtual ~IObjectMetadata() = default; > }; > > virtual IObjectMetadata *get_obj_meta(OSII_OBJECT obj) const = 0; > virtual void release_obj_meta(IObjectMetadata *meta) const = 0; > > virtual OSII_DATABASE get_database_num() const = 0; > virtual OSII_OBJECT get_num_objects() const = 0; > virtual OSII_INDEX get_num_indexes( OSII_OBJECT OBJno, OSII_FIELD FLDno ) const = 0; > virtual OSII_STRING get_schema_field_name( OSII_OBJECT OBJno, OSII_FIELD FLDno ) const = 0; > virtual OSII_STRING get_schema_field_flags( OSII_OBJECT OBJno, OSII_FIELD FLDno ) const = 0; > virtual OSII_CHAR get_schema_field_type( OSII_OBJECT OBJno, OSII_FIELD FLDno ) const = 0; > virtual OSII_UINT32 get_schema_state_link( OSII_OBJECT OBJno, OSII_FIELD FLDno ) const = 0; > virtual OSII_UINT32 get_schema_name_link( OSII_OBJECT OBJno, OSII_FIELD FLDno, OSII_DATABASE* nameDBno, OSII_OBJECT* nameOBJno, OSII_FIELD* nameFLDno ) const = 0; > virtual OSII_FIELD get_fieldID( OSII_OBJECT O, OSII_STRING pName ) const = 0; > virtual OSII_STRING get_schema_database_name() const = 0; > virtual OSII_STRING get_schema_object_name(OSII_OBJECT OBJno) = 0; > virtual OSII_UINT32 get_schema_string_size(OSII_OBJECT OBJno, OSII_FIELD FLDno) const = 0; > }; > > static IOSIDB *get_instance(); > > virtual std::string get_database_name(OSII_DATABASE dbno) = 0; > > virtual IDatabaseMetadata *get_database_metadata(const std::string &db_name) = 0; > virtual void destroy_database_metadata(IDatabaseMetadata *meta) = 0; >}; > >class ScopeCleanup >{ >private: > const std::function<void(void)> cleanup_function; > >public: > ScopeCleanup(std::function<void(void)> cleanup_function) : cleanup_function(std::move(cleanup_function)) {} > ~ScopeCleanup() { > cleanup_function(); > } >}; > >class ChronusMutex { >private: > mutable OSII_MUTEX m_mutex; > ChronusMutex(const ChronusMutex&) = delete; ChronusMutex& operator=(const ChronusMutex&) = delete; ChronusMutex(ChronusMutex&&) = delete;; > >public: > ChronusMutex(){ > if ((( OSII_RETCODE )1) != osii_mutex_init(&m_mutex)) { > throw HSHException("Could not allocate mutex"); > } > } > > ~ChronusMutex(){ > ( ( ( &m_mutex ) && ! ( ( ( &m_mutex ) && memcmp( &m_mutex, &empty_mutex, sizeof( OSII_MUTEX ) ) == 0 ) ? 1 : 0 ) && ! pthread_mutex_destroy( &m_mutex ) ) ? ( memset( &m_mutex, 0, sizeof( OSII_MUTEX ) ), (( OSII_RETCODE )1) ) : (( OSII_RETCODE )0) ); > } > > __attribute__((always_inline)) void wait() const { ( ( ( &m_mutex ) && ! pthread_mutex_lock( &m_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); } > __attribute__((always_inline)) void lock() const { ( ( ( &m_mutex ) && ! pthread_mutex_lock( &m_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); } > __attribute__((always_inline)) void notify() const { ( ( ( &m_mutex ) && ! pthread_mutex_unlock( &m_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); } > __attribute__((always_inline)) void unlock() const { ( ( ( &m_mutex ) && ! pthread_mutex_unlock( &m_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); } > > __attribute__((always_inline)) OSII_BOOL wait(OSII_INT32 timeout) const { return((( OSII_RETCODE )1) == osii_mutex_wait_timed(&m_mutex, timeout)); } >}; > >class IHeartbeater { >public: > virtual ~IHeartbeater() {} > > virtual OSII_UINT32 get_timeout_ms() const = 0; > virtual void heartbeat() = 0; > virtual void ignore_thread(OSII_UINT32 ignore_time_ms) = 0; >}; > >class HSHThread; > >class UsageMonitor { >public: > class UsageTracker { > public: > UsageTracker(const UsageTracker&) = delete; UsageTracker& operator=(const UsageTracker&) = delete; UsageTracker(UsageTracker&&) = delete; > static const OSII_BOOL START_ENABLED = 1; > > private: > std::atomic<OSII_INT32> count; > std::atomic<OSII_INT32> max_count; > > > public: > UsageTracker() : count(0), max_count(0) {} > > void increment() > { > OSII_INT32 new_count = ++count; > OSII_INT32 max_val = max_count; > while (max_val < new_count && !max_count.compare_exchange_weak(max_val, new_count)) {} > } > > void decriment() { > count--; > } > > OSII_INT32 get_count() const { return count; } > OSII_INT32 get_max() const { return max_count; } > }; > >private: > UsageMonitor(const UsageMonitor&) = delete; UsageMonitor& operator=(const UsageMonitor&) = delete; UsageMonitor(UsageMonitor&&) = delete; > UsageMonitor(); > ~UsageMonitor(); > > static const OSII_INT32 REPORT_FREQUENCY = 30000; > static UsageMonitor *instance; > > std::map<std::string, UsageTracker *>trackers; > ChronusMutex creation_mutex; > OSII_TIME_STR64 report_timer; > OSII_BOOL trace_enabled; > HSHLogger::CustomLogger *logger; > > HSHThread *monitor_thread; > void thread_main(); > >public: > static UsageMonitor *get_instance(); > > void activate(const std::string &proc_designation, THREAD_MON thread_mon); > void activate(const std::string &proc_designation, THREAD_MON thread_mon, OSII_UINT32 debug_level); > void shutdown(); > > UsageTracker *add_tracker(const std::string &name); > UsageTracker *get_tracker(const std::string &name); > void release_tracker(const std::string &name); > void set_trace_enabled(OSII_BOOL enabled); >}; > >class MonarchUser >{ >private: > class MonarchPermission > { > private: > MonarchPermission(const MonarchPermission&) = delete; MonarchPermission& operator=(const MonarchPermission&) = delete; MonarchPermission(MonarchPermission&&) = delete; > OSII_BYTE m_bits[2][128]; > size_t m_length[2]; > std::atomic<int> active_index; > > public: > MonarchPermission() : m_bits{}, m_length{}, active_index(0) {} > ~MonarchPermission() = default; > > > void clear_permissions(OSII_BOOL &has_changed); > > OSII_RETCODE update_view(UDS_USER_ATTRIBUTE p_attribute, OSII_BOOL &has_changed); > > OSII_BOOL has_perms(const IAORManager::SecurityGroups _security_groups) const; > }; > > > static constexpr OSII_UINT32 PERM_UPDATE_TIMEOUT_MS = 5000; > > MonarchUser(const MonarchUser&) = delete; MonarchUser& operator=(const MonarchUser&) = delete; MonarchUser(MonarchUser&&) = delete; > mutable OSII_EVENT perms_received; > mutable std::atomic<bool> perms_init; > > MonarchPermission aor_view; > MonarchPermission aor_modify; > MonarchPermission aor_view_alarms; > OSII_BOOL m_is_program_login; > OSII_CHAR user_name[255]; > > >private: > OSII_BOOL has_permissions(const IAORManager::SecurityGroups _security_groups, const MonarchPermission &permissions) const; > >public: > > explicit MonarchUser(OSII_CHAR *user); > ~MonarchUser(); > > > const OSII_CHAR* get_user_name() const { return user_name; } > > > OSII_RETCODE update_permissions(UDS_USER_TICKET p_ticket, OSII_BOOL &has_changed); > > > OSII_BOOL has_view_permissions(const IAORManager::SecurityGroups security_groups) const; > OSII_BOOL has_modify_permissions(const IAORManager::SecurityGroups security_groups) const; > OSII_BOOL has_alarm_view_permissions(const IAORManager::SecurityGroups security_groups) const; >}; > >class HSHUser >{ >private: > MonarchUser *primary_user; > MonarchUser *secondary_user; > >public: > HSHUser(MonarchUser *primary_user, MonarchUser *secondary_user) : primary_user(primary_user), secondary_user(secondary_user) {} > > const OSII_CHAR *get_user_name() const { return primary_user->get_user_name(); } > > OSII_BOOL has_view_permissions(const IAORManager::SecurityGroups security_groups) const { > if (__null == secondary_user) { > return primary_user->has_view_permissions(security_groups); > } > return primary_user->has_view_permissions(security_groups) && secondary_user->has_view_permissions(security_groups); > } > > OSII_BOOL has_modify_permissions(const IAORManager::SecurityGroups security_groups) const { > if (__null == secondary_user) { > return primary_user->has_modify_permissions(security_groups); > } > return primary_user->has_modify_permissions(security_groups) && secondary_user->has_modify_permissions(security_groups); > } > > OSII_BOOL has_alarm_view_permissions(const IAORManager::SecurityGroups security_groups) const { > if (__null == secondary_user) { > return primary_user->has_alarm_view_permissions(security_groups); > } > return primary_user->has_alarm_view_permissions(security_groups) && secondary_user->has_alarm_view_permissions(security_groups); > } > >}; > >class HSHPageSize >{ >private: > HSHPageSize() = delete; > HSHPageSize(const HSHPageSize&) = delete; HSHPageSize& operator=(const HSHPageSize&) = delete; HSHPageSize(HSHPageSize&&) = delete; > > static size_t calculate_page_size() > { > long size = 0; > > > > > > > size = sysconf(_SC_PAGESIZE); > > > return ( ( ((size_t)1024) >= ((size_t)size) ) ? ((size_t)1024) : ((size_t)size) ); > } > >public: > static size_t get_page_size() > { > static const size_t page_size = calculate_page_size(); > return page_size; > } >}; > > >template<typename T> >class AtomicCountedPointer >{ >public: > struct alignas(16) Data > { > T* ptr; > uintptr_t count; > }; > > Data load() { return data; } > Data operator*() { return data; } > > bool compare_and_swap(Data &cmp, Data &nval) > { > > > > > bool result; > __asm__ __volatile__ > ( > "lock cmpxchg16b %1\n\t" > "setz %0\n" > : "=q" ( result ) > , "+m" ( data ) > , "+d" ( cmp.count ) > , "+a" ( cmp.ptr ) > : "c" ( nval.count ) > , "b" ( nval.ptr ) > : "cc", "memory" > ); > return result; > > } > >private: > Data data = { 0 }; > >}; > > >class HSHAtomicBackoff >{ >private: > > static constexpr OSII_INT32 LOOPS_BEFORE_YIELD = 16; > OSII_INT32 count; > > __attribute__((always_inline)) void pause(OSII_INT32 pause) > { > for (; pause > 0; --pause) > { > > > > asm("pause"); > > } > } > >public: > HSHAtomicBackoff() noexcept : count(1) {} > > __attribute__((always_inline)) void pause() > { > if (count <= LOOPS_BEFORE_YIELD) > { > pause(count); > > count *= 2; > } > else > { > > std::this_thread::yield(); > } > } > > __attribute__((always_inline)) void reset(){ count = 1; } > >}; > > > >class HSHSpinLock >{ >public: > __attribute__((always_inline)) void wait() const > { > for (HSHAtomicBackoff b;; b.pause()) > { > bool temp = spin_lock.load(); > if (temp) { > > continue; > } > > if (spin_lock.compare_exchange_weak(temp, true, std::memory_order_acquire)) { > return; > } > b.reset(); > } > } > > __attribute__((always_inline)) void lock() const { wait(); } > __attribute__((always_inline)) void unlock() const { notify(); } > __attribute__((always_inline)) void notify() const > { > bool temp = true; > if (!spin_lock.compare_exchange_strong(temp, false, std::memory_order_release)) > { > HSHLogger::LOG("Failed to release lock, which means it probably was never acquired", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 704 ); > } > } > >private: > > mutable std::atomic<bool> spin_lock; > >}; > >template <class T> >class MempoolClassAllocatorNoDeepCopy >{ >private: > > using storage_type = typename std::aligned_storage<sizeof(T), alignof(T)>::type; > class slot > { > public: > union { > storage_type data; > slot* next; > }; > std::atomic<int> counter; > }; > > > class ConcurrentMemStack > { > public: > slot *pop() > { > auto old_head = head.load(); > typename AtomicCountedPointer<slot>::Data next_head = { 0 }; > for (HSHAtomicBackoff b; ; b.pause()) > { > if (!old_head.ptr) { > return nullptr; > } > next_head.ptr = old_head.ptr->next; > next_head.count = old_head.count + 1; > > if (head.compare_and_swap(old_head, next_head)) { > return old_head.ptr; > } > } > } > > void push(slot *s) > { > auto old_head = head.load(); > typename AtomicCountedPointer<slot>::Data next_head = { s }; > for (HSHAtomicBackoff b; ; b.pause()) > { > s->next = old_head.ptr; > next_head.count = old_head.count + 1; > if (head.compare_and_swap(old_head, next_head)) { > return; > } > } > } > > private: > AtomicCountedPointer<slot> head; > }; > > __attribute__((always_inline)) void *pool_get() > { > slot *s = stack.pop(); > if (s) { > s->counter = 1; > return (void*)&s->data; > } > > > std::lock_guard<std::mutex> scoped_grow_lock(grow_mutex); > > > s = stack.pop(); > if (s) { > s->counter = 1; > return (void*)&s->data; > } > > > s = grow_pool(); > s->counter = 1; > return (void*)&s->data; > } > > __attribute__((always_inline)) slot *grow_pool() > { > > slot *new_slots = new(std::nothrow)slot[grow_size](); > if (!new_slots) { > HSHLogger::LOG("Failed to grow memory pool: %s. Dying...", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 799, type_name.c_str() ); > return nullptr; > } > > > for (size_t i = 1; i < grow_size; i++) { > stack.push(&new_slots[i]); > } > > > chunks.push_back(new_slots); > > > return new_slots; > } > > >protected: > > size_t grow_size; > MempoolClassAllocatorNoDeepCopy<T>(const MempoolClassAllocatorNoDeepCopy<T>&) = delete; MempoolClassAllocatorNoDeepCopy<T>& operator=(const MempoolClassAllocatorNoDeepCopy<T>&) = delete; MempoolClassAllocatorNoDeepCopy<T>(MempoolClassAllocatorNoDeepCopy<T>&&) = delete; > UsageMonitor::UsageTracker *mempool_tracker; > std::vector<slot*> chunks; > std::string type_name; > std::mutex grow_mutex; > ConcurrentMemStack stack; > > >public: > MempoolClassAllocatorNoDeepCopy(OSII_INT32 num_blocks, const std::string &user_type_name) : type_name(user_type_name) > { > size_t total_block_size = (size_t)num_blocks * sizeof(slot); > size_t page_size = HSHPageSize::get_page_size(); > > > grow_size = ((((total_block_size - 1) / page_size) + 1) * page_size) / sizeof(slot); > > > slot *new_slots = new(std::nothrow)slot[grow_size](); > if (!new_slots) { > throw HSHException("Failed to intialize Mempool for Type: %s", user_type_name.c_str()); > } > > for (int i = 0; i < grow_size; i++) { > stack.push(&new_slots[i]); > } > > chunks.push_back(new_slots); > > > mempool_tracker = UsageMonitor::get_instance()->add_tracker(user_type_name); > } > > virtual ~MempoolClassAllocatorNoDeepCopy() { > for (auto chunk : chunks) { > delete[] chunk; > } > UsageMonitor::get_instance()->release_tracker(type_name); > } > > template <class... Args> > T *create(Args&&...args) > { > T *p_element = create_no_construct(); > if (!p_element) { > return nullptr; > } > > try { > return new(p_element)T(std::forward<Args>(args)...); > } catch (std::exception &ex) { > HSHLogger::LOG("CreationError[%s]: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 870, type_name.c_str(), ex.what() ); > destroy_no_destruct(p_element); > return nullptr; > } > } > > __attribute__((always_inline)) T *create_no_construct() > { > mempool_tracker->increment(); > return (T*)pool_get(); > } > > T *create_fast_copy(T *val) > { > slot *s = reinterpret_cast<slot *> > (reinterpret_cast<char*>(val) - __builtin_offsetof (slot, data)); > s->counter++; > return val; > } > > void destroy(T *val) > { > if (!val) { > return; > } > > slot *s = reinterpret_cast<slot *> > (reinterpret_cast<char*>(val) - __builtin_offsetof (slot, data)); > > int instance_count = --s->counter; > if (!instance_count) > { > val->~T(); > stack.push(s); > mempool_tracker->decriment(); > } > else if (instance_count < 0) > { > HSHLogger::LOG("Mempool: %s ERROR: attempt to double free item...", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 908, type_name.c_str() ); > *((const char **)__null) = "Die"; > } > } > > __attribute__((always_inline)) void destroy_no_destruct(void *val) > { > if (!val) { > return; > } > > slot *s = reinterpret_cast<slot *> > (reinterpret_cast<char*>(val) - __builtin_offsetof (slot, data)); > > int instance_count = --s->counter; > if (!instance_count) > { > stack.push(s); > mempool_tracker->decriment(); > } > else if (instance_count < 0) > { > HSHLogger::LOG("Mempool: %s ERROR: attempt to double free item...", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 930, type_name.c_str() ); > *((const char **)__null) = "Die"; > } > } >}; > > >template <class T> >class MempoolClassAllocator final : public MempoolClassAllocatorNoDeepCopy<T> >{ >public: > MempoolClassAllocator(OSII_INT32 block_size, const std::string &user_type_name) : MempoolClassAllocatorNoDeepCopy<T>(block_size, user_type_name) {} > T *create_deep_copy(const T *val) { return MempoolClassAllocatorNoDeepCopy<T>::create(val); } >}; ># 976 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h" >class HSHThread : public IHeartbeater { >private: > static MempoolClassAllocatorNoDeepCopy<HSHThread> allocator; > HSHThread(const HSHThread&) = delete; HSHThread& operator=(const HSHThread&) = delete; HSHThread(HSHThread&&) = delete;; > HSHThread(THREAD_MON thread_mon, OSII_INT32 hb_timeout_ms, const std::string &thread_name, std::function<void(void)> func) : > thread_mon(thread_mon), heartbeat_timeout_ms(hb_timeout_ms), thread_index((4294967295U)), thread_name(thread_name), user_func(std::move(func)), > _is_running(0), _stop_requested(0), _is_ignored(0), thread_id(0) {} > > THREAD_MON thread_mon; > OSII_INT32 heartbeat_timeout_ms; > OSII_INT32 thread_index; > OSII_INT32 thread_id; > std::string thread_name; > > OSII_BOOL _is_running; > OSII_BOOL _is_ignored; > OSII_BOOL _stop_requested; > > std::function<void(void)> user_func; > > static void thread_launcher(HSHThread *internal_data) { > osii_thread_set_name(internal_data->thread_name.c_str(), (4294967295U)); > internal_data->thread_index = internal_data->thread_mon->register_thread(internal_data->thread_mon, internal_data->thread_name.c_str(), internal_data->heartbeat_timeout_ms); > > internal_data->user_func(); > > if (internal_data->thread_index != -1) { > internal_data->thread_mon->unregister_thread(internal_data->thread_mon, internal_data->thread_name.c_str(), internal_data->thread_index); > } > internal_data->_is_running = 0; > } > >public: > static HSHThread *create(THREAD_MON thread_mon, OSII_INT32 hb_timeout_ms, const std::string &thread_name, std::function<void(void)> func) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) HSHThread(thread_mon, hb_timeout_ms, thread_name, func);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 1010, e.what() ); (allocator).destroy_no_destruct((HSHThread *)ret_val); return __null; } }; > } > static void destroy(HSHThread *val) { > allocator.destroy(val); > } > virtual ~HSHThread() { > request_stop_blocking(); > } > > > OSII_RETCODE start() { > if (_is_running) { > HSHLogger::LOG("Attempted to start active thread (%s)", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 1022, thread_name.c_str() ); > return (( OSII_RETCODE )0); > } else if (_stop_requested) { > return (( OSII_RETCODE )1); > } > > _is_running = 1; > if (0 == (thread_id = osii_thread_create((void(*)(void *))thread_launcher, this))) { > _is_running = 0; > HSHLogger::LOG("Failed to launch thread (%s)", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_monarch_base.h", 1031, thread_name.c_str() ); > return (( OSII_RETCODE )0); > } > return (( OSII_RETCODE )1); > } > void request_stop() { _stop_requested = 1; } > void request_stop_blocking() { > request_stop(); > while (_is_running) { > osii_sleep(50); > } > } > > > virtual void heartbeat() { > if (_is_ignored) { > thread_mon->ignore_thread(thread_mon, thread_name.c_str(), thread_index, 0); > _is_ignored = 0; > } > thread_mon->heartbeat_thread(thread_mon, __null, thread_index); > } > > void ignore_thread() { thread_mon->ignore_thread(thread_mon, thread_name.c_str(), thread_index, 1); _is_ignored = 1; } > virtual void ignore_thread(OSII_UINT32 ignore_time_ms) override { thread_mon->ignore_thread_timed(thread_mon, thread_name.c_str(), thread_index, ignore_time_ms); } > > > const std::string &get_thread_name() const { return thread_name; } > virtual OSII_UINT32 get_timeout_ms() const override { return heartbeat_timeout_ms; } > OSII_BOOL is_stop_requested() const { return _stop_requested; } > OSII_BOOL is_running() const { return _is_running; } > OSII_INT32 get_thread_id() const { return thread_id; } >}; > >struct HSHThreadDeleter { void operator()(HSHThread *thread) const noexcept { HSHThread::destroy(thread); } }; > >class IHSHThreadPool { >public: > class IHSHTask { > public: > virtual ~IHSHTask() {} > > > virtual void execute(IHeartbeater *heartbeater) = 0; > > > virtual void cancel() = 0; > }; > >public: > static IHSHThreadPool *create(const std::string &thread_pool_name, THREAD_MON thread_mon, OSII_UINT32 thread_timeout_ms, OSII_UINT8 num_threads); > static void destroy(IHSHThreadPool *thread_pool); > > virtual ~IHSHThreadPool() {} > virtual const std::string &get_pool_name() const = 0; > virtual OSII_UINT8 get_num_threads() const = 0; > virtual OSII_BOOL enque_task(IHSHTask *task) = 0; >}; ># 21 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/include/version_hsh_sdk.h" 1 ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" 2 > > > > >enum CHRONUS_QUALITY { > CHRONUS_QUALITY_GOOD = 0, > CHRONUS_QUALITY_NODATA = 1, > CHRONUS_QUALITY_STOPPED = 2, > CHRONUS_QUALITY_UPDATED = 3, > CHRONUS_QUALITY_SOURCE_QUESTIONABLE = 4, >}; > >enum CHRONUS_TIME_QUALITY { > CHRONUS_TIME_QUALITY_GOOD = 0, > CHRONUS_TIME_QUALITY_SUBSTITUTED = 1, > CHRONUS_TIME_QUALITY_QUESTIONABLE = 2, > CHRONUS_TIME_QUALITY_INVALID = 4, >}; > >enum UIDState { > UID_STATE_UNKNOWN = -1, > UID_STATE_NORMAL = 0, > UID_STATE_RENAME_ENQUEUED = 1, > UID_STATE_DELETE_ENQUEUED = 2, > UID_STATE_RESTORE_ENQUEUED = 3, > UID_STATE_RENAME_BLOCKED = 4, > UID_STATE_RESTORE_BLOCKED = 5, > UID_STATE_DELETED = 6, > UID_STATE_PURGE_ENQUEUED = 7 >}; > > >enum METADATA_UPDATE >{ > UPSERT_METADATA = 0, > INSERT_METADATA = 1 >}; ># 76 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" >enum CServerFeatureSupport { > SUPPORTS_STREAM_TYPE_CONTINUOUS_ARCHIVAL, > SUPPORTS_STREAM_TYPE_PERIODIC_ARCHIVAL, > SUPPORTS_STREAM_TYPE_EVENT_ARCHIVAL, > SUPPORTS_STREAM_TYPE_METRIC_ARCHIVAL, > SUPPORTS_STREAM_TYPE_RAW_ARCHIVAL, > SUPPORTS_STREAM_TYPE_CONTINUOUS_QUERY, > SUPPORTS_STREAM_TYPE_PERIODIC_QUERY, > SUPPORTS_STREAM_TYPE_EVENT_QUERY, > SUPPORTS_STREAM_TYPE_METRIC_QUERY, > SUPPORTS_STREAM_TYPE_RAW_QUERY, > SUPPORTS_STREAM_TYPE_GROUPED_QUERY, > SUPPORTS_GROUP_ARCHIVAL, > SUPPORTS_GROUP_QUERY, > SUPPORTS_LOG_ARCHIVAL, > SUPPORTS_LOG_QUERY, > SUPPORTS_CONTINUOUS_MODS, > SUPPORTS_PERIODIC_MODS, > SUPPORTS_CONTINUOUS_GROUP_MODS, > SUPPORTS_PERIODIC_GROUP_MODS, >}; > >enum StreamType { > > STREAM_TYPE_CONTINUOUS = 1, > STREAM_TYPE_PERIODIC = 2, > STREAM_TYPE_EVENT = 3, > > > STREAM_TYPE_METRIC = 4, > STREAM_TYPE_RAW = 6, > > > STREAM_TYPE_GROUPED_CONTINUOUS = 7, > STREAM_TYPE_GROUPED_PERIODIC = 8, > STREAM_TYPE_GROUPED_EVENT = 9, >}; > >enum UserModType { > MOD_TYPE_UNKNOWN, > MOD_TYPE_DURATION, > MOD_TYPE_UNTIL_CHANGE, >}; > > > > > >static const OSII_INT64 MAXIMUM_UNTIL_CHANGE_DURATION_MS = 3600000; > >static const OSII_INT64 DEFAULT_ZLIB_COMPRESS_SIZE = 20480000; >static const OSII_INT64 DEFAULT_LZ4_COMPRESS_SIZE = 4096; ># 136 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" >extern "C" { ># 151 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" >extern OSII_DOUBLE get_time_as_double(void); >extern OSII_INT64 utc_time_ms(void); >extern OSII_INT64 utc_time_us(void); >extern OSII_INT64 get_next_ref_write_time_us(OSII_INT64 curr_time_us); >extern OSII_INT64 get_curr_ref_write_time_us(OSII_INT64 curr_time_us); > > > >extern OSII_BOOL does_file_exist(const OSII_CHAR *filename); >extern OSII_INT64 get_file_size( FILE * file ); ># 181 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h" >OSII_BOOL IsFeatureLicensed(char* category, char* feature, char *errorMessage, size_t bufferSize); > > > >} > >extern std::string get_program_name(); >extern std::string get_host_name(); > >extern std::vector<std::string> hsh_tokenize_string( const std::string &input, const std::string &delim ); >extern std::string hsh_bytes_to_hex_string(const OSII_BYTE *bytes, size_t num_bytes); > >extern OSII_RETCODE delete_dir_contents(const std::string &dir_path); >extern OSII_RETCODE get_files_in_dir(const std::string &dir_path, std::vector<std::string> &fnames, OSII_BOOL use_full_path = 0); > >OSII_RETCODE hsh_stoll(const std::string &str, OSII_INT64 &val, OSII_INT32 base = 10); >OSII_RETCODE hsh_stoull(const std::string &str, OSII_UINT64 &val, OSII_INT32 base = 10); >OSII_RETCODE hsh_stod(const std::string &str, OSII_DOUBLE &val); > > >class LiteralNodeValue >{ >public: > enum LiteralType { > LITERAL_TYPE_DOUBLE = 0, > LITERAL_TYPE_INTEGER, > LITERAL_TYPE_STRING, > LITERAL_TYPE_BOOLEAN, > LITERAL_TYPE_NUMBER, > LITERAL_TYPE_PARAMETER, > LITERAL_TYPE_NONE, > LITERAL_TYPE_SIGNED_INTEGER, > LITERAL_TYPE_UNSIGNED_INTEGER, > LITERAL_TYPE_ARRAY > }; > > LiteralType literal_type; > > std::string string_val; > OSII_DOUBLE double_val; > OSII_INT64 int_val; > OSII_UINT64 uint_val; > std::vector<LiteralNodeValue> array_val; > >private: > void set_value(const LiteralNodeValue &val); > void set_double_value(OSII_DOUBLE val); > void set_signed_integer_value(OSII_INT64 val); > void set_unsigned_integer_value(OSII_UINT64 val); > void set_boolean_value(OSII_BOOL val); > void set_string_value(const std::string &val); > void set_array_value(const std::vector<LiteralNodeValue> &val); > void set_empty_value(); > >public: > static LiteralNodeValue create_double_value(OSII_DOUBLE val) { > LiteralNodeValue node_val(LITERAL_TYPE_DOUBLE); > node_val.double_val = val; > return node_val; > } > > static LiteralNodeValue create_signed_integer_value(OSII_INT64 val) { > LiteralNodeValue node_val(LITERAL_TYPE_SIGNED_INTEGER); > node_val.int_val = val; > return node_val; > } > > static LiteralNodeValue create_unsigned_integer_value(OSII_UINT64 val) { > LiteralNodeValue node_val(LITERAL_TYPE_UNSIGNED_INTEGER); > node_val.uint_val = val; > return node_val; > } > > static LiteralNodeValue create_boolean_value(OSII_BOOL val) { > LiteralNodeValue node_val(LITERAL_TYPE_BOOLEAN); > node_val.int_val = val; > return node_val; > } > > static LiteralNodeValue create_string_value(const std::string &val) { > LiteralNodeValue node_val(LITERAL_TYPE_STRING); > node_val.string_val = val; > return node_val; > } > > static LiteralNodeValue create_string_value(std::string &&val) { > LiteralNodeValue node_val(LITERAL_TYPE_STRING); > node_val.string_val = std::move(val); > return node_val; > } > > static LiteralNodeValue create_array_value(const std::vector<LiteralNodeValue> &val) { > LiteralNodeValue node_val(LITERAL_TYPE_ARRAY); > node_val.array_val = val; > return node_val; > } > > static LiteralNodeValue create_array_value(std::vector<LiteralNodeValue> &&val) { > LiteralNodeValue node_val(LITERAL_TYPE_ARRAY); > node_val.array_val = std::move(val); > return node_val; > } > > static LiteralNodeValue create_empty_value() { > return LiteralNodeValue(); > } > > static OSII_BOOL equals_type(LiteralType left_type, LiteralType right_type); > static LiteralType get_least_restrictive(LiteralType left_type, LiteralType right_type); > > LiteralNodeValue() : > literal_type(LITERAL_TYPE_NONE) > {} > > explicit LiteralNodeValue(LiteralType literal_type) : > literal_type(literal_type) > {} > > std::string value_as_string(); > > OSII_RETCODE get_double(OSII_DOUBLE &ret_val, std::string &problem_text) const; > OSII_RETCODE get_int(OSII_INT64 &ret_val, std::string &problem_text) const; > OSII_RETCODE get_uint(OSII_INT64 &ret_val, std::string &problem_text) const; > OSII_RETCODE get_bool(OSII_BOOL &ret_val, std::string &problem_text) const; > OSII_RETCODE get_string(std::string &ret_val, std::string &problem_text) const; > OSII_RETCODE get_array(std::vector<LiteralNodeValue> &ret_val, std::string &problem_text) const; > > OSII_RETCODE check_ternary_if(std::string &problem_text); > > OSII_RETCODE or_bool(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE and_bool(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE not_bool(std::string &problem_text); > OSII_RETCODE complement(std::string &problem_text); > > OSII_RETCODE bitwise_and(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE bitwise_or(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE bitwise_xor(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE right_shift(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE left_shift(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE greater_than(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE greater_than_equal_to(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE less_than(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE less_than_equal_to(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE equal_to(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE not_equal_to(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE add(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE subtract(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE concat(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE multiply(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE divide(const LiteralNodeValue &right, std::string &problem_text); > OSII_RETCODE mod(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE negative(std::string &problem_text); > OSII_RETCODE positive(std::string &problem_text); > > OSII_RETCODE power(const LiteralNodeValue &right, std::string &problem_text); > > OSII_RETCODE to_num(std::string &problem_text); > > OSII_RETCODE to_string(std::string &problem_text); > OSII_RETCODE string_length(std::string &problem_text); > OSII_RETCODE substring(const LiteralNodeValue &start, const LiteralNodeValue &end, std::string &problem_text); > OSII_RETCODE string_find(const LiteralNodeValue &substr, const LiteralNodeValue &start, std::string &problem_text); > OSII_RETCODE string_find_nth(const LiteralNodeValue &substr, const LiteralNodeValue &n, const LiteralNodeValue &start, std::string &problem_text); > OSII_RETCODE string_replace(const LiteralNodeValue &to_string, const LiteralNodeValue &start, const LiteralNodeValue &end, std::string &problem_text); > OSII_RETCODE substring_replace(const LiteralNodeValue &from_string, const LiteralNodeValue &to_string, const LiteralNodeValue &start, std::string &problem_text); > OSII_RETCODE substring_replace_all(const LiteralNodeValue &from_val, const LiteralNodeValue &to_string, const LiteralNodeValue &start, std::string &problem_text); > OSII_RETCODE to_upper(std::string &problem_text); > OSII_RETCODE to_lower(std::string &problem_text); > OSII_RETCODE trim(std::string &problem_text); > OSII_RETCODE ltrim(std::string &problem_text); > OSII_RETCODE rtrim(std::string &problem_text); > OSII_RETCODE lpad(const LiteralNodeValue &pad_string, const LiteralNodeValue &n, std::string &problem_text); > OSII_RETCODE rpad(const LiteralNodeValue &pad_string, const LiteralNodeValue &n, std::string &problem_text); > > static size_t internal_find_nth(const std::string &str, const std::string &substr, OSII_INT64 nth, OSII_INT64 start); > > OSII_RETCODE array_at(const LiteralNodeValue &index, std::string &problem_text); > OSII_RETCODE array_length(std::string &problem_text); > OSII_RETCODE subarray(const LiteralNodeValue &start, const LiteralNodeValue &end, std::string &problem_text); > OSII_RETCODE array_find(const LiteralNodeValue &value, const LiteralNodeValue &start, std::string &problem_text); >}; > > > >class TransactionIDGenerator >{ >private: > ChronusMutex trns_id_mutex; > OSII_INT64 last_base_time_ms; > OSII_INT32 trns_instance_count; > OSII_INT16 process_num; > >public: > TransactionIDGenerator(OSII_INT16 process_num) : last_base_time_ms(0), trns_instance_count(0), process_num(process_num) {} > > OSII_INT64 generate_trns_id() { > > > > > > > trns_id_mutex.wait(); > OSII_INT64 base_time_ms = utc_time_ms(); > if (base_time_ms <= last_base_time_ms) { > if (++trns_instance_count >= 64) { > > > while ((base_time_ms = utc_time_ms()) <= last_base_time_ms); > trns_instance_count = 0; > } > } else { > trns_instance_count = 0; > last_base_time_ms = base_time_ms; > } > OSII_INT64 ret_val = (1ll << 60) | (((OSII_INT64)(process_num & 0xFFF)) << 48) | ((base_time_ms & 0x3FFFFFFFFFF) << 6) | (trns_instance_count & 0x3F); > trns_id_mutex.notify(); > > return ret_val; > } > > static OSII_INT64 extract_utc_time_ms(OSII_INT64 trns_id) { > return (trns_id & 0x0000FFFFFFFFFFC0) >> 6; > } >}; > >class IGenericValue { >public: > virtual ~IGenericValue() {} > enum ValueType { > VALUE_TYPE_INVALID = -1, > VALUE_TYPE_NONE = 0, > VALUE_TYPE_INT = 1, > VALUE_TYPE_DOUBLE = 2, > VALUE_TYPE_STRING = 3, > VALUE_TYPE_FLOAT = 4, > VALUE_TYPE_UINT = 5 > }; > > virtual IGenericValue *create_deep_copy() = 0; > virtual IGenericValue *clone() const = 0; > virtual ValueType get_value_type() const = 0; > virtual void release() const = 0 ; > virtual std::string to_string() const = 0; > virtual OSII_DOUBLE to_double() const = 0; > virtual OSII_INT64 to_int() const = 0; > virtual OSII_UINT64 to_uint() const = 0; > virtual OSII_FLOAT to_float() const = 0; > virtual OSII_BOOL equals(const IGenericValue *comp) const = 0; >}; > >class DoubleValue : public IGenericValue { >private: > static MempoolClassAllocator<DoubleValue> allocator; > double value; > > explicit DoubleValue(double value) : value(value) {} > >public: > static DoubleValue *create(double value) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) DoubleValue(value);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 446, e.what() ); (allocator).destroy_no_destruct((DoubleValue *)ret_val); return __null; } }; > } > static void destroy(DoubleValue *data) {allocator.destroy(data);} > virtual IGenericValue *clone() const override {return allocator.create_fast_copy((DoubleValue *)this);} > > virtual IGenericValue *create_deep_copy() override { > return DoubleValue::create(value); > } > > virtual ValueType get_value_type() const override { return VALUE_TYPE_DOUBLE; } > double get_value() { return value; } > virtual void release() const override { destroy((DoubleValue *)this); } > virtual std::string to_string() const override { return std::to_string(value); } > virtual OSII_DOUBLE to_double() const override { return value; } > virtual OSII_INT64 to_int() const override { return (OSII_INT64)value; } > virtual OSII_UINT64 to_uint() const override { return (OSII_UINT64)value; } > virtual OSII_FLOAT to_float() const override { return (OSII_FLOAT)value; } > virtual OSII_BOOL equals(const IGenericValue *comp) const override {return (comp->get_value_type() == VALUE_TYPE_DOUBLE ? ((DoubleValue *)comp)->get_value() == value : 0);} >}; > >class IntValue : public IGenericValue { >private: > static MempoolClassAllocator<IntValue> allocator; > OSII_INT64 value; > > explicit IntValue(OSII_INT64 value) : value(value) {} > >public: > static IntValue *create(OSII_INT64 value) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) IntValue(value);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 475, e.what() ); (allocator).destroy_no_destruct((IntValue *)ret_val); return __null; } }; > } > static void destroy(IntValue *data) {allocator.destroy(data);} > virtual IGenericValue *clone() const override {return allocator.create_fast_copy((IntValue *)this);} > > virtual IGenericValue *create_deep_copy() override { > return IntValue::create(value); > } > > virtual ValueType get_value_type() const override { return VALUE_TYPE_INT; } > OSII_INT64 get_value() { return value; } > virtual void release() const override {destroy((IntValue *)this);} > virtual std::string to_string() const override { return std::to_string(value); } > virtual OSII_DOUBLE to_double() const override { return (OSII_DOUBLE)value; } > virtual OSII_INT64 to_int() const override { return value; } > virtual OSII_UINT64 to_uint() const override { return (OSII_UINT64)value; } > virtual OSII_FLOAT to_float() const override { return (OSII_FLOAT)value; } > virtual OSII_BOOL equals(const IGenericValue *comp) const override { return (comp->get_value_type() == VALUE_TYPE_INT ? ((IntValue *)comp)->get_value() == value : 0); } >}; > >class UIntValue : public IGenericValue { >private: > static MempoolClassAllocator<UIntValue> allocator; > OSII_UINT64 value; > > explicit UIntValue(OSII_UINT64 value) : value(value) {} > >public: > static UIntValue *create(OSII_UINT64 value) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) UIntValue(value);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 504, e.what() ); (allocator).destroy_no_destruct((UIntValue *)ret_val); return __null; } }; > } > static void destroy(UIntValue *data) {allocator.destroy(data);} > virtual IGenericValue *clone() const override {return allocator.create_fast_copy((UIntValue *)this);} > > virtual IGenericValue *create_deep_copy() override { > return IntValue::create(value); > } > > virtual ValueType get_value_type() const override { return VALUE_TYPE_UINT; } > OSII_UINT64 get_value() { return value; } > virtual void release() const override {destroy((UIntValue *)this);} > virtual std::string to_string() const override { return std::to_string(value); } > virtual OSII_DOUBLE to_double() const override { return (OSII_DOUBLE)value; } > virtual OSII_INT64 to_int() const override { return (OSII_INT64)value; } > virtual OSII_UINT64 to_uint() const override { return value; } > virtual OSII_FLOAT to_float() const override { return (OSII_FLOAT)value; } > virtual OSII_BOOL equals(const IGenericValue *comp) const override { return (comp->get_value_type() == VALUE_TYPE_UINT ? ((UIntValue *)comp)->get_value() == value : 0); } >}; > >class StringValue : public IGenericValue { >private: > static MempoolClassAllocator<StringValue> allocator; > std::string value; > > explicit StringValue(const std::string &value) : value(value) {} > >public: > static StringValue *create(const std::string &value) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) StringValue(value);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 533, e.what() ); (allocator).destroy_no_destruct((StringValue *)ret_val); return __null; } }; > } > static void destroy(StringValue *data) {allocator.destroy(data);} > virtual IGenericValue *clone() const override { return allocator.create_fast_copy((StringValue *)this); } > > virtual IGenericValue *create_deep_copy() override { > return StringValue::create(value); > } > > virtual ValueType get_value_type() const override {return VALUE_TYPE_STRING;} > const std::string &get_value() { return value; } > virtual void release() const override { destroy((StringValue *)this); } > virtual std::string to_string() const override { > return value; > } > virtual OSII_DOUBLE to_double() const override { return 0.0; } > virtual OSII_INT64 to_int() const override { return 0; } > virtual OSII_UINT64 to_uint() const override { return 0; } > virtual OSII_FLOAT to_float() const override { return 0.0; } > virtual OSII_BOOL equals(const IGenericValue *comp) const override {return (comp->get_value_type() == VALUE_TYPE_STRING ? ((StringValue *)comp)->get_value() == value : 0);} >}; > >class FloatValue : public IGenericValue { >private: > static MempoolClassAllocator<FloatValue> allocator; > float value; > > explicit FloatValue(float value) : value(value) {} > >public: > static FloatValue *create(float value) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) FloatValue(value);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 564, e.what() ); (allocator).destroy_no_destruct((FloatValue *)ret_val); return __null; } }; > } > static void destroy(FloatValue *data) { allocator.destroy(data); } > virtual IGenericValue *clone() const override { return allocator.create_fast_copy((FloatValue *)this); } > > virtual IGenericValue *create_deep_copy() override { > return FloatValue::create(value); > } > > virtual ValueType get_value_type() const override { return VALUE_TYPE_FLOAT; } > float get_value() { return value; } > virtual void release() const override { destroy((FloatValue *)this); } > virtual std::string to_string() const override { return std::to_string(value); } > virtual OSII_DOUBLE to_double() const override { return value; } > virtual OSII_FLOAT to_float() const override { return value; } > virtual OSII_INT64 to_int() const override { return (OSII_INT64)value; } > virtual OSII_UINT64 to_uint() const override { return (OSII_UINT64)value; } > virtual OSII_BOOL equals(const IGenericValue *comp) const override { return (comp->get_value_type() == VALUE_TYPE_FLOAT ? ((FloatValue *)comp)->get_value() == value : 0); } >}; > >template <class X,class Y> >class PairHash { >public: > size_t operator()(const std::pair<X, Y> &key_value) const noexcept(hsh::conjunction<hsh::is_nothrow_hashable<X>, hsh::is_nothrow_hashable<Y>>::value) > { > return hsh::hash_combine(key_value.first, key_value.second); > } >}; > > >template <class T> >class HSHThreadSafeQueue{ >private: > struct Node { > public: > Node() : next(__null) { } > T value; > Node* next; > }; > > static MempoolClassAllocatorNoDeepCopy<Node> node_pool; > HSHThreadSafeQueue(const HSHThreadSafeQueue&) = delete; HSHThreadSafeQueue& operator=(const HSHThreadSafeQueue&) = delete; HSHThreadSafeQueue(HSHThreadSafeQueue&&) = delete; > >private: > Node* write; > Node *read; > ChronusMutex mutex; > >public: > HSHThreadSafeQueue() : write(__null), read(__null) {} > ~HSHThreadSafeQueue() { > while(read != __null) { > Node* tmp = read; > read = read->next; > node_pool.destroy(tmp); > } > read = write = __null; > } > > OSII_BOOL produce(const T& t) { > mutex.wait(); > Node *node = __null; > { void *_data = (node_pool).create_no_construct(); if (__null == _data) { node = __null; } else { try { node = new (_data) Node(); } catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 626, e.what() ); (node_pool).destroy_no_destruct((Node *)_data); node = __null; } } }; > if (node == __null) { > HSHLogger::LOG("Failed to allocate queue node", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 628 ); > mutex.notify(); > return 0; > } > node->value = t; > > if (write == __null) { > write = node; > read = node; > } else { > write->next = node; > write = node; > } > mutex.notify(); > return 1; > } > > OSII_BOOL is_empty() const { > return (read == __null); > } > > OSII_BOOL consume(T& result) { > mutex.wait(); > if (read == __null) { > mutex.notify(); > return 0; > } > > result = read->value; > Node *removed = read; > read = read->next; > if (read == __null) { > write = __null; > } > node_pool.destroy(removed); > removed = __null; > mutex.notify(); > return 1; > } >}; > > >template <class T> MempoolClassAllocatorNoDeepCopy<typename HSHThreadSafeQueue<T>::Node> HSHThreadSafeQueue<T>::node_pool(10000, std::string("ThreadSafeQueueNode: ") + std::string(typeid(T).name())); > >class IHSHCSVFile { >public: > static IHSHCSVFile *create_csv_file(const std::string &filename_n_path, const std::string &read_write); > static void destroy_csv_file(IHSHCSVFile *file); > > virtual ~IHSHCSVFile() {} > > virtual OSII_RETCODE open() = 0; > virtual OSII_BOOL is_open() const = 0; > virtual OSII_BOOL is_write() const = 0; > > virtual std::vector<std::string> *get_next_line_tokens(std::vector<std::string> *input_line) = 0; > virtual OSII_RETCODE add_line(const std::vector<std::string> & tokens) = 0; > virtual void commit_file() = 0; >}; > >class ChronusScopedMutex { >private: > union { > OSII_MUTEX *osi_mutex; > ChronusMutex *c_mutex; > } m_mutex; > > OSII_BOOL is_chronus_mutex; > >private: > ChronusScopedMutex(const ChronusScopedMutex&) = delete; ChronusScopedMutex& operator=(const ChronusScopedMutex&) = delete; ChronusScopedMutex(ChronusScopedMutex&&) = delete;; > >public: > ChronusScopedMutex(OSII_MUTEX *mutex) : is_chronus_mutex(0) { > m_mutex.osi_mutex = mutex; > ( ( ( m_mutex.osi_mutex ) && ! pthread_mutex_lock( m_mutex.osi_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); > } > > ChronusScopedMutex(ChronusMutex &mutex) : is_chronus_mutex(1) { > m_mutex.c_mutex = &mutex; > m_mutex.c_mutex->wait(); > } > > ~ChronusScopedMutex() { > if ( is_chronus_mutex ){ > m_mutex.c_mutex->notify(); > }else { > ( ( ( m_mutex.osi_mutex ) && ! pthread_mutex_unlock( m_mutex.osi_mutex ) ) ? (( OSII_RETCODE )1) : (( OSII_RETCODE )0) ); > } > } >}; > >class IHSHMetricManager >{ >public: > class IHSHStandardMetric { > public: > virtual void archive_value(OSII_INT64 value) = 0; > }; > > class IHSHRunningAccumulatorMetric { > public: > virtual void increment(OSII_INT64 count) = 0; > virtual void reset() = 0; > }; > > class IHSHDeltaAccumulatorMetric { > public: > virtual void increment(OSII_INT64 count) = 0; > }; > > virtual ~IHSHMetricManager() {} > > virtual IHSHStandardMetric *register_standard_metric(const std::string &metric, IGenericValue::ValueType value_type) = 0; > virtual IHSHRunningAccumulatorMetric *register_running_accumulator_metric(const std::string &metric, OSII_INT32 period_ms, IGenericValue::ValueType value_type) = 0; > virtual IHSHDeltaAccumulatorMetric *register_delta_accumulator_metric(const std::string &metric, OSII_INT32 period_ms, IGenericValue::ValueType value_type) = 0; > > virtual void deregister_standard_metric(IHSHStandardMetric *metric) = 0; > virtual void deregister_running_accumulator_metric(IHSHRunningAccumulatorMetric *metric) = 0; > virtual void deregister_delta_accumulator_metric(IHSHDeltaAccumulatorMetric *metric) = 0; >}; > > >class NaiveXMLDocument >{ >public: > class NXMLElement > { > private: > std::string name; > std::string text; > std::map<std::string, std::string> attrs; > std::vector<std::pair<std::string, std::unique_ptr<NXMLElement>>> children; > > public: > NXMLElement() = default; > NXMLElement(void *node); > ~NXMLElement() = default; > > > NXMLElement &operator =(const NXMLElement &ref); > NXMLElement(const NXMLElement &ref); > > const std::string &get_name() const {return name;} > const std::string &get_text() const {return text;} > const std::map<std::string, std::string> &get_attrs() const {return attrs;} > const std::vector<std::pair<std::string, std::unique_ptr<NXMLElement>>> &get_children() const { return children; } > > const NXMLElement *get_first_child_by_name(const std::string &node_name) const; > OSII_RETCODE get_first_text_value_by_name(const std::string &node_name, std::string &val) const; > OSII_RETCODE get_first_int64_value_by_name(const std::string &node_name, OSII_INT64 &val) const; > OSII_RETCODE get_first_double_value_by_name(const std::string &node_name, OSII_DOUBLE &val) const; > OSII_RETCODE get_first_bool_value_by_name(const std::string &node_name, OSII_BOOL &val) const; > OSII_RETCODE get_first_uint32_value_by_name(const std::string &node_name, OSII_UINT32 &val) const; > }; > >private: > std::string xml_file_n_path; > std::unique_ptr<NXMLElement> root; > >public: > NaiveXMLDocument(const std::string &xml_file_n_path); > ~NaiveXMLDocument() = default; > > const NXMLElement *get_root() const { return root.get(); } > const std::string &get_xml_file_n_path() const { return xml_file_n_path; } >}; > >class ClusterConfig { >public: > class ParsedPluginSettings { > public: > ParsedPluginSettings() = default; > ParsedPluginSettings(const std::string &type_str, NaiveXMLDocument::NXMLElement &parsed_data) : plugin_type_str(type_str), parsed_data(parsed_data) {} > > std::string plugin_type_str; > NaiveXMLDocument::NXMLElement parsed_data; > }; > > class GlobalSettings { > public: > std::string dcds_name; > std::string file_version; > OSII_INT64 xml_save_time_sec; > std::string last_save_host; > > std::map<std::string, ParsedPluginSettings> collector_plugin_settings; > std::map<std::string, ParsedPluginSettings> cds_plugin_settings; > std::map<std::string, ParsedPluginSettings> datacenter_plugin_settings; > std::map<std::string, ParsedPluginSettings> query_target_plugin_settings; > std::map<std::string, std::string> dll_filenames; > > std::string get_dll_name(const std::string &node_type) const; > }; > > class CollectorSettings { > public: > class ServerConnectionInfo > { > public: > std::string cds; > OSII_BOOL use_default_domain; > std::string domain; > }; > > std::string host; > OSII_UINT32 ip; > > std::string collector_type_name; > std::string name; > std::map<std::string, ParsedPluginSettings> plugin_settings; > std::string alarm_domain_name; > OSII_BYTE alarm_AOR; > OSII_UINT32 alarm_station_num; > OSII_UINT32 alarm_class; > std::vector<ServerConnectionInfo> server_connection_infos; > std::vector<std::string> cds_names; > std::string buffer_path; > OSII_BOOL is_disconnected_on_startup_enabled; > OSII_BOOL is_buffer_monitoring_enabled; > OSII_UINT32 buffer_directory_size_mb; > OSII_DOUBLE buffer_limit_one; > OSII_DOUBLE buffer_limit_two; > OSII_DOUBLE buffer_limit_three; > OSII_BOOL is_event_timestamp_checking_enabled; > OSII_UINT32 max_event_days_old; > OSII_UINT32 max_cpids_per_request; > OSII_UINT32 max_enums_per_request; > OSII_UINT32 max_data_transactions; > OSII_UINT32 max_buffered_transactions; > OSII_UINT32 min_buffered_transactions; > OSII_UINT32 archive_transaction_timeout_ms; > OSII_UINT32 poll_timeout_ms; > OSII_UINT32 health_timeout_ms; > OSII_UINT32 status_check_poll_period_ms; > std::string log_prefix; > OSII_INT32 default_aor_group; > }; > > > class CDSArchivalServerSettings { > public: > std::string host; > OSII_BOOL use_default_domain; > std::string domain; > OSII_UINT32 ip; > OSII_UINT32 cpid_block_start; > OSII_UINT32 cpid_block_size; > OSII_UINT32 alarm_aor; > OSII_UINT32 alarm_station_num; > OSII_UINT32 alarm_class; > > std::string log_prefix; > > std::map<std::string, ParsedPluginSettings> plugin_settings; > }; > > class CDSQueryServerSettings { > public: > std::string server_id; > std::string host; > OSII_BOOL use_default_domain; > std::string domain; > OSII_UINT32 ip; > OSII_UINT32 alarm_aor; > OSII_UINT32 alarm_station_num; > OSII_UINT32 alarm_class; > > std::string log_prefix; > > std::map<std::string, ParsedPluginSettings> cds_plugin_settings; > std::map<std::string, ParsedPluginSettings> query_plugin_settings; > }; > > class CDSQueryTarget { > public: > std::string target_type; > > std::map<std::string, CDSQueryServerSettings> server_settings; > std::map<std::string, ParsedPluginSettings> query_plugin_settings; > }; > > class CDSSettings { > public: > std::string name; > std::string plugin_name; > std::map<std::string, ParsedPluginSettings> plugin_settings; > > std::vector<CDSArchivalServerSettings> archival_server_settings; > std::vector<CDSQueryTarget> query_target_settings; > > OSII_RETCODE get_cds_archival_server_info_by_ip(OSII_UINT32 ip, const ClusterConfig::CDSArchivalServerSettings *&settings) const; > OSII_RETCODE get_query_settings(const std::string &target_type, const std::string &server_id, const CDSQueryTarget *&query_target, const CDSQueryServerSettings *&query_server) const; > }; > > class DatacenterNodeSettings { > public: > std::string host; > OSII_UINT32 ip; > OSII_UINT32 port; > std::map<std::string, ParsedPluginSettings> plugin_settings; > }; > > class DatacenterSettings { > public: > std::string name; > > std::string plugin_name; > std::map<std::string, ParsedPluginSettings> plugin_settings; > > std::vector<DatacenterNodeSettings> nodes; > > OSII_RETCODE get_datacenter_node_info_by_ip(OSII_UINT32 ip, const ClusterConfig::DatacenterNodeSettings *&settings) const; > }; > >private: > static MempoolClassAllocatorNoDeepCopy<ClusterConfig> allocator; > ClusterConfig(const ClusterConfig&) = delete; ClusterConfig& operator=(const ClusterConfig&) = delete; ClusterConfig(ClusterConfig&&) = delete;; > ClusterConfig(const std::string &cluster_xml_file_n_path); > > OSII_RETCODE parse_root(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_dcds(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_globals(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_collectors(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_collector(const NaiveXMLDocument::NXMLElement *elm, CollectorSettings *settings); > OSII_RETCODE parse_cdses(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_cds(const NaiveXMLDocument::NXMLElement *elm, CDSSettings *settings); > OSII_RETCODE parse_query_target(const NaiveXMLDocument::NXMLElement *elm, CDSQueryTarget *settings); > OSII_RETCODE parse_cds_query_server(const NaiveXMLDocument::NXMLElement *elm, CDSQueryServerSettings *settings); > OSII_RETCODE parse_cds_archival_server(const NaiveXMLDocument::NXMLElement *elm, CDSArchivalServerSettings *settings); > OSII_RETCODE parse_datacenters(const NaiveXMLDocument::NXMLElement *elm); > OSII_RETCODE parse_datacenter(const NaiveXMLDocument::NXMLElement *elm, DatacenterSettings *settings); > OSII_RETCODE parse_datacenter_nodes(const NaiveXMLDocument::NXMLElement *elm, DatacenterSettings *settings); > OSII_RETCODE parse_datacenter_node(const NaiveXMLDocument::NXMLElement *elm, DatacenterNodeSettings *settings); > > OSII_RETCODE parse_plugin_settings(const NaiveXMLDocument::NXMLElement *elm, std::map<std::string, ParsedPluginSettings> &plugin_settings); > > GlobalSettings global_settings; > std::vector<CollectorSettings> collector_settings; > std::vector<CDSSettings> cds_settings; > std::vector<DatacenterSettings> datacenter_settings; > > >public: > static ClusterConfig *create(const std::string &cluster_xml_file_n_path) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) ClusterConfig(cluster_xml_file_n_path);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 973, e.what() ); (allocator).destroy_no_destruct((ClusterConfig *)ret_val); return __null; } }; > } > static void destroy(ClusterConfig *val) { > allocator.destroy(val); > } > ~ClusterConfig(); > > OSII_RETCODE get_cds_info_by_name(const std::string &cds, const ClusterConfig::CDSSettings *&settings) const; > OSII_RETCODE get_datacenter_info_by_name(const std::string &name, const DatacenterSettings *&settings) const; > > const GlobalSettings &get_global_settings() const { return global_settings; } > const CollectorSettings &get_collector_settings(OSII_INT32 index) const { return collector_settings[index]; } > const std::vector<CollectorSettings > &get_all_collector_settings() const { return collector_settings; } > const CDSSettings &get_cds_settings(OSII_INT32 index) const { return cds_settings[index]; } > const std::vector<CDSSettings> &get_all_cds_settings() const { return cds_settings; } > const DatacenterSettings &get_datacenter_settings(OSII_INT32 index) const { return datacenter_settings[index]; } > const std::vector<DatacenterSettings> &get_all_datacenter_settings() const { return datacenter_settings; } > > static OSII_UINT32 read_ip_from_host(const std::string &xml_host_text); > static std::string get_text_ip(OSII_UINT32 ip); > static std::vector<OSII_UINT32> get_host_ips(const std::string &hostname); > static std::vector<std::string> get_host_text_ips(const std::string &hostname); >}; > >class EnumTable { >private: > static MempoolClassAllocatorNoDeepCopy<EnumTable> allocator; > EnumTable(const EnumTable&) = delete; EnumTable& operator=(const EnumTable&) = delete; EnumTable(EnumTable&&) = delete; > > explicit EnumTable(const std::string &table_name); > EnumTable(const std::string &table_name, const std::map<OSII_INT32, std::string> &value); > > std::string table_name; > std::map<OSII_INT32,std::string> table; > >public: > EnumTable(); > ~EnumTable(); > > bool operator==(const EnumTable &ref); > > > static EnumTable *create(const std::string &table_name); > static EnumTable *create(const std::string &table_name, const std::map<OSII_INT32, std::string> &value); > > static void destroy(EnumTable *data); > > const std::string &get_table_name() const {return table_name;} > const std::map<OSII_INT32, std::string> &get_values() const {return table;} > std::string get_value(OSII_INT32) const; > OSII_RETCODE add_pair(OSII_INT32 key, const std::string &value); >}; > >class FKeyData >{ >public: > FKeyData(const char* fkey, const char* uid, const char* recording_id) > : _fkey(fkey), _uid(uid), _recording_id(recording_id) {} > FKeyData(const std::string &fkey, const std::string &uid, const std::string &recording_id) > : _fkey(fkey), _uid(uid), _recording_id(recording_id) {} > FKeyData(std::string &&fkey, std::string &&uid, std::string &&recording_id) > : _fkey(std::move(fkey)), _uid(std::move(uid)), _recording_id(std::move(recording_id)) {} > > const std::string &fkey() const noexcept {return _fkey;} > const std::string &uid() const noexcept {return _uid;} > const std::string &recording_id() const noexcept {return _recording_id;} > > const hsh::optional<std::string>& attr() const noexcept {return _attr;} > > const hsh::optional<std::string>& parent_uid() const noexcept {return _parent_uid;} > const hsh::optional<std::string>& parent_recording_id() const noexcept {return _parent_recording_id;} > > void set_attr(const char* attr) {_attr = attr;} > void set_attr(const std::string &attr) {_attr = attr;} > void set_attr(std::string &&attr) noexcept {_attr = std::move(attr);} > > void set_parent_uid(const char* parent_uid) {_parent_uid = parent_uid;} > void set_parent_uid(const std::string &parent_uid) {_parent_uid = parent_uid;} > void set_parent_uid(std::string &&parent_uid) noexcept {_parent_uid = std::move(parent_uid);} > > void set_parent_recording_id(const char* parent_recording_id) {_parent_recording_id = parent_recording_id;} > void set_parent_recording_id(const std::string &parent_recording_id) {_parent_recording_id = parent_recording_id;} > void set_parent_recording_id(std::string &&parent_recording_id) noexcept {_parent_recording_id = std::move(parent_recording_id);} > >private: > std::string _fkey; > std::string _uid; > std::string _recording_id; > > hsh::optional<std::string> _attr; > hsh::optional<std::string> _parent_uid; > hsh::optional<std::string> _parent_recording_id; >}; > >class DataIntegrityMonitor { >protected: > enum IntegrityMonitorState { > INTEGRITY_MONITOR_DISABLED, > INTEGRITY_MONITOR_BAD_INTEGRITY, > INTEGRITY_MONITOR_BAD_QUALITY, > INTEGRITY_MONITOR_GOOD, > }; > enum IntegrityNODATASendState { > INTEGRITY_SEND_IDLE, > INTEGRITY_SEND_REQUIRED, > INTEGRITY_SEND_IN_PROGRESS, > }; > > OSII_INT64 integrity_write_timeout_ms; > OSII_INT64 server_start_time_us; > > ChronusMutex integrity_mutex; > IntegrityMonitorState integrity_monitor_state; > OSII_INT64 last_integrity_monitor_enable_disable_time_us; > > IntegrityNODATASendState nodata_state; > OSII_INT64 enqueued_nodata_time; > > OSII_BOOL integrity_write_outstanding; > OSII_INT64 enqueued_write_time; > > OSII_INT64 last_value_change_wall_time_us; > OSII_INT64 last_value_change_timestamp_us; > OSII_BOOL last_value_is_good; >private: > __attribute__((always_inline)) static MempoolClassAllocator<DataIntegrityMonitor> &allocator() > { > static MempoolClassAllocator<DataIntegrityMonitor> allocator(1000, "DataIntegrityMonitor"); > return allocator; > } > > __attribute__((always_inline)) static OSII_BOOL is_quality_good(CHRONUS_QUALITY quality) { return quality != CHRONUS_QUALITY_NODATA && quality != CHRONUS_QUALITY_STOPPED; } > > DataIntegrityMonitor(const DataIntegrityMonitor&) = delete; DataIntegrityMonitor& operator=(const DataIntegrityMonitor&) = delete; DataIntegrityMonitor(DataIntegrityMonitor&&) = delete;; > DataIntegrityMonitor(OSII_BOOL enable_integrity, OSII_INT64 enable_disable_time_us, OSII_INT64 integrity_write_timeout_ms, OSII_INT64 server_start_time_us); > >public: > static DataIntegrityMonitor* create(OSII_BOOL enable_integrity, OSII_INT64 enable_disable_time_us, OSII_INT64 integrity_write_timeout_ms, OSII_INT64 server_start_time_us) > { > { void *ret_val = (allocator()).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) DataIntegrityMonitor(enable_integrity, enable_disable_time_us, integrity_write_timeout_ms, server_start_time_us);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_common.h", 1112, e.what() ); (allocator()).destroy_no_destruct((DataIntegrityMonitor *)ret_val); return __null; } }; > } > static DataIntegrityMonitor *create_fast_copy(const DataIntegrityMonitor *input) > { > return allocator().create_fast_copy((DataIntegrityMonitor *)input); > } > static void destroy(DataIntegrityMonitor *monitor) > { > if (__null != monitor) > { > allocator().destroy(monitor); > } > } > > virtual ~DataIntegrityMonitor() {} > > void enable_integrity_monitor(OSII_INT64 enable_time_us); > void disable_integrity_monitor(OSII_INT64 disable_time_us); > > > void handle_data_write(OSII_BOOL is_reference, OSII_INT64 time_us, CHRONUS_QUALITY quality); > > void handle_integrity_data_write(OSII_INT64 time_us, CHRONUS_QUALITY quality, OSII_BOOL &write_me, OSII_INT64 &write_ref_time_us); > void handle_integrity_write_failure(OSII_INT64 nodata_time_us); > void handle_integrity_write_success(OSII_INT64 nodata_time_us); > > > void clear_last_change_time() {last_value_change_timestamp_us = 0;} > > > void process_detector(); > > OSII_BOOL is_integrity_nodata_required(OSII_INT64 &nodata_time_us); > void handle_integrity_nodata_failure(); > void handle_integrity_nodata_success(); > > OSII_INT64 get_integrity_timeout_ms() const { return integrity_write_timeout_ms; } > void update_timeout_time_ms(OSII_INT64 new_time_ms) { this->integrity_write_timeout_ms = new_time_ms; } > void set_integrity_send_in_progress() > { > integrity_mutex.wait(); > nodata_state = INTEGRITY_SEND_IN_PROGRESS; > integrity_mutex.notify(); > } >}; > >template <typename T> >class HSHIntRand >{ > static_assert(std::is_integral<T>::value, "HSHIntRand template parameter must be of integral type."); >private: > std::default_random_engine generator; > std::uniform_int_distribution<T> rand; > >public: > HSHIntRand() : generator((unsigned)utc_time_ms()), rand(std::numeric_limits<T>::min(), std::numeric_limits<T>::max()) {} > HSHIntRand(T min, T max, unsigned seed = utc_time_ms()) : generator(seed), rand(min, max) {} > > > T get_rand() { return rand(generator); } > > > T get_min() const { return rand.min(); } > > > T get_max() const { return rand.max(); } > > > std::vector<T> generate_randoms(size_t num_to_generate) { > std::vector<T> ret_val(num_to_generate, 0); > for (size_t index = 0; index < num_to_generate; index++) { > ret_val[index] = get_rand(); > } > return ret_val; > } >}; > >template <typename T> >class HSHDoubleRand >{ > static_assert(std::is_floating_point<T>::value, "HSHDoubleRand template parameter must be of type float, double, or long double"); >private: > std::default_random_engine generator; > std::uniform_real_distribution<T> rand; > >public: > HSHDoubleRand() : generator((unsigned)utc_time_ms()), rand(std::numeric_limits<T>::min(), std::numeric_limits<T>::max()) {} > HSHDoubleRand(T min, T max, unsigned seed = utc_time_ms()) : generator(seed), rand(min, max) {} > > > T get_rand() { return rand(generator); } > > > T get_min() const { return rand.min(); } > > > T get_max() const { return rand.max(); } > > > std::vector<T> generate_randoms(size_t num_to_generate) { > std::vector<T> ret_val(num_to_generate, 0); > for (size_t index = 0; index < num_to_generate; index++) { > ret_val[index] = get_rand(); > } > return ret_val; > } >}; > > >class IHSHFTPConnection { >public: > > > > > > > > OSII_BOOL check_is_connected(OSII_INT16 num_retries, OSII_INT64 sleep_per_failure_ms); > virtual OSII_RETCODE upload_file(const std::string &local_file_path, const std::string &remote_directory_path, const std::string &new_file_name, IHeartbeater *heartbeater = __null) = 0; > virtual OSII_RETCODE get_file(const std::string &local_file_path, const std::string &remote_file_path, IHeartbeater *heartbeater = __null) = 0; > virtual OSII_RETCODE get_directory_list(const std::string &remote_dir_path, std::vector<std::string> &file_names, std::vector<std::string> &dir_names) = 0; > virtual OSII_RETCODE rename_file(const std::string &remote_dir_path, const std::string &old_file_name, const std::string &new_file_name) = 0; > virtual OSII_RETCODE create_dir(const std::string &dir_path) = 0; > virtual OSII_RETCODE does_dir_exist(const std::string &dir_path, OSII_BOOL &dir_exists) = 0; > virtual OSII_RETCODE create_empty_file(const std::string &dir_path, const std::string &file_name) = 0; > virtual OSII_RETCODE get_file_size(const std::string &file_path, OSII_INT64 &num_bytes) = 0; >}; ># 3 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_HistorianQueryConnection.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/SarcConnectionCache.h" 1 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_time.h" 1 > > > ># 1 "/usr/include/assert.h" 1 3 4 ># 65 "/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__)); > > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_time.h" 2 > > >namespace hsh >{ > > using nanoseconds = std::chrono::nanoseconds; > using microseconds = std::chrono::microseconds; > using milliseconds = std::chrono::milliseconds; > using seconds = std::chrono::seconds; > using minutes = std::chrono::minutes; > using hours = std::chrono::hours; > > > > > using time_point = std::chrono::time_point<std::chrono::system_clock, microseconds>; > > > using days = std::chrono::duration<int32_t, std::ratio<86400>>; > using weeks = std::chrono::duration<int32_t, std::ratio<604800>>; > using years = std::chrono::duration<int32_t, std::ratio_multiply<std::ratio<146097, 400>, days::period>>; > using months = std::chrono::duration<int32_t, std::ratio_divide<years::period, std::ratio<12>>>; > > > using sys_days = std::chrono::time_point<std::chrono::system_clock, days>; > > class time_span > { > public: > > constexpr time_span(time_point start, time_point end) noexcept > : _start(start), _end(end) { } > > > template <class Rep, class Period > > constexpr time_span(time_point start, std::chrono::duration<Rep, Period> duration) > : _start(start), _end(start + duration) { } > > ~time_span() = default; > > constexpr time_point start() const noexcept { return _start; } > constexpr time_point end() const noexcept { return _end; } > > template <class To> > constexpr To duration() const noexcept { return std::chrono::duration_cast<To>(_end - _start); } > > private: > time_point _start; > time_point _end; > }; > > namespace time > { > inline time_point now() noexcept { > return std::chrono::time_point_cast<microseconds>(std::chrono::system_clock::now()); > } > > > template <class To, class Rep, class Period> > inline To floor(const std::chrono::duration<Rep, Period>& d) > { > To t = std::chrono::duration_cast<To>(d); > if (t > d) { > return t - To{ 1 }; > } > return t; > } > > template <class To, class Rep, class Period> > inline To ceil(const std::chrono::duration<Rep, Period>& d) > { > To t = std::chrono::duration_cast<To>(d); > if (t < d) { > return t + To{ 1 }; > } > return t; > } > > template <class Rep, class Period, class = enable_if_t<std::numeric_limits<Rep>::is_signed>> > inline std::chrono::duration<Rep, Period> abs(std::chrono::duration<Rep, Period> d) { > return d >= d.zero() ? d : -d; > } > > template <class To, class Clock, class FromDuration> > inline std::chrono::time_point<Clock, To> floor(const std::chrono::time_point<Clock, FromDuration>& tp) { > return std::chrono::time_point<Clock, To>{hsh::time::floor<To>(tp.time_since_epoch())}; > } > > template <class To, class Clock, class FromDuration> > inline std::chrono::time_point<Clock, To> ceil(const std::chrono::time_point<Clock, FromDuration>& tp) { > return std::chrono::time_point<Clock, To>{hsh::time::ceil<To>(tp.time_since_epoch())}; > } > > > template<class Rep, class Period> > inline size_t calc_num_intervals(time_span span, std::chrono::duration<Rep, Period> interval) { > ((interval.count() > 0) ? static_cast<void> (0) : __assert_fail ("interval.count() > 0", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_time.h", 101, __PRETTY_FUNCTION__)); > return span.duration<decltype(interval)>() / interval; > } > > > > > > inline time_point top_of_hour(time_point t) { return hsh::time::floor<hsh::hours>(t); } > inline time_point top_of_day(time_point t) { return hsh::time::floor<hsh::days>(t); } > } > >} > > > >constexpr hsh::nanoseconds operator "" _ns(unsigned long long ns) { > return hsh::nanoseconds(ns); >} > >constexpr std::chrono::duration<long double, std::nano> operator "" _ns(long double ns) { > return std::chrono::duration<long double, std::nano>(ns); >} > >constexpr hsh::microseconds operator "" _us(unsigned long long us) { > return hsh::microseconds(us); >} > >constexpr std::chrono::duration<long double, std::micro> operator "" _us(long double us) { > return std::chrono::duration<long double, std::micro>(us); >} > >constexpr hsh::milliseconds operator "" _ms(unsigned long long ms) { > return hsh::milliseconds(ms); >} > >constexpr std::chrono::duration<long double, std::milli> operator "" _ms(long double ms) { > return std::chrono::duration<long double, std::milli>(ms); >} > >constexpr hsh::seconds operator "" _sec(unsigned long long s){ > return hsh::seconds(s); >} > >constexpr std::chrono::duration<long double> operator "" _sec(long double s){ > return std::chrono::duration<long double>(s); >} > >constexpr hsh::minutes operator "" _min(unsigned long long m) { > return hsh::minutes(m); >} > >constexpr std::chrono::duration<long double, std::ratio<60, 1>> operator "" _min(long double m) { > return std::chrono::duration<long double, std::ratio<60, 1>>(m); >} > >constexpr hsh::hours operator "" _hr(unsigned long long h) { > return hsh::hours(h); >} > >constexpr std::chrono::duration<long double, std::ratio<3600, 1>> operator "" _hr(long double h) { > return std::chrono::duration<long double, std::ratio<3600, 1>>(h); >} > >constexpr hsh::days operator "" _days(unsigned long long day) { > return hsh::days(day); >} > >constexpr std::chrono::duration<long double, std::ratio<86400, 1>> operator "" _days(long double day) { > return std::chrono::duration<long double, std::ratio<86400, 1>>(day); >} > >constexpr hsh::weeks operator "" _weeks(unsigned long long wk) { > return hsh::weeks(wk); >} > >constexpr std::chrono::duration<long double, std::ratio<604800, 1>> operator "" _weeks(long double wk) { > return std::chrono::duration<long double, std::ratio<604800, 1>>(wk); >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/SarcConnectionCache.h" 2 > >class SarcConnectionCache >{ >public: > class ConnectionInfo > { > public: > ConnectionInfo(const std::string &domain, SARC_HANDLE sarc_handle, OSII_UINT32 user_ref) : domain(domain), sarc_handle(sarc_handle), user_ref(user_ref) {} > ConnectionInfo(std::string &&domain, SARC_HANDLE sarc_handle, OSII_UINT32 user_ref) noexcept : domain(std::move(domain)), sarc_handle(sarc_handle), user_ref(user_ref) {} > > std::string domain; > SARC_HANDLE sarc_handle; > OSII_UINT32 user_ref; > }; > > > > > > class SarcConnection > { > public: > explicit SarcConnection(const ConnectionInfo& conn_info) : conn_info(conn_info) {} > explicit SarcConnection(ConnectionInfo&& conn_info) : conn_info(std::move(conn_info)) {} > > const std::string& domain() const noexcept { return conn_info.domain; } > OSII_UINT32 user_ref() const noexcept { return conn_info.user_ref; } > SARC_HANDLE sarc_handle() const noexcept { return conn_info.sarc_handle; } > OSIIMSG_HANDLE message_handle() const noexcept { return osii_sarc_get_msgc(conn_info.sarc_handle); } > THREAD_MON msg_thread_mon() const noexcept { return osii_msg_get_thread_mon(message_handle()); } > PROC_FOLDERS proc_folders() const noexcept { return osii_msg_get_folders(message_handle()); } > bool send_alarm(OSII_AGENT_ALARM alarm) const noexcept { return osii_msg_server_alarm_send(message_handle(), alarm); } > > THREADPOOL_HANDLE create_threadpool(uint32_t initial_threads, uint32_t max_threads, const char *name, QUEUE_HANDLE queue, OSII_RETCODE *ret, hsh::milliseconds timeout, hsh::milliseconds frequency) noexcept > { > return osii_msg_threadpool_init(message_handle(), initial_threads, max_threads, name, queue, ret, static_cast<uint32_t>(timeout.count()), static_cast<uint32_t>(frequency.count())); > } > > OSII_RETCODE destroy_threadpool(THREADPOOL_HANDLE tpool, const char* name) noexcept > { > return osii_msg_threadpool_destroy(message_handle(), tpool, name); > } > > bool is_connected() const noexcept { return osii_msg_is_connected(message_handle()); } > bool is_online() const noexcept { return osii_msg_server_online(message_handle()); } > bool is_timed_blocked() const noexcept { return osii_msg_is_timed_blocked(message_handle()); } > bool verify_password(const std::string& user, const std::string& passwd) const noexcept > { > return (( OSII_RETCODE )1) == osii_sarc_verify_password(sarc_handle(), user.c_str(), passwd.c_str()); > } > > void process_heartbeat(THREAD_MON thread_mon, const std::string& hb_id = {}) const noexcept; > > private: > static hsh::seconds seconds_since(hsh::time_point point) noexcept; > static bool is_thread_mon_healthy(THREAD_MON thread_mon) noexcept; > > const ConnectionInfo conn_info; > }; > >private: > static void sarc_init_callback(void *user_data, OSIIMSG_MESSAGE_HANDLE msg); > hsh::optional<ConnectionInfo> create_sarc_connection(const std::string& domain_name); > >private: > static constexpr int SARC_INIT_TIMEOUT_MS = 10000; > > OSII_UINT32 debug_level; > ChronusMutex connections_mutex; > std::deque<SarcConnection> connections; > >public: > SarcConnectionCache(OSII_UINT32 debug_level = 0) > : > debug_level(debug_level) > {} > > explicit SarcConnectionCache(const std::vector<ConnectionInfo> &existing_connection_data, OSII_UINT32 debug_level = 0) > : > debug_level(debug_level) > { > for (auto &existing_connection : existing_connection_data) > { > connections.emplace_back(existing_connection); > } > } > > static std::string get_default_msg_domain(); > SarcConnection* sarc_connection(const std::string& domain_name); >}; ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_HistorianQueryConnection.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 1 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryStreams.h" 1 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/primitive_value.h" 1 > > > > > > >namespace hsh >{ >enum class ValueType >{ > EMPTY = 0, > INT = 1, > DOUBLE = 2, > STRING = 3, > FLOAT = 4, > UINT = 5 >}; > >class primitive_value >{ >public: > > primitive_value() noexcept = default; > > primitive_value(nullopt_t) noexcept {} > > > explicit primitive_value(int64_t int_value) noexcept : value_type(ValueType::INT), val(int_value) {} > > > explicit primitive_value(double dbl_value) noexcept : value_type(ValueType::DOUBLE), val(dbl_value) {} > > > explicit primitive_value(float float_value) noexcept : value_type(ValueType::FLOAT), val(float_value) {} > > > explicit primitive_value(uint64_t uint_value) noexcept : value_type(ValueType::UINT), val(uint_value) {} > > > explicit primitive_value(const char *str) noexcept : value_type(ValueType::STRING), val(str) {} > primitive_value(const char *str, size_t size) noexcept : value_type(ValueType::STRING), val(str, size) {} > explicit primitive_value(const std::string &str) noexcept : value_type(ValueType::STRING), val(str) {} > explicit primitive_value(std::string &&str) noexcept : value_type(ValueType::STRING), val(std::move(str)) {} > > > ~primitive_value() > { > if ( ValueType::STRING == value_type ){ > val.str_value.~basic_string(); > } > } > > > primitive_value(const primitive_value &rhs) noexcept : value_type(rhs.value_type) > { > switch (value_type) > { > case ValueType::INT: > val.int_value = rhs.val.int_value; > break; > case ValueType::DOUBLE: > val.dbl_value = rhs.val.dbl_value; > break; > case ValueType::STRING: > new(&val.str_value)std::string(rhs.val.str_value); > break; > case ValueType::FLOAT: > val.float_value = rhs.val.float_value; > break; > case ValueType::UINT: > val.uint_value = rhs.val.uint_value; > break; > } > } > > primitive_value(primitive_value &&rhs) noexcept : value_type(rhs.value_type) > { > switch (value_type) > { > case ValueType::INT: > val.int_value = rhs.val.int_value; > break; > case ValueType::DOUBLE: > val.dbl_value = rhs.val.dbl_value; > break; > case ValueType::STRING: > new(&val.str_value)std::string(std::move(rhs.val.str_value)); > break; > case ValueType::FLOAT: > val.float_value = rhs.val.float_value; > break; > case ValueType::UINT: > val.uint_value = rhs.val.uint_value; > break; > } > } > > > primitive_value& operator=(const primitive_value &rhs) noexcept { > primitive_value copy(rhs); > copy.swap(*this); > return *this; > } > primitive_value& operator=(nullopt_t) noexcept { clear(); return *this; } > primitive_value& operator=(int64_t rhs) noexcept { reset(rhs); return *this; } > primitive_value& operator=(double rhs) noexcept { reset(rhs); return *this; } > primitive_value& operator=(float rhs) noexcept { reset(rhs); return *this; } > primitive_value& operator=(uint64_t rhs) noexcept { reset(rhs); return *this; } > primitive_value& operator=(const std::string &rhs) noexcept { reset(rhs); return *this; } > primitive_value& operator=(const char *rhs) noexcept { reset(rhs); return *this; } > > primitive_value& operator=(primitive_value &&rhs) noexcept { rhs.swap(*this); return *this; } > primitive_value& operator=(std::string &&rhs) noexcept { reset(std::move(rhs)); return *this; } > > inline bool is_empty() const noexcept { return ValueType::EMPTY == value_type; } > inline explicit operator bool() const noexcept { return !is_empty(); } > > friend void swap(primitive_value &lhs, primitive_value &rhs) noexcept { lhs.swap(rhs); } > > void swap(primitive_value &rhs) noexcept > { > > if (is_empty() && !rhs) { > return; > } > > > switch ( rhs.value_type ) > { > case ValueType::INT: > { > auto temp_val = rhs.val.int_value; > rhs.reset(*this); > reset(temp_val); > break; > } > case ValueType::DOUBLE: > { > auto temp_val = rhs.val.dbl_value; > rhs.reset(*this); > reset(temp_val); > break; > } > case ValueType::STRING: > { > auto temp_val = std::move(rhs.val.str_value); > rhs.reset(*this); > reset(std::move(temp_val)); > break; > } > case ValueType::FLOAT: > { > auto temp_val = rhs.val.float_value; > rhs.reset(*this); > reset(temp_val); > break; > } > case ValueType::UINT: > { > auto temp_val = rhs.val.uint_value; > rhs.reset(*this); > reset(temp_val); > break; > } > case ValueType::EMPTY: > { > rhs.reset(*this); > clear(); > break; > } > } > } > > > ValueType get_value_type() const { return value_type; } > > bool is_int() const { return ValueType::INT == value_type; } > bool is_double() const { return ValueType::DOUBLE == value_type; } > bool is_string() const { return ValueType::STRING == value_type; } > bool is_float() const { return ValueType::FLOAT == value_type; } > bool is_uint() const { return ValueType::UINT == value_type; } > > > int64_t get_int_value() const { return val.int_value; } > double get_dbl_value() const { return val.dbl_value; } > const std::string &get_string_value() const { return val.str_value; } > float get_float_value() const { return val.float_value; } > uint64_t get_uint_value() const { return val.uint_value; } > > > void reset(nullopt_t) noexcept { clear(); } > > void reset(int64_t int_value) noexcept > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > value_type = ValueType::INT; > val.int_value = int_value; > } > void reset(double dbl_value) noexcept > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > value_type = ValueType::DOUBLE; > val.dbl_value = dbl_value; > } > > void reset(float float_value) noexcept > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > value_type = ValueType::FLOAT; > val.float_value = float_value; > } > > void reset(uint64_t uint_value) noexcept > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > value_type = ValueType::UINT; > val.uint_value = uint_value; > } > > void reset(const char *str) noexcept > { > if (value_type == ValueType::STRING) { > val.str_value.assign(str); > } else { > value_type = ValueType::STRING; > new(&val.str_value)std::string(str); > } > } > > void reset(const char *str, size_t size) noexcept > { > if (value_type == ValueType::STRING) { > val.str_value.assign(str, size); > } else { > value_type = ValueType::STRING; > new(&val.str_value)std::string(str, size); > } > } > > void reset(const std::string &str) noexcept > { > if (value_type == ValueType::STRING) { > val.str_value.assign(str); > } else { > value_type = ValueType::STRING; > new(&val.str_value)std::string(str); > } > } > > void reset(std::string &&str) noexcept > { > if (value_type == ValueType::STRING) { > val.str_value = std::move(str); > } else { > value_type = ValueType::STRING; > new(&val.str_value)std::string(std::move(str)); > } > } > > > void clear() > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > value_type = ValueType::EMPTY; > } > > > > std::string to_string() const > { > switch (value_type) > { > case ValueType::INT: > return std::to_string(val.int_value); > case ValueType::DOUBLE: > return std::to_string(val.dbl_value); > case ValueType::STRING: > return val.str_value; > case ValueType::FLOAT: > return std::to_string(val.float_value); > case ValueType::UINT: > return std::to_string(val.uint_value); > case ValueType::EMPTY: > default: > return ""; > } > } > > int64_t to_int() const > { > switch (value_type) > { > case ValueType::INT: > return val.int_value; > case ValueType::DOUBLE: > return (int64_t)val.dbl_value; > case ValueType::STRING: > return 0ll; > case ValueType::FLOAT: > return (int64_t)val.float_value; > case ValueType::UINT: > return (int64_t)val.uint_value; > case ValueType::EMPTY: > default: > return 0ll; > } > } > > double to_double() const > { > switch (value_type) > { > case ValueType::INT: > return (double)val.int_value; > case ValueType::DOUBLE: > return val.dbl_value; > case ValueType::STRING: > return 0.0; > case ValueType::FLOAT: > return val.float_value; > case ValueType::UINT: > return (double)val.uint_value; > case ValueType::EMPTY: > default: > return 0.0; > } > } > > > uint64_t to_uint() const > { > switch (value_type) > { > case ValueType::INT: > return (uint64_t)val.int_value; > case ValueType::DOUBLE: > return (uint64_t)val.dbl_value; > case ValueType::STRING: > return 0ull; > case ValueType::FLOAT: > return (uint64_t)val.float_value; > case ValueType::UINT: > return val.uint_value; > case ValueType::EMPTY: > default: > return 0ull; > } > } > > float to_float() const > { > switch (value_type) > { > case ValueType::INT: > return (float)val.int_value; > case ValueType::DOUBLE: > return (float)val.dbl_value; > case ValueType::STRING: > return 0.0f; > case ValueType::FLOAT: > return val.float_value; > case ValueType::UINT: > return (float)val.uint_value; > case ValueType::EMPTY: > default: > return 0.0f; > } > } > > > bool operator==(const primitive_value &rhs) const noexcept > { > if (value_type != rhs.value_type) { > return false; > } > > switch (value_type) > { > case ValueType::INT: > return val.int_value == rhs.val.int_value; > case ValueType::DOUBLE: > return val.dbl_value == rhs.val.dbl_value; > case ValueType::STRING: > return val.str_value == rhs.val.str_value; > case ValueType::FLOAT: > return val.float_value == rhs.val.float_value; > case ValueType::UINT: > return val.uint_value == rhs.val.uint_value; > case ValueType::EMPTY: > default: > return true; > } > } > > bool operator==(int64_t rhs) const noexcept { return is_int() ? val.int_value == rhs : false; } > bool operator==(double rhs) const noexcept { return is_double() ? val.dbl_value == rhs : false; } > bool operator==(const std::string &rhs) const noexcept { return is_string() ? val.str_value == rhs : false; } > bool operator==(const char *rhs) const noexcept { return is_string() ? val.str_value == rhs : false; } > bool operator==(float rhs) const noexcept { return is_float() ? val.float_value == rhs : false; } > bool operator==(uint64_t rhs) const noexcept { return is_uint() ? val.uint_value == rhs : false; } > > bool operator!=(const primitive_value &rhs) const noexcept { return !(*this == rhs); } > bool operator!=(int64_t rhs) const noexcept { return !(*this == rhs); } > bool operator!=(double rhs) const noexcept { return !(*this == rhs); } > bool operator!=(const std::string &rhs) const noexcept { return !(*this == rhs); } > bool operator!=(const char *rhs) const noexcept { return !(*this == rhs); } > bool operator!=(float rhs) const noexcept { return !(*this == rhs); } > bool operator!=(uint64_t rhs) const noexcept { return !(*this == rhs); } > > >private: > > void reset(primitive_value &rhs) > { > if (ValueType::STRING == value_type) { > val.str_value.~basic_string(); > } > this->value_type = rhs.value_type; > switch (rhs.value_type) > { > case ValueType::EMPTY: > break; > case ValueType::INT: > this->val.int_value = rhs.val.int_value; > break; > case ValueType::DOUBLE: > this->val.dbl_value = rhs.val.dbl_value; > break; > case ValueType::STRING: > new(&val.str_value)std::string(std::move(rhs.val.str_value)); > break; > case ValueType::FLOAT: > this->val.float_value = rhs.val.float_value; > break; > case ValueType::UINT: > this->val.uint_value = rhs.val.uint_value; > break; > } > } > > union Value > { > int64_t int_value; > double dbl_value; > std::string str_value; > float float_value; > uint64_t uint_value; > > > Value() noexcept {} > Value(int64_t val) noexcept : int_value(val) {} > Value(double val) noexcept : dbl_value(val) {} > Value(float val) noexcept : float_value(val) {} > Value(uint64_t val) noexcept : uint_value(val) {} > Value(const char *str) noexcept : str_value(str) {} > Value(const char *str, size_t size) noexcept : str_value(str, size) {} > Value(const std::string &str) noexcept : str_value(str) {} > Value(std::string &&str) noexcept : str_value(std::move(str)) {} > ~Value() {} > } val; > ValueType value_type = ValueType::EMPTY; >}; > >} ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryStreams.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/span.h" 1 > > ># 1 "/usr/include/c++/4.8.2/cstddef" 1 3 ># 39 "/usr/include/c++/4.8.2/cstddef" 3 > ># 40 "/usr/include/c++/4.8.2/cstddef" 3 > > ># 1 "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h" 1 3 4 ># 42 "/usr/include/c++/4.8.2/cstddef" 2 3 ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/span.h" 2 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/iterator.h" 1 > ># 1 "/usr/include/c++/4.8.2/iterator" 1 3 ># 58 "/usr/include/c++/4.8.2/iterator" 3 > ># 59 "/usr/include/c++/4.8.2/iterator" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/ostream" 1 3 ># 36 "/usr/include/c++/4.8.2/ostream" 3 > ># 37 "/usr/include/c++/4.8.2/ostream" 3 > ># 1 "/usr/include/c++/4.8.2/ios" 1 3 ># 36 "/usr/include/c++/4.8.2/ios" 3 > ># 37 "/usr/include/c++/4.8.2/ios" 3 > > > > > ># 1 "/usr/include/c++/4.8.2/bits/ios_base.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > > > ># 1 "/usr/include/c++/4.8.2/bits/locale_classes.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 62 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/bits/locale_classes.h" 3 > locale() throw(); ># 126 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > locale(const locale& __other) throw(); ># 136 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > explicit > locale(const char* __s); ># 151 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > locale(const locale& __base, const char* __s, category __cat); ># 164 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > locale(const locale& __base, const locale& __add, category __cat); ># 177 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > template<typename _Facet> > locale(const locale& __other, _Facet* __f); > > > ~locale() throw(); ># 191 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > const locale& > operator=(const locale& __other) throw(); ># 206 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > template<typename _Facet> > locale > combine(const locale& __other) const; > > > > > > > string > name() const; ># 225 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > bool > operator==(const locale& __other) const throw(); > > > > > > > > bool > operator!=(const locale& __other) const throw() > { return !(this->operator==(__other)); } ># 253 "/usr/include/c++/4.8.2/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; ># 269 "/usr/include/c++/4.8.2/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; ># 304 "/usr/include/c++/4.8.2/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); > }; ># 338 "/usr/include/c++/4.8.2/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: ># 369 "/usr/include/c++/4.8.2/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(); > > 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(...) > { } > } > } > > facet(const facet&); > > facet& > operator=(const facet&); > }; ># 436 "/usr/include/c++/4.8.2/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); } > > void > _M_install_cache(const facet*, size_t); > }; ># 583 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > template<typename _CharT> > class 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; ># 610 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > explicit > collate(size_t __refs = 0) > : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) > { } ># 624 "/usr/include/c++/4.8.2/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)) > { } ># 641 "/usr/include/c++/4.8.2/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); } ># 660 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > string_type > transform(const _CharT* __lo, const _CharT* __hi) const > { return this->do_transform(__lo, __hi); } ># 674 "/usr/include/c++/4.8.2/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); } ># 703 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > virtual int > do_compare(const _CharT* __lo1, const _CharT* __hi1, > const _CharT* __lo2, const _CharT* __hi2) const; ># 717 "/usr/include/c++/4.8.2/bits/locale_classes.h" 3 > virtual string_type > do_transform(const _CharT* __lo, const _CharT* __hi) const; ># 730 "/usr/include/c++/4.8.2/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 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); > } > } > > protected: > virtual > ~collate_byname() { } > }; > > >} > ># 1 "/usr/include/c++/4.8.2/bits/locale_classes.tcc" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/locale_classes.tcc" 3 > ># 38 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/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&); > > > > >} ># 788 "/usr/include/c++/4.8.2/bits/locale_classes.h" 2 3 ># 42 "/usr/include/c++/4.8.2/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 > }; > > 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 > }; > > 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 > }; > > 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 > }; ># 199 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > class ios_base > { > public: > > > > > > > > class failure : public exception > { > public: > > > explicit > failure(const string& __str) throw(); > > > > virtual > ~failure() throw(); > > virtual const char* > what() const throw(); > > private: > string _M_msg; > }; ># 255 "/usr/include/c++/4.8.2/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; ># 330 "/usr/include/c++/4.8.2/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; ># 361 "/usr/include/c++/4.8.2/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; ># 393 "/usr/include/c++/4.8.2/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; ># 419 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > enum event > { > erase_event, > imbue_event, > copyfmt_event > }; ># 436 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > typedef void (*event_callback) (event __e, ios_base& __b, int __i); ># 448 "/usr/include/c++/4.8.2/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(); > > private: > static _Atomic_word _S_refcount; > static bool _S_synced_with_stdio; > }; > > > > > > > fmtflags > flags() const > { return _M_flags; } ># 561 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > fmtflags > flags(fmtflags __fmtfl) > { > fmtflags __old = _M_flags; > _M_flags = __fmtfl; > return __old; > } ># 577 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > fmtflags > setf(fmtflags __fmtfl) > { > fmtflags __old = _M_flags; > _M_flags |= __fmtfl; > return __old; > } ># 594 "/usr/include/c++/4.8.2/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; } ># 620 "/usr/include/c++/4.8.2/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; > } ># 671 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > static bool > sync_with_stdio(bool __sync = true); ># 683 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > locale > imbue(const locale& __loc) throw(); ># 694 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > locale > getloc() const > { return _M_ios_locale; } ># 705 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > const locale& > _M_getloc() const > { return _M_ios_locale; } ># 724 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > static int > xalloc() throw(); ># 740 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > long& > iword(int __ix) > { > _Words& __word = (__ix < _M_word_size) > ? _M_word[__ix] : _M_grow_words(__ix, true); > return __word._M_iword; > } ># 761 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > void*& > pword(int __ix) > { > _Words& __word = (__ix < _M_word_size) > ? _M_word[__ix] : _M_grow_words(__ix, false); > return __word._M_pword; > } ># 778 "/usr/include/c++/4.8.2/bits/ios_base.h" 3 > virtual ~ios_base(); > > protected: > ios_base() throw (); > > > > private: > ios_base(const ios_base&); > > ios_base& > operator=(const ios_base&); > }; > > > > 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; > } > > >} ># 43 "/usr/include/c++/4.8.2/ios" 2 3 ># 1 "/usr/include/c++/4.8.2/streambuf" 1 3 ># 36 "/usr/include/c++/4.8.2/streambuf" 3 > ># 37 "/usr/include/c++/4.8.2/streambuf" 3 ># 45 "/usr/include/c++/4.8.2/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&); ># 119 "/usr/include/c++/4.8.2/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 _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() > { } ># 208 "/usr/include/c++/4.8.2/streambuf" 3 > locale > pubimbue(const locale& __loc) > { > locale __tmp(this->getloc()); > this->imbue(__loc); > _M_buf_locale = __loc; > return __tmp; > } ># 225 "/usr/include/c++/4.8.2/streambuf" 3 > locale > getloc() const > { return _M_buf_locale; } ># 238 "/usr/include/c++/4.8.2/streambuf" 3 > basic_streambuf* > pubsetbuf(char_type* __s, streamsize __n) > { return this->setbuf(__s, __n); } ># 250 "/usr/include/c++/4.8.2/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); } ># 262 "/usr/include/c++/4.8.2/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(); } ># 283 "/usr/include/c++/4.8.2/streambuf" 3 > streamsize > in_avail() > { > const streamsize __ret = this->egptr() - this->gptr(); > return __ret ? __ret : this->showmanyc(); > } ># 297 "/usr/include/c++/4.8.2/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; > } ># 315 "/usr/include/c++/4.8.2/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; > } ># 337 "/usr/include/c++/4.8.2/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; > } ># 356 "/usr/include/c++/4.8.2/streambuf" 3 > streamsize > sgetn(char_type* __s, streamsize __n) > { return this->xsgetn(__s, __n); } ># 371 "/usr/include/c++/4.8.2/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; > } ># 396 "/usr/include/c++/4.8.2/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; > } ># 423 "/usr/include/c++/4.8.2/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; > } ># 449 "/usr/include/c++/4.8.2/streambuf" 3 > streamsize > sputn(const char_type* __s, streamsize __n) > { return this->xsputn(__s, __n); } > > protected: ># 463 "/usr/include/c++/4.8.2/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()) > { } ># 481 "/usr/include/c++/4.8.2/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; } ># 497 "/usr/include/c++/4.8.2/streambuf" 3 > void > gbump(int __n) { _M_in_cur += __n; } ># 508 "/usr/include/c++/4.8.2/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; > } ># 528 "/usr/include/c++/4.8.2/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; } ># 544 "/usr/include/c++/4.8.2/streambuf" 3 > void > pbump(int __n) { _M_out_cur += __n; } ># 554 "/usr/include/c++/4.8.2/streambuf" 3 > void > setp(char_type* __pbeg, char_type* __pend) > { > _M_out_beg = _M_out_cur = __pbeg; > _M_out_end = __pend; > } ># 575 "/usr/include/c++/4.8.2/streambuf" 3 > virtual void > imbue(const locale& __loc) > { } ># 590 "/usr/include/c++/4.8.2/streambuf" 3 > virtual basic_streambuf<char_type,_Traits>* > setbuf(char_type*, streamsize) > { return this; } ># 601 "/usr/include/c++/4.8.2/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)); } ># 613 "/usr/include/c++/4.8.2/streambuf" 3 > virtual pos_type > seekpos(pos_type, > ios_base::openmode = ios_base::in | ios_base::out) > { return pos_type(off_type(-1)); } ># 626 "/usr/include/c++/4.8.2/streambuf" 3 > virtual int > sync() { return 0; } ># 648 "/usr/include/c++/4.8.2/streambuf" 3 > virtual streamsize > showmanyc() { return 0; } ># 664 "/usr/include/c++/4.8.2/streambuf" 3 > virtual streamsize > xsgetn(char_type* __s, streamsize __n); ># 686 "/usr/include/c++/4.8.2/streambuf" 3 > virtual int_type > underflow() > { return traits_type::eof(); } ># 699 "/usr/include/c++/4.8.2/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; > } ># 723 "/usr/include/c++/4.8.2/streambuf" 3 > virtual int_type > pbackfail(int_type __c = traits_type::eof()) > { return traits_type::eof(); } ># 741 "/usr/include/c++/4.8.2/streambuf" 3 > virtual streamsize > xsputn(const char_type* __s, streamsize __n); ># 767 "/usr/include/c++/4.8.2/streambuf" 3 > virtual int_type > overflow(int_type __c = traits_type::eof()) > { return traits_type::eof(); } > > > > public: ># 782 "/usr/include/c++/4.8.2/streambuf" 3 > 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; } > > private: > > > basic_streambuf(const basic_streambuf& __sb) > : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), > _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), > _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_end), > _M_buf_locale(__sb._M_buf_locale) > { } > > basic_streambuf& > operator=(const basic_streambuf& __sb) > { > _M_in_beg = __sb._M_in_beg; > _M_in_cur = __sb._M_in_cur; > _M_in_end = __sb._M_in_end; > _M_out_beg = __sb._M_out_beg; > _M_out_cur = __sb._M_out_cur; > _M_out_end = __sb._M_out_end; > _M_buf_locale = __sb._M_buf_locale; > return *this; > }; > }; > > > 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++/4.8.2/bits/streambuf.tcc" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/streambuf.tcc" 3 > ># 38 "/usr/include/c++/4.8.2/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&); > > > > >} ># 839 "/usr/include/c++/4.8.2/streambuf" 2 3 ># 44 "/usr/include/c++/4.8.2/ios" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/basic_ios.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > > > ># 1 "/usr/include/c++/4.8.2/bits/locale_facets.h" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > ># 38 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > ># 1 "/usr/include/c++/4.8.2/cwctype" 1 3 ># 39 "/usr/include/c++/4.8.2/cwctype" 3 > ># 40 "/usr/include/c++/4.8.2/cwctype" 3 ># 50 "/usr/include/c++/4.8.2/cwctype" 3 ># 1 "/usr/include/wctype.h" 1 3 4 ># 33 "/usr/include/wctype.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 34 "/usr/include/wctype.h" 2 3 4 ># 49 "/usr/include/wctype.h" 3 4 > > > >typedef unsigned long int wctype_t; > ># 71 "/usr/include/wctype.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 (); ># 171 "/usr/include/wctype.h" 3 4 >extern wctype_t wctype (const char *__property) throw (); > > > >extern int iswctype (wint_t __wc, wctype_t __desc) throw (); > > > > > > > > > > >typedef const __int32_t *wctrans_t; > > > > > > > >extern wint_t towlower (wint_t __wc) throw (); > > >extern wint_t towupper (wint_t __wc) throw (); > > >} ># 213 "/usr/include/wctype.h" 3 4 >extern "C" { > > > > >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++/4.8.2/cwctype" 2 3 ># 80 "/usr/include/c++/4.8.2/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++/4.8.2/bits/locale_facets.h" 2 3 ># 1 "/usr/include/c++/4.8.2/cctype" 1 3 ># 39 "/usr/include/c++/4.8.2/cctype" 3 > ># 40 "/usr/include/c++/4.8.2/cctype" 3 ># 41 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3 ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_base.h" 1 3 ># 36 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_base.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > > struct ctype_base > { > > typedef const int* __to_type; > > > > typedef unsigned short mask; > static const mask upper = _ISupper; > static const mask lower = _ISlower; > static const mask alpha = _ISalpha; > static const mask digit = _ISdigit; > static const mask xdigit = _ISxdigit; > static const mask space = _ISspace; > static const mask print = _ISprint; > static const mask graph = _ISalpha | _ISdigit | _ISpunct; > static const mask cntrl = _IScntrl; > static const mask punct = _ISpunct; > static const mask alnum = _ISalpha | _ISdigit; > }; > > >} ># 42 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3 > > > > > > ># 1 "/usr/include/c++/4.8.2/bits/streambuf_iterator.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/streambuf_iterator.h" 3 > ># 34 "/usr/include/c++/4.8.2/bits/streambuf_iterator.h" 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 49 "/usr/include/c++/4.8.2/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&); > > private: > > > > > > > > mutable streambuf_type* _M_sbuf; > mutable 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()) { } > > > > > char_type > operator*() const > { > > > > > > > > return traits_type::to_char_type(_M_get()); > } > > > istreambuf_iterator& > operator++() > { > > > ; > if (_M_sbuf) > { > _M_sbuf->sbumpc(); > _M_c = traits_type::eof(); > } > return *this; > } > > > istreambuf_iterator > operator++(int) > { > > > ; > > istreambuf_iterator __old = *this; > if (_M_sbuf) > { > __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 > { > const int_type __eof = traits_type::eof(); > int_type __ret = __eof; > if (_M_sbuf) > { > if (!traits_type::eq_int_type(_M_c, __eof)) > __ret = _M_c; > else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), > __eof)) > _M_c = __ret; > else > _M_sbuf = 0; > } > return __ret; > } > > bool > _M_at_eof() const > { > const int_type __eof = traits_type::eof(); > return traits_type::eq_int_type(_M_get(), __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; > > 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, traits_type::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(); > } > > if (!traits_type::eq_int_type(__c, traits_type::eof())) > __first._M_c = __c; > else > __first._M_sbuf = 0; > } > return __first; > } > > > > >} ># 49 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3 > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 64 "/usr/include/c++/4.8.2/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; > } ># 142 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > template<typename _CharT> > class __ctype_abstract_base : public locale::facet, public ctype_base > { > public: > > > typedef _CharT char_type; ># 161 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > bool > is(mask __m, char_type __c) const > { return this->do_is(__m, __c); } ># 178 "/usr/include/c++/4.8.2/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); } ># 194 "/usr/include/c++/4.8.2/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); } ># 210 "/usr/include/c++/4.8.2/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); } ># 224 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > toupper(char_type __c) const > { return this->do_toupper(__c); } ># 239 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > const char_type* > toupper(char_type *__lo, const char_type* __hi) const > { return this->do_toupper(__lo, __hi); } ># 253 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > tolower(char_type __c) const > { return this->do_tolower(__c); } ># 268 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > const char_type* > tolower(char_type* __lo, const char_type* __hi) const > { return this->do_tolower(__lo, __hi); } ># 285 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > widen(char __c) const > { return this->do_widen(__c); } ># 304 "/usr/include/c++/4.8.2/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); } ># 323 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char > narrow(char_type __c, char __dfault) const > { return this->do_narrow(__c, __dfault); } ># 345 "/usr/include/c++/4.8.2/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() { } ># 370 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual bool > do_is(mask __m, char_type __c) const = 0; ># 389 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_is(const char_type* __lo, const char_type* __hi, > mask* __vec) const = 0; ># 408 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_is(mask __m, const char_type* __lo, > const char_type* __hi) const = 0; ># 427 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_not(mask __m, const char_type* __lo, > const char_type* __hi) const = 0; ># 445 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const = 0; ># 462 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const = 0; ># 478 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const = 0; ># 495 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const = 0; ># 514 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const = 0; ># 535 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; ># 556 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault) const = 0; ># 581 "/usr/include/c++/4.8.2/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; > }; ># 604 "/usr/include/c++/4.8.2/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; ># 673 "/usr/include/c++/4.8.2/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); ># 710 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); ># 723 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, > size_t __refs = 0); ># 736 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > inline bool > is(mask __m, char __c) const; ># 751 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > inline const char* > is(const char* __lo, const char* __hi, mask* __vec) const; ># 765 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > inline const char* > scan_is(mask __m, const char* __lo, const char* __hi) const; ># 779 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > inline const char* > scan_not(mask __m, const char* __lo, const char* __hi) const; ># 794 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > toupper(char_type __c) const > { return this->do_toupper(__c); } ># 811 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > const char_type* > toupper(char_type *__lo, const char_type* __hi) const > { return this->do_toupper(__lo, __hi); } ># 827 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > tolower(char_type __c) const > { return this->do_tolower(__c); } ># 844 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > const char_type* > tolower(char_type* __lo, const char_type* __hi) const > { return this->do_tolower(__lo, __hi); } ># 864 "/usr/include/c++/4.8.2/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); > } ># 891 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > const char* > widen(const char* __lo, const char* __hi, char_type* __to) const > { > if (_M_widen_ok == 1) > { > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } > if (!_M_widen_ok) > _M_widen_init(); > return this->do_widen(__lo, __hi, __to); > } ># 922 "/usr/include/c++/4.8.2/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; > } ># 955 "/usr/include/c++/4.8.2/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)) > { > __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(); ># 1004 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const; ># 1021 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const; ># 1037 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const; ># 1054 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const; ># 1074 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const > { return __c; } ># 1097 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const > { > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } ># 1123 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault) const > { return __c; } ># 1149 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_narrow(const char_type* __lo, const char_type* __hi, > char __dfault, char* __to) const > { > __builtin_memcpy(__to, __lo, __hi - __lo); > return __hi; > } > > private: > void _M_narrow_init() const; > void _M_widen_init() const; > }; ># 1174 "/usr/include/c++/4.8.2/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; ># 1207 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > ctype(size_t __refs = 0); ># 1218 "/usr/include/c++/4.8.2/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(); ># 1242 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual bool > do_is(mask __m, char_type __c) const; ># 1261 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; ># 1279 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; ># 1297 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_scan_not(mask __m, const char_type* __lo, > const char_type* __hi) const; ># 1314 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_toupper(char_type __c) const; ># 1331 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_toupper(char_type* __lo, const char_type* __hi) const; ># 1347 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_tolower(char_type __c) const; ># 1364 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char_type* > do_tolower(char_type* __lo, const char_type* __hi) const; ># 1384 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_widen(char __c) const; ># 1406 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual const char* > do_widen(const char* __lo, const char* __hi, char_type* __to) const; ># 1429 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char > do_narrow(char_type __c, char __dfault) const; ># 1455 "/usr/include/c++/4.8.2/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); > > protected: > virtual > ~ctype_byname() { }; > }; > > > template<> > class ctype_byname<char> : public ctype<char> > { > public: > explicit > ctype_byname(const char* __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); > > protected: > virtual > ~ctype_byname(); > }; > > > >} > > ># 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_inline.h" 1 3 ># 37 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_inline.h" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > > > bool > ctype<char>:: > is(mask __m, char __c) const > { return _M_table[static_cast<unsigned char>(__c)] & __m; } > > const char* > ctype<char>:: > is(const char* __low, const char* __high, mask* __vec) const > { > while (__low < __high) > *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; > return __high; > } > > const char* > ctype<char>:: > scan_is(mask __m, const char* __low, const char* __high) const > { > while (__low < __high > && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) > ++__low; > return __low; > } > > const char* > ctype<char>:: > scan_not(mask __m, const char* __low, const char* __high) const > { > while (__low < __high > && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) > ++__low; > return __low; > } > > >} ># 1512 "/usr/include/c++/4.8.2/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; > } > } ># 1640 "/usr/include/c++/4.8.2/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(); } ># 1678 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > numpunct(__cache_type* __cache, size_t __refs = 0) > : facet(__refs), _M_data(__cache) > { _M_initialize_numpunct(); } ># 1692 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > numpunct(__c_locale __cloc, size_t __refs = 0) > : facet(__refs), _M_data(0) > { _M_initialize_numpunct(__cloc); } ># 1706 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > decimal_point() const > { return this->do_decimal_point(); } ># 1719 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > char_type > thousands_sep() const > { return this->do_thousands_sep(); } ># 1750 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > string > grouping() const > { return this->do_grouping(); } ># 1763 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > string_type > truename() const > { return this->do_truename(); } ># 1776 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > string_type > falsename() const > { return this->do_falsename(); } > > protected: > > virtual > ~numpunct(); ># 1793 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_decimal_point() const > { return _M_data->_M_decimal_point; } ># 1805 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual char_type > do_thousands_sep() const > { return _M_data->_M_thousands_sep; } ># 1818 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual string > do_grouping() const > { return _M_data->_M_grouping; } ># 1831 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > virtual string_type > do_truename() const > { return _M_data->_M_truename; } ># 1844 "/usr/include/c++/4.8.2/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); > } > } > > protected: > virtual > ~numpunct_byname() { } > }; > > ># 1914 "/usr/include/c++/4.8.2/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; ># 1935 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > num_get(size_t __refs = 0) : facet(__refs) { } ># 1961 "/usr/include/c++/4.8.2/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); } ># 1998 "/usr/include/c++/4.8.2/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); } ># 2058 "/usr/include/c++/4.8.2/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); } ># 2101 "/usr/include/c++/4.8.2/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() { } > > iter_type > _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, > string&) const; > > template<typename _ValueT> > 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; > } ># 2172 "/usr/include/c++/4.8.2/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; ># 2235 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > }; > > template<typename _CharT, typename _InIter> > locale::id num_get<_CharT, _InIter>::id; ># 2253 "/usr/include/c++/4.8.2/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; ># 2274 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3 > explicit > num_put(size_t __refs = 0) : facet(__refs) { } ># 2292 "/usr/include/c++/4.8.2/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); } ># 2334 "/usr/include/c++/4.8.2/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); } ># 2397 "/usr/include/c++/4.8.2/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); } ># 2422 "/usr/include/c++/4.8.2/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() { }; ># 2470 "/usr/include/c++/4.8.2/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 _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++/4.8.2/bits/locale_facets.tcc" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/locale_facets.tcc" 3 > ># 34 "/usr/include/c++/4.8.2/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) > { > _M_allocated = true; > > const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); > > char* __grouping = 0; > _CharT* __truename = 0; > _CharT* __falsename = 0; > try > { > _M_grouping_size = __np.grouping().size(); > __grouping = new char[_M_grouping_size]; > __np.grouping().copy(__grouping, _M_grouping_size); > _M_grouping = __grouping; > _M_use_grouping = (_M_grouping_size > && static_cast<signed char>(_M_grouping[0]) > 0 > && (_M_grouping[0] > != __gnu_cxx::__numeric_traits<char>::__max)); > > _M_truename_size = __np.truename().size(); > __truename = new _CharT[_M_truename_size]; > __np.truename().copy(__truename, _M_truename_size); > _M_truename = __truename; > > _M_falsename_size = __np.falsename().size(); > __falsename = new _CharT[_M_falsename_size]; > __np.falsename().copy(__falsename, _M_falsename_size); > _M_falsename = __falsename; > > _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); > } > catch(...) > { > delete [] __grouping; > delete [] __truename; > delete [] __falsename; > throw; > } > } ># 136 "/usr/include/c++/4.8.2/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> > _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> > _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); > > > string __found_grouping; > if (__lc->_M_use_grouping) > __found_grouping.reserve(32); > bool __testfail = false; > bool __testoverflow = false; > const __unsigned_type __max = > (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) > ? -__gnu_cxx::__numeric_traits<_ValueT>::__min > : __gnu_cxx::__numeric_traits<_ValueT>::__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 > && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) > __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; > else > __v = __gnu_cxx::__numeric_traits<_ValueT>::__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; > } ># 730 "/usr/include/c++/4.8.2/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; > } ># 966 "/usr/include/c++/4.8.2/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); > > > > > int __cs_size = __max_digits * 3; > char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); > __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, > __fbuf, __prec, __v); > > > 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, > __fbuf, __prec, __v); > } ># 1027 "/usr/include/c++/4.8.2/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); } ># 1152 "/usr/include/c++/4.8.2/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; > } > > ># 1189 "/usr/include/c++/4.8.2/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 numpunct<char>; > extern template class 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 numpunct<wchar_t>; > extern template class 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&); > > > > >} ># 2609 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3 ># 38 "/usr/include/c++/4.8.2/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; > } ># 65 "/usr/include/c++/4.8.2/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: > > > > > > > > operator void*() const > { return this->fail() ? 0 : const_cast<basic_ios*>(this); } > > bool > operator!() const > { return this->fail(); } ># 130 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > iostate > rdstate() const > { return _M_streambuf_state; } ># 141 "/usr/include/c++/4.8.2/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; } ># 194 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > bool > fail() const > { return (this->rdstate() & (badbit | failbit)) != 0; } > > > > > > > > bool > bad() const > { return (this->rdstate() & badbit) != 0; } ># 215 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > iostate > exceptions() const > { return _M_exception; } ># 250 "/usr/include/c++/4.8.2/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() { } ># 288 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > basic_ostream<_CharT, _Traits>* > tie() const > { return _M_tie; } ># 300 "/usr/include/c++/4.8.2/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; } ># 340 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > basic_streambuf<_CharT, _Traits>* > rdbuf(basic_streambuf<_CharT, _Traits>* __sb); ># 354 "/usr/include/c++/4.8.2/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; > } ># 383 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > char_type > fill(char_type __ch) > { > char_type __old = this->fill(); > _M_fill = __ch; > return __old; > } ># 403 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > locale > imbue(const locale& __loc); ># 423 "/usr/include/c++/4.8.2/bits/basic_ios.h" 3 > char > narrow(char_type __c, char __dfault) const > { return __check_facet(_M_ctype).narrow(__c, __dfault); } ># 442 "/usr/include/c++/4.8.2/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); > > void > _M_cache_locale(const locale& __loc); > }; > > >} > ># 1 "/usr/include/c++/4.8.2/bits/basic_ios.tcc" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/basic_ios.tcc" 3 > ># 34 "/usr/include/c++/4.8.2/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++/4.8.2/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 = &use_facet<__ctype_type>(__loc); > else > _M_ctype = 0; > > if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) > _M_num_put = &use_facet<__num_put_type>(__loc); > else > _M_num_put = 0; > > if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) > _M_num_get = &use_facet<__num_get_type>(__loc); > else > _M_num_get = 0; > } > > > > > extern template class basic_ios<char>; > > > extern template class basic_ios<wchar_t>; > > > > >} ># 476 "/usr/include/c++/4.8.2/bits/basic_ios.h" 2 3 ># 45 "/usr/include/c++/4.8.2/ios" 2 3 ># 39 "/usr/include/c++/4.8.2/ostream" 2 3 > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 57 "/usr/include/c++/4.8.2/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++/4.8.2/ostream" 3 > explicit > basic_ostream(__streambuf_type* __sb) > { this->init(__sb); } > > > > > > > virtual > ~basic_ostream() { } > > > class sentry; > friend class sentry; ># 107 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/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++/4.8.2/ostream" 3 > __ostream_type& > operator<<(const void* __p) > { return _M_insert(__p); } ># 269 "/usr/include/c++/4.8.2/ostream" 3 > __ostream_type& > operator<<(__streambuf_type* __sb); ># 302 "/usr/include/c++/4.8.2/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); > } ># 334 "/usr/include/c++/4.8.2/ostream" 3 > __ostream_type& > write(const char_type* __s, streamsize __n); ># 347 "/usr/include/c++/4.8.2/ostream" 3 > __ostream_type& > flush(); ># 357 "/usr/include/c++/4.8.2/ostream" 3 > pos_type > tellp(); ># 368 "/usr/include/c++/4.8.2/ostream" 3 > __ostream_type& > seekp(pos_type); ># 380 "/usr/include/c++/4.8.2/ostream" 3 > __ostream_type& > seekp(off_type, ios_base::seekdir); > > protected: > basic_ostream() > { this->init(0); } > > template<typename _ValueT> > __ostream_type& > _M_insert(_ValueT __v); > }; ># 399 "/usr/include/c++/4.8.2/ostream" 3 > template <typename _CharT, typename _Traits> > class basic_ostream<_CharT, _Traits>::sentry > { > > bool _M_ok; > basic_ostream<_CharT, _Traits>& _M_os; > > public: ># 418 "/usr/include/c++/4.8.2/ostream" 3 > explicit > sentry(basic_ostream<_CharT, _Traits>& __os); ># 428 "/usr/include/c++/4.8.2/ostream" 3 > ~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); > } > } ># 447 "/usr/include/c++/4.8.2/ostream" 3 > explicit > > operator bool() const > { return _M_ok; } > }; ># 469 "/usr/include/c++/4.8.2/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)); } ># 511 "/usr/include/c++/4.8.2/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)); } ># 562 "/usr/include/c++/4.8.2/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'))); } ># 574 "/usr/include/c++/4.8.2/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(); } ># 600 "/usr/include/c++/4.8.2/ostream" 3 > template<typename _CharT, typename _Traits, typename _Tp> > inline basic_ostream<_CharT, _Traits>& > operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) > { > __os << __x; > return __os; > } > > > >} > ># 1 "/usr/include/c++/4.8.2/bits/ostream.tcc" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/ostream.tcc" 3 > ># 38 "/usr/include/c++/4.8.2/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*); > > > > >} ># 613 "/usr/include/c++/4.8.2/ostream" 2 3 ># 65 "/usr/include/c++/4.8.2/iterator" 2 3 ># 1 "/usr/include/c++/4.8.2/istream" 1 3 ># 36 "/usr/include/c++/4.8.2/istream" 3 > ># 37 "/usr/include/c++/4.8.2/istream" 3 > > > > >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 57 "/usr/include/c++/4.8.2/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++/4.8.2/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++/4.8.2/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++/4.8.2/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++/4.8.2/istream" 3 > __istream_type& > operator>>(void*& __p) > { return _M_extract(__p); } ># 258 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > operator>>(__streambuf_type* __sb); ># 268 "/usr/include/c++/4.8.2/istream" 3 > streamsize > gcount() const > { return _M_gcount; } ># 301 "/usr/include/c++/4.8.2/istream" 3 > int_type > get(); ># 315 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > get(char_type& __c); ># 342 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > get(char_type* __s, streamsize __n, char_type __delim); ># 353 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > get(char_type* __s, streamsize __n) > { return this->get(__s, __n, this->widen('\n')); } ># 376 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > get(__streambuf_type& __sb, char_type __delim); ># 386 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > get(__streambuf_type& __sb) > { return this->get(__sb, this->widen('\n')); } ># 415 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > getline(char_type* __s, streamsize __n, char_type __delim); ># 426 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > getline(char_type* __s, streamsize __n) > { return this->getline(__s, __n, this->widen('\n')); } ># 450 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > ignore(streamsize __n, int_type __delim); > > __istream_type& > ignore(streamsize __n); > > __istream_type& > ignore(); ># 467 "/usr/include/c++/4.8.2/istream" 3 > int_type > peek(); ># 485 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > read(char_type* __s, streamsize __n); ># 504 "/usr/include/c++/4.8.2/istream" 3 > streamsize > readsome(char_type* __s, streamsize __n); ># 521 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > putback(char_type __c); ># 537 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > unget(); ># 555 "/usr/include/c++/4.8.2/istream" 3 > int > sync(); ># 570 "/usr/include/c++/4.8.2/istream" 3 > pos_type > tellg(); ># 585 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > seekg(pos_type); ># 601 "/usr/include/c++/4.8.2/istream" 3 > __istream_type& > seekg(off_type, ios_base::seekdir); > > > protected: > basic_istream() > : _M_gcount(streamsize(0)) > { this->init(0); } > > 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); ># 656 "/usr/include/c++/4.8.2/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; ># 692 "/usr/include/c++/4.8.2/istream" 3 > explicit > sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); ># 703 "/usr/include/c++/4.8.2/istream" 3 > explicit > > operator bool() const > { return _M_ok; } > }; ># 721 "/usr/include/c++/4.8.2/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)); } ># 763 "/usr/include/c++/4.8.2/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)); } ># 794 "/usr/include/c++/4.8.2/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() { } > }; ># 854 "/usr/include/c++/4.8.2/istream" 3 > template<typename _CharT, typename _Traits> > basic_istream<_CharT, _Traits>& > ws(basic_istream<_CharT, _Traits>& __is); ># 870 "/usr/include/c++/4.8.2/istream" 3 > template<typename _CharT, typename _Traits, typename _Tp> > inline basic_istream<_CharT, _Traits>& > operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) > { > __is >> __x; > return __is; > } > > > >} > ># 1 "/usr/include/c++/4.8.2/bits/istream.tcc" 1 3 ># 37 "/usr/include/c++/4.8.2/bits/istream.tcc" 3 > ># 38 "/usr/include/c++/4.8.2/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++/4.8.2/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>; > > > > >} ># 883 "/usr/include/c++/4.8.2/istream" 2 3 ># 66 "/usr/include/c++/4.8.2/iterator" 2 3 ># 1 "/usr/include/c++/4.8.2/bits/stream_iterator.h" 1 3 ># 33 "/usr/include/c++/4.8.2/bits/stream_iterator.h" 3 > ># 34 "/usr/include/c++/4.8.2/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(&__s) > { _M_read(); } > > istream_iterator(const istream_iterator& __obj) > : _M_stream(__obj._M_stream), _M_value(__obj._M_value), > _M_ok(__obj._M_ok) > { } > > const _Tp& > operator*() const > { > > > ; > return _M_value; > } > > const _Tp* > operator->() const { return &(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); } ># 152 "/usr/include/c++/4.8.2/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(&__s), _M_string(0) {} ># 183 "/usr/include/c++/4.8.2/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 _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++/4.8.2/iterator" 2 3 ># 3 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/iterator.h" 2 > > >namespace hsh >{ > > template <class C> > constexpr auto size(const C& c) -> decltype(c.size()) { return c.size(); } > > template <class T, size_t N> > constexpr size_t size(const T(&)[N]) noexcept { return N; } > > > template <class C> > constexpr auto data(C& c) -> decltype(c.data()) { return c.data(); } > > template <class C> > constexpr auto data(const C& c) -> decltype(c.data()) { return c.data(); } > > template <class T, size_t N> > constexpr T* data(T(&array)[N]) noexcept { return array; } > > template <class T> > constexpr const T* data(std::initializer_list<T> il) noexcept { return il.begin(); } > > > template <class C> > constexpr auto empty(const C& c) -> decltype(c.empty()) { return c.empty(); } > > template <class T, std::size_t N> > constexpr bool empty(const T (&array)[N]) noexcept { return false; } > > template <class E> > constexpr bool empty(std::initializer_list<E> il) noexcept { return il.size() == 0; } > > > template<class C> > constexpr auto cbegin( const C& c ) noexcept(noexcept(std::begin(c))) -> decltype(std::begin(c)) { return std::begin(c); } > > > template<class C> > constexpr auto cend(const C& c) noexcept(noexcept(std::end(c))) -> decltype(std::end(c)) { return std::end(c); } > > > template<class C> > constexpr auto rbegin(C& c) -> decltype(c.rbegin()) { return c.rbegin(); } > > template<class C> > constexpr auto rbegin(const C& c) -> decltype(c.rbegin()) { return c.rbegin(); } > > template<class T, size_t N> > constexpr std::reverse_iterator<T*> rbegin(T(&array)[N]) { return std::reverse_iterator<T*>(array + N); } > > > template<class C> > constexpr auto crbegin(const C& c) -> decltype(hsh::rbegin(c)) { return hsh::rbegin(c); } > > > template<class C> > constexpr auto rend(C& c) -> decltype(c.rend()) { return c.rend(); } > > template<class C> > constexpr auto rend(const C& c) -> decltype(c.rend()) { return c.rend(); } > > template<class T, size_t N> > constexpr std::reverse_iterator<T*> rend(T(&array)[N]) { return std::reverse_iterator<T*>(array); } > > > template<class C> > constexpr auto crend(const C& c) -> decltype(hsh::rend(c)) { return hsh::rend(c); } > > template<typename UnaryFunction> > struct function_output_iterator > { > using iterator_category = std::output_iterator_tag; > using value_type = void; > using difference_type = void; > using pointer = void; > using reference = void; > > explicit function_output_iterator() {} > explicit function_output_iterator(const UnaryFunction& f) : f(f) {} > explicit function_output_iterator(UnaryFunction&& f) : f(std::move(f)) {} > > function_output_iterator& operator++() { return *this; } > function_output_iterator& operator++(int) { return *this; } > function_output_iterator& operator*() { return *this; } > > template <class T> > function_output_iterator& operator=(T&& value) noexcept(hsh::is_nothrow_invocable<UnaryFunction, T&&>::value) > { > hsh::invoke(f, std::forward<T>(value)); > return *this; > } > > private: > UnaryFunction f; > }; > > template <class UnaryFunction> > inline function_output_iterator<UnaryFunction> make_function_output_iterator(const UnaryFunction&f = UnaryFunction()) > { > return function_output_iterator<UnaryFunction>(f); > } > >} ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/span.h" 2 > > >namespace hsh >{ > constexpr size_t dynamic_extent = std::numeric_limits<std::size_t>::max(); > > template <typename T, size_t extent = dynamic_extent> > class span; > > namespace detail > { > > template <typename T, size_t S> > class span_storage > { > public: > constexpr span_storage() noexcept {} > constexpr span_storage(T* ptr, std::size_t) noexcept : ptr(ptr) {} > > T* ptr = nullptr; > static constexpr size_t len = S; > }; > > > template <typename T> > class span_storage<T, dynamic_extent> > { > public: > constexpr span_storage() noexcept {} > constexpr span_storage(T* ptr, size_t size) noexcept : ptr(ptr), len(size){} > > T* ptr = nullptr; > size_t len = 0; > }; > > > template <typename> > struct is_span : std::false_type {}; > > template <typename T, size_t S> > struct is_span<span<T, S>> : std::true_type {}; > > > template <typename, typename = void> > struct has_size_and_data : std::false_type {}; > > template <typename T> > struct has_size_and_data<T, void_t<decltype(hsh::size(std::declval<T>())), decltype(hsh::data(std::declval<T>()))>> : std::true_type {}; > > > template <typename C, typename U = remove_cv_t<remove_reference_t<C>>> > struct is_container { > static constexpr bool value = > !is_span<U>::value && !hsh::is_std_array<U>::value && > !std::is_array<U>::value && has_size_and_data<C>::value; > }; > > template <size_t From, size_t To> > struct is_allowed_extent_conversion > : public std::integral_constant<bool, From == To || From == hsh::dynamic_extent || > To == hsh::dynamic_extent>{}; > > > > template <typename, typename, typename = void> > struct is_container_element_type_compatible : std::false_type {}; > > template <typename T, typename E> > struct is_container_element_type_compatible< > T, E, > enable_if_t< > !std::is_same<remove_cv_t<decltype(hsh::data(std::declval<T>()))>,void>::value>> > : std::is_convertible<remove_pointer_t<decltype(hsh::data(std::declval<T>()))>(*)[], E(*)[]> {}; > > } > > > template<typename T, size_t extent> > class span > { > public: > using element_type = T; > using value_type = typename std::remove_cv<T>::type; > using size_type = size_t; > using difference_type = ptrdiff_t; > using pointer = element_type*; > using const_pointer = const element_type*; > using reference = element_type&; > using iterator = pointer; > using const_iterator = const_pointer; > using reverse_iterator = std::reverse_iterator<iterator>; > using const_reverse_iterator = std::reverse_iterator<const_iterator>; > static constexpr size_type npos = static_cast<size_type>(-1); > > template <size_t E = extent, enable_if_t<detail::is_allowed_extent_conversion<0,E>::value, int> = 0> > constexpr span() noexcept {} > > constexpr span(pointer buffer, size_type length) noexcept : storage(buffer, length) {} > > constexpr span(pointer first_elem, pointer last_elem) noexcept : storage(first_elem, last_elem - first_elem) {} > > template <size_t N, size_t E = extent, > enable_if_t<detail::is_allowed_extent_conversion<N,E>::value && > detail::is_container_element_type_compatible<T(&)[N], T>::value, int> = 0> > constexpr span(T(&arr)[N]) noexcept : storage(arr, N) {} > > template <size_t N, size_t E = extent, > enable_if_t<detail::is_allowed_extent_conversion<N,E>::value && > detail::is_container_element_type_compatible<std::array<value_type, N>&, T>::value, int> = 0> > constexpr span(std::array<value_type, N>& arr) noexcept : storage(arr.data(), N) {} > > template <size_t N, size_t E = extent, > enable_if_t<detail::is_allowed_extent_conversion<N, E>::value && > detail::is_container_element_type_compatible<const std::array<value_type, N>&, T>::value,int> = 0> > constexpr span(const std::array<value_type, N>& arr) noexcept : storage(arr.data(), N) {} > > template < > typename Container, size_t E = extent, > enable_if_t< > E == dynamic_extent && detail::is_container<Container>::value && > detail::is_container_element_type_compatible<Container&, T>::value,int> = 0> > constexpr span(Container& c) noexcept : storage(hsh::data(c), hsh::size(c)) {} > > template < > typename Container, size_t E = extent, > enable_if_t< > E == dynamic_extent && detail::is_container<Container>::value && > detail::is_container_element_type_compatible<const Container&, T>::value,int> = 0> > constexpr span(const Container& c) noexcept : storage(hsh::data(c), hsh::size(c)) {} > > template <typename OtherElementType, size_t OtherExtent, > enable_if_t<detail::is_allowed_extent_conversion<OtherExtent, extent>::value && std::is_convertible<OtherElementType(*)[],T(*)[]>::value,int> = 0> > constexpr span(const span<OtherElementType, OtherExtent>& other) noexcept > : storage(other.data(), other.size()) {} > > span& operator=(const span& other) noexcept = default; > > constexpr pointer data() const noexcept { return storage.ptr; } > > constexpr size_type size() const noexcept { return storage.len; } > > constexpr size_type length() const noexcept { return size(); } > > constexpr bool empty() const noexcept { return size() == 0; } > > constexpr reference operator[](size_type i) const noexcept { return storage.ptr[i]; } > > constexpr reference at(size_type i) const { > if (i < storage.len) { > return storage.ptr[i]; > } > throw std::out_of_range("out of range access on hsh::span"); > } > > constexpr reference front() const noexcept { return *data(); } > > constexpr reference back() const noexcept { return *(data() + size() - 1); } > > constexpr iterator begin() const noexcept { return data(); } > constexpr const_iterator cbegin() const noexcept { return begin(); } > > constexpr iterator end() const noexcept { return data() + size(); } > constexpr const_iterator cend() const noexcept { return end(); } > > constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator(end()); } > constexpr const_reverse_iterator crbegin() const noexcept { return rbegin(); } > > constexpr reverse_iterator rend() const noexcept { return reverse_iterator(begin()); } > constexpr const_reverse_iterator crend() const noexcept { return rend(); } > > friend constexpr iterator begin(span s) noexcept { return s.begin(); } > friend constexpr iterator end(span s) noexcept { return s.end(); } > > void remove_prefix(size_type n) noexcept > { > storage.ptr += n; > storage.len -= n; > } > > void remove_suffix(size_type n) noexcept { storage.len -= n; } > > template <size_t Offset, size_t Count = dynamic_extent> > using subspan_return_t = span<T, Count != dynamic_extent ? Count > : (extent != dynamic_extent ? extent - Offset : dynamic_extent)>; > > template <size_t Offset, size_t Count = dynamic_extent> > constexpr subspan_return_t<Offset, Count> subspan() const { > return { data() + Offset, Count != dynamic_extent ? Count : size() - Offset }; > } > > constexpr span<T, dynamic_extent> subspan(size_type offset, size_type count = dynamic_extent) const { > return { data() + offset, count == dynamic_extent ? size() - offset : count }; > } > > template<size_t Count> > constexpr span<T, Count> first() const { return { data(), Count }; } > > constexpr span<T, dynamic_extent> first(size_type count) const { return { data(), count }; } > > template<size_t Count> > constexpr span<T, Count> last() const { return { data() + (size() - Count), Count }; } > > constexpr span<T, dynamic_extent> last(size_type count) const { > return { data() + (size() - count), count }; > } > > private: > using storage_type = detail::span_storage<T, extent>; > storage_type storage; > }; > > template <typename T, size_t Extent> > constexpr span<T, Extent> make_span(span<T, Extent> s) noexcept { > return s; > } > > template <typename T, size_t N> > constexpr span<T, N> make_span(T(&arr)[N]) noexcept { > return { arr }; > } > > template <typename T, size_t N> > constexpr span<T, N> make_span(std::array<T, N>& arr) noexcept { > return { arr }; > } > > template <typename T, size_t N> > constexpr span<const T, N> make_span(const std::array<T, N>& arr) noexcept { > return { arr }; > } > > template <typename Container> > constexpr span<typename Container::value_type> make_span(Container& cont) { > return { cont }; > } > > template <typename Container> > constexpr span<const typename Container::value_type> make_span(const Container& cont) { > return { cont }; > } >} ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryStreams.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/string_view.h" 1 > > > > > > >namespace hsh >{ > > class string_view > { > public: > using traits_type = std::char_traits<char>; > using value_type = char; > using pointer = char*; > using const_pointer = const char*; > using reference = char&; > using const_reference = const char&; > using const_iterator = const char*; > using iterator = const_iterator; > using const_reverse_iterator = std::reverse_iterator<const_iterator>; > using reverse_iterator = const_reverse_iterator; > using size_type = size_t; > using difference_type = std::ptrdiff_t; > > > static constexpr size_t npos = static_cast<size_t>(-1); > > constexpr string_view() noexcept = default; > > template <typename Allocator> > constexpr string_view(const std::basic_string<char, std::char_traits<char>, Allocator>&str) noexcept > : ptr(str.data()), len(str.size()) {} > > constexpr string_view(const char* str) : ptr(str), len(str ? strlen_internal(str) : 0) {} > > constexpr string_view(const char* data, size_type len) : ptr(data), len(len) {} > > constexpr bool empty() const noexcept { return !len; } > > explicit operator bool() const { return len; } > > constexpr size_type size() const noexcept { return len; } > constexpr size_type length() const noexcept { return len; } > > constexpr size_type max_size() const noexcept { return std::numeric_limits<difference_type>::max(); } > > constexpr const_iterator begin() const noexcept { return ptr; } > constexpr const_iterator end() const noexcept { return ptr + len; } > > constexpr const_iterator cbegin() const noexcept { return begin(); } > constexpr const_iterator cend() const noexcept { return end(); } > > const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } > const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } > > const_reverse_iterator crbegin() const noexcept { return rbegin(); } > const_reverse_iterator crend() const noexcept { return rend(); } > > constexpr const_reference front() const { return ptr[0]; } > constexpr const_reference back() const { return ptr[len - 1]; } > > constexpr const_pointer data() const noexcept { return ptr; } > > constexpr const_reference operator[](size_type i) const { return ptr[i]; } > > const_reference at(size_type i) const { > if (i >= len) { > throw std::out_of_range("hsh::string_view out of bounds"); > } > return ptr[i]; > } > > void remove_prefix(size_type n) { > ptr += n; > len -= n; > } > > void remove_suffix(size_type n) { len -= n; } > > void swap(string_view& s) noexcept { > std::swap(this->ptr, s.ptr); > std::swap(this->len, s.len); > } > > template <typename Alloc = std::allocator<char>> > explicit operator std::basic_string<char, traits_type, Alloc>() const { > if (!ptr) { > return {}; > } > return std::basic_string<char, traits_type, Alloc>(ptr, len); > } > > > template <typename Alloc = std::allocator<char>> > std::basic_string<char, traits_type, Alloc> to_terminated_string() const { > if (!ptr) { > return {}; > } > auto terminator = find('\0'); > return npos == terminator ? std::basic_string<char, traits_type, Alloc>(ptr, len) : std::basic_string<char, traits_type, Alloc>(ptr, terminator); > } > > size_type copy(char *buf, size_type n, size_type pos = 0) const { > if (pos > len) { > throw std::out_of_range("hsh::string_view out of bounds"); > } > > size_type copy_len = std::min(len - pos, n); > if (copy_len > 0) { > traits_type::copy(buf, ptr + pos, copy_len); > } > return copy_len; > } > > string_view substr(size_type pos, size_type n = npos) const { > if (pos > len) { > throw std::out_of_range("hsh::string_view out of bounds"); > } > return string_view(ptr + pos, std::min(n, len - pos)); > } > > int compare(string_view s) const noexcept > { > const int cmp = traits_type::compare(ptr, s.ptr, std::min(len, s.len)); > return cmp != 0 ? cmp : (len == s.len ? 0 : len < s.len ? -1 : 1); > } > > int compare(size_type pos1, size_type count1, string_view s) const { return substr(pos1, count1).compare(s); } > > int compare(size_type pos1, size_type count1, string_view v, size_type pos2, size_type count2) const { > return substr(pos1, count1).compare(v.substr(pos2, count2)); > } > > int compare(const char* s) const { return compare(string_view(s)); } > > int compare(size_type pos1, size_type count1, const char* s) const { return substr(pos1, count1).compare(string_view(s)); } > > int compare(size_type pos1, size_type count1, const char* s, size_type count2) const { > return substr(pos1, count1).compare(string_view(s, count2)); > } > > bool starts_with(string_view sv) const noexcept { return 0 == substr(0, sv.size()).compare(sv); } > > bool starts_with(char c) const noexcept { return !empty() && front() == c; } > > bool ends_with(string_view sv) const noexcept { > return size() >= sv.size() && compare(size() - sv.size(), npos, sv) == 0; > } > > bool ends_with(char c) const noexcept { return !empty() && back() == c; } > > bool contains(string_view sv) const noexcept { return npos != find(sv); } > > bool contains(char c) const noexcept { return npos != find(c); } > > size_type find(string_view s, size_type pos = 0) const noexcept > { > if ( pos > len ) { > return npos; > } > if ( s.empty() ) { > return pos; > } > auto iter = std::search(cbegin() + pos, cend(), s.cbegin(), s.cend(), traits_type::eq); > return iter == cend() ? npos : std::distance(cbegin(), iter); > } > > size_type find(char c, size_type pos = 0) const noexcept { return find(string_view(&c, 1), pos); } > > size_type rfind(string_view s, size_type pos = npos) const noexcept > { > if (len < s.len) { > return npos; > } > if (pos > len - s.len) { > pos = len - s.len; > } > if (!s.len) { > return pos; > } > for (const char *cur = ptr + pos; ; --cur) > { > if (!traits_type::compare(cur, s.ptr, s.len)) { > return cur - ptr; > } > if (cur == ptr) { > return npos; > } > }; > return npos; > } > > size_type rfind(char c, size_type pos = npos) const noexcept { return rfind(string_view(&c, 1), pos); } > > size_type find_first_of(string_view s, size_type pos = 0) const noexcept > { > if (pos >= len || !s.len) { > return npos; > } > auto iter = std::find_first_of(cbegin() + pos, cend(), s.cbegin(), s.cend(), traits_type::eq); > return iter == cend() ? npos : std::distance(cbegin(), iter); > } > > size_type find_first_of(char c, size_type pos = 0) const noexcept { return find(c, pos); } > > size_type find_last_of(string_view s, size_type pos = npos) const noexcept > { > if (!s.len) { > return npos; > } > if (pos >= len) { > pos = 0; > } else { > pos = len - (pos + 1); > } > auto iter = std::find_first_of(crbegin() + pos, crend(), s.cbegin(), s.cend(), traits_type::eq); > return iter == crend() ? npos : (std::distance(cbegin(), iter.base()) - 1); > } > > size_type find_last_of(char c, size_type pos = npos) const noexcept { return rfind(c, pos); } > > size_type find_first_not_of(string_view s, size_type pos = 0) const noexcept > { > if (pos >= len) { > return npos; > } > if (!s.len) { > return pos; > } > const_iterator iter = find_not_of(this->cbegin() + pos, this->cend(), s); > return iter == cend() ? npos : std::distance(cbegin(), iter); > } > > size_type find_first_not_of(char c, size_type pos = 0) const noexcept { return find_first_not_of(string_view(&c, 1), pos); } > > size_type find_last_not_of(string_view s, size_type pos = npos) const noexcept > { > if (!len) { > return npos; > } > if (pos >= len) { > pos = len - 1; > } > if (!s.len) { > return pos; > } > pos = len - (pos + 1); > auto iter = find_not_of(this->crbegin() + pos, this->crend(), s); > return iter == this->crend() ? npos : (std::distance(cbegin(), iter.base()) - 1); > } > > size_type find_last_not_of(char c, size_type pos = npos) const noexcept{ return find_last_not_of(string_view(&c, 1), pos); } > > private: > template <typename Iterator> > Iterator find_not_of(Iterator first, Iterator last, string_view s) const noexcept { > for (; first != last; ++first) { > if (!traits_type::find(s.ptr, s.len, *first)) { > return first; > } > } > return last; > } > > static constexpr size_t strlen_internal(const char* str) > { > > > > > > > > return __builtin_strlen(str); > > > > } > > const char* ptr = nullptr; > size_t len = 0u; > }; > > > inline bool operator==(string_view x, string_view y) noexcept { return x.size() != y.size() ? false : x.compare(y) == 0; } > inline bool operator!=(string_view x, string_view y) noexcept { return !(x == y); } > inline bool operator<(string_view x, string_view y) noexcept { return x.compare(y) < 0; } > inline bool operator>(string_view x, string_view y) noexcept { return y < x; } > inline bool operator<=(string_view x, string_view y) noexcept { return !(y < x); } > inline bool operator>=(string_view x, string_view y) noexcept { return !(x < y); } > > namespace detail > { > inline void sv_write_padding(std::ostream& o, size_t pad) > { > char fill_buf[32]; > memset(fill_buf, o.fill(), sizeof(fill_buf)); > while (pad) { > size_t n = std::min(pad, sizeof(fill_buf)); > o.write(fill_buf, n); > pad -= n; > } > } > } > > > inline std::ostream& operator<<(std::ostream& o, string_view piece) > { > std::ostream::sentry sentry(o); > if (sentry) > { > size_t lpad = 0; > size_t rpad = 0; > if (static_cast<size_t>(o.width()) > piece.size()) > { > size_t pad = o.width() - piece.size(); > if ((o.flags() & o.adjustfield) == o.left) { > rpad = pad; > } else { > lpad = pad; > } > } > > if (lpad) { > detail::sv_write_padding(o, lpad); > } > o.write(piece.data(), piece.size()); > > if (rpad) { > detail::sv_write_padding(o, rpad); > } > o.width(0); > } > return o; > } >} > > >constexpr hsh::string_view operator "" _sv(const char* str, size_t len) noexcept { return hsh::string_view{ str, len }; } ># 8 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryStreams.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/flat_map.h" 1 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/algorithm.h" 1 > > > > > >namespace hsh >{ > > template <typename RandomAccessIterator, typename Comp> > void sort_subrange(RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator sub_first, RandomAccessIterator sub_last, Comp comp) > { > static_assert(std::is_same<std::random_access_iterator_tag, > typename std::iterator_traits<RandomAccessIterator>::iterator_category>::value, "sort_subrange needs a random access iterator\n"); > ((first <= last) ? static_cast<void> (0) : __assert_fail ("first <= last", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/algorithm.h", 14, __PRETTY_FUNCTION__)); > ((sub_first <= sub_last) ? static_cast<void> (0) : __assert_fail ("sub_first <= sub_last", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/algorithm.h", 15, __PRETTY_FUNCTION__)); > > if(first == last || sub_first == sub_last){ > return; > } > > constexpr double PARTIAL_SORT_PERCENTAGE = 0.06; > constexpr double BOUND_PERCENTAGE = 0.15; > > auto range_size = std::distance(first, last); > auto sub_range_size = std::distance(sub_first, sub_last); > double percentage_of_range = sub_range_size / (double)range_size; > > if( percentage_of_range < PARTIAL_SORT_PERCENTAGE ) > { > > auto sort_start_itr = first; > double total_percentage = std::distance(first, sub_last) / (double)range_size; > if ( total_percentage > PARTIAL_SORT_PERCENTAGE) > { > > std::nth_element(first, sub_first, last, comp); > sort_start_itr = sub_first + 1; > } > std::partial_sort(sort_start_itr, sub_last, last, comp); > return; > } > > auto sort_start_itr = first; > auto sort_end_itr = last; > > double percentage_from_beginning = std::distance(first, sub_first) / (double)range_size; > if(percentage_from_beginning >= BOUND_PERCENTAGE) > { > std::nth_element(first, sub_first, last, comp); > sort_start_itr = sub_first + 1; > } > > double percentage_from_end = std::distance(sub_last, last) / (double)range_size; > if(percentage_from_end >= BOUND_PERCENTAGE) > { > std::nth_element(sort_start_itr, sub_last, last, comp); > sort_end_itr = sub_last - 1; > } > std::sort(sort_start_itr, sort_end_itr, comp); > } > > > template <typename RandomAccessIterator> > void sort_subrange(RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator sub_first, RandomAccessIterator sub_last) > { > using Less = std::less<typename std::iterator_traits<RandomAccessIterator>::value_type>; > sort_subrange(first, last, sub_first, sub_last, Less()); > } > > > > > > > template <typename ForwardIterator, typename OutputIterator, typename T> > ForwardIterator remove_copy(ForwardIterator first, ForwardIterator last, const T& value, OutputIterator out) > { > first = std::find(first, last, value); > if (first != last) > { > *out++ = std::move(*first); > for (auto it = std::next(first); it != last; ++it) > { > if ( !(*it == value) ) { > *first++ = std::move(*it); > } else { > *out++ = std::move(*it); > } > } > } > return first; > } > > template<typename ForwardIterator, typename OutputIterator, class UnaryPredicate> > ForwardIterator remove_copy_if(ForwardIterator first, ForwardIterator last, OutputIterator out, UnaryPredicate p) > { > first = std::find_if(first, last, p); > if (first != last) > { > *out++ = std::move(*first); > for (auto it = std::next(first); it != last; ++it ) > { > if ( !p(*it) ) { > *first++ = std::move(*it); > } else { > *out++ = std::move(*it); > } > } > } > return first; > } > > > template <typename ForwardIterator, typename T> > ForwardIterator binary_find(ForwardIterator first, ForwardIterator last, const T& value) > { > first = std::lower_bound(first, last, value); > return first != last && !(value < *first) ? first : last; > } > > template <typename ForwardIterator, typename T, typename Compare> > ForwardIterator binary_find(ForwardIterator first, ForwardIterator last, const T& value, Compare comp) > { > first = std::lower_bound(first, last, value, comp); > return first != last && !comp(value, *first) ? first : last; > } > > namespace details > { > template <typename ForwardIt> > constexpr bool static static_is_sorted_impl(ForwardIt lhs, ForwardIt rhs, ForwardIt last) > { > return rhs == last ? true : *lhs < *rhs ? static_is_sorted_impl(++lhs, ++rhs, last) : false; > } > > template <typename ForwardIt, typename Comp> > constexpr bool static static_is_sorted_impl(ForwardIt lhs, ForwardIt rhs, ForwardIt last, Comp&& comp) > { > return rhs == last ? true : comp(*lhs, *rhs) ? static_is_sorted_impl(++lhs, ++rhs, last, hsh::forward<Comp>(comp)) : false; > } > } > > template <typename ForwardIt> > constexpr bool static static_is_sorted(ForwardIt first, ForwardIt last) > { > return first == last ? true : details::static_is_sorted_impl(first, first + 1, last); > } > > template <typename ForwardIt, typename Comp> > constexpr bool static static_is_sorted(ForwardIt first, ForwardIt last, Comp&& comp) > { > return first == last ? true : details::static_is_sorted_impl(first, first + 1, last, hsh::forward<Comp>(comp)); > } > > > > > template <typename ForwardIterator, typename T> > bool contains(ForwardIterator first, ForwardIterator last, const T& value) { > return last != std::find(first, last, value); > } > > > template <typename ForwardIterator> > bool is_unique(ForwardIterator first, ForwardIterator last){ > return last == std::adjacent_find(first, last); > } > > > template <typename ForwardIterator, class BinaryPredicate> > bool is_unique(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) { > return last == std::adjacent_find(first, last, pred); > } > > > template<class T> > constexpr const T& clamp(const T& val, const T& low, const T& high) > { > return (val < low) ? low : (high < val) ? high : val; > } > > template<class T, class Compare> > constexpr const T& clamp(const T& val, const T& low, const T& high, Compare comp) > { > return comp(val, low) ? low : comp(high, val) ? high : val; > } > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/flat_map.h" 2 > > > > > >namespace hsh >{ > namespace details > { > template <typename Compare,typename Key, typename Value, bool = std::is_empty<Compare>::value> > class flat_map_compare > { > using Data = std::pair<Key, Value>; > public: > flat_map_compare() : cmp() {} > explicit flat_map_compare(const Compare &cmp) : cmp(cmp) {} > > Compare& get_compare() { return cmp; } > const Compare& get_compare() const { return cmp; } > > inline bool operator()(const Key& a, const Key& b) const { return cmp(a, b); } > inline bool operator()(const Key& a, const Data& b) const { return cmp(a, b.first); } > inline bool operator()(const Data& a, const Key& b) const { return cmp(a.first, b); } > inline bool operator()(const Data& a, const Data& b) const { return cmp(a.first, b.first); } > > private: > Compare cmp; > }; > > > template <typename Compare, typename Key, typename Value> > class flat_map_compare<Compare, Key, Value, true> : private Compare > { > using Data = std::pair<Key, Value>; > public: > flat_map_compare() : Compare() {} > explicit flat_map_compare(const Compare &cmp) : Compare(cmp) {} > > Compare& get_compare() { return *this; } > const Compare& get_compare() const { return *this; } > > inline bool operator()(const Key& a, const Key& b) const { > return Compare::operator()(a, b); > } > > inline bool operator()(const Key& a, const Data& b) const { > return Compare::operator()(a, b.first); > } > > inline bool operator()(const Data& a, const Key& b) const { > return Compare::operator()(a.first, b); > } > > inline bool operator()(const Data& a, const Data& b) const { > return Compare::operator()(a.first, b.first); > } > }; > } > > template<typename Key, typename T, > typename Compare = std::less<Key>, class Allocator = std::allocator<std::pair<Key, T>>> > class flat_map : private details::flat_map_compare<Compare, Key, T> > { > using cmp = details::flat_map_compare<Compare, Key, T>; > public: > > using key_type = Key; > using mapped_type = T; > using value_type = std::pair<Key, T>; > using size_type = size_t; > using difference_type = ptrdiff_t; > using key_compare = Compare; > using value_compare = Compare; > using allocator_type = Allocator; > using reference = value_type& ; > using const_reference = const value_type&; > using container_type = std::vector <value_type, allocator_type>; > using pointer = typename std::allocator_traits<Allocator>::pointer; > using const_pointer = typename std::allocator_traits<Allocator>::const_pointer; > using iterator = typename std::vector<value_type, Allocator>::const_iterator; > using const_iterator = iterator; > using reverse_iterator = typename std::vector<value_type, Allocator>::const_reverse_iterator; > using const_reverse_iterator = reverse_iterator; > > > > flat_map() = default; > > explicit flat_map(const Compare& comp, const Allocator& alloc = Allocator()) : cmp(comp), container(alloc) {} > > template< class InputIt > > flat_map(InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc) > { > std::sort(container.begin(), container.end(), get_cmp()); > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > template<class InputIt> > flat_map(hsh::ordered_range_t, InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc) > { > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > template<class InputIt> > flat_map(hsh::ordered_unique_range_t, InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc) {} > > template< class InputIt > > flat_map(InputIt first, InputIt last, const Allocator& alloc) : flat_map(first, last, Compare(), alloc) {} > > template< class InputIt > > flat_map(hsh::ordered_range_t, InputIt first, InputIt last, const Allocator& alloc) : flat_map(hsh::ordered_range, first, last, Compare(), alloc) {} > > template< class InputIt > > flat_map(hsh::ordered_unique_range_t, InputIt first, InputIt last, const Allocator& alloc) : flat_map(hsh::ordered_unique_range, first, last, Compare(), alloc) {} > > flat_map(std::initializer_list<value_type> init, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) : flat_map(init.begin(), init.end(), comp, alloc) {} > flat_map(std::initializer_list<value_type> init, const Allocator& alloc) : flat_map(init, Compare(), alloc) {} > > explicit flat_map(container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) > { > std::sort(container.begin(), container.end(), get_cmp()); > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > flat_map(hsh::ordered_range_t, container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) > { > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > flat_map(hsh::ordered_unique_range_t, container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) {} > > flat_map(const flat_map& other) = default; > flat_map(const flat_map& other, const Allocator& alloc) : cmp(other.cmp), container(other.container, alloc) {} > > flat_map(flat_map&& other) = default; > flat_map(flat_map&& other, const Allocator& alloc) : cmp(std::move(other.cmp)), container(std::move(other.container), alloc) {} > > > flat_map& operator=(const flat_map& other) = default; > > flat_map& operator=(flat_map&& other) = default; > > flat_map& operator=(std::initializer_list<value_type> ilist) > { > clear(); > insert(ilist.begin(), ilist.end()); > return *this; > } > > flat_map& operator=(container_type&& data) > { > container = std::move(data); > std::sort(container.begin(), container.end(), get_cmp()); > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > return *this; > } > > > allocator_type get_allocator() const noexcept { return container.get_allocator(); } > key_compare key_comp() const { return cmp::get_compare(); } > value_compare value_comp() const { return cmp::get_compare(); } > > > const_iterator begin() const noexcept { return container.cbegin(); } > const_iterator cbegin() const noexcept { return begin(); } > > const_iterator end() const noexcept { return container.cend(); } > const_iterator cend() const noexcept { return end(); } > > const_reverse_iterator rbegin() const noexcept { return container.rbegin(); } > const_reverse_iterator crbegin() const noexcept { return rbegin(); } > > const_reverse_iterator rend() const noexcept { return container.crend(); } > const_reverse_iterator crend() const noexcept { return rend(); } > > > bool empty() const noexcept { return container.empty(); } > size_type size() const noexcept { return container.size(); } > size_type capacity() const noexcept { return container.capacity(); } > void reserve(size_type n) { container.reserve(n); } > void shrink_to_fit() { container.shrink_to_fit(); } > size_type max_size() const noexcept { return std::numeric_limits<difference_type>::max(); } > > > const value_type* data() const noexcept { return container.data(); } > const_reference front() const { return container.front(); } > const_reference back() const { return container.back(); } > const_iterator nth(size_type n) const noexcept { return begin() + n; } > size_type index_of(const_iterator it) const noexcept { return (size_type)std::distance(begin(), it); } > mapped_type& operator[](const key_type& k); > mapped_type& operator[](key_type&& k); > mapped_type& at(const Key& key); > const mapped_type& at(const Key& key) const; > > > > container_type extract() && noexcept { return std::move(container); } > void clear() noexcept { container.clear(); } > > std::pair<iterator, bool> insert(const value_type& value); > std::pair<iterator, bool> insert(value_type&& value); > iterator insert(const_iterator hint, const value_type& value); > iterator insert(const_iterator hint, value_type&& value); > > template< class InputIt > > void insert(InputIt first, InputIt last); > void insert(std::initializer_list<value_type> ilist) { return insert(ilist.begin(), ilist.end()); } > > template <class... Args> > std::pair<iterator, bool> emplace(Args&&... args) { return insert(value_type(std::forward<Args>(args)...)); } > > template <class... Args> > iterator emplace_hint(const_iterator position, Args&&... args) { > return insert(position, value_type(std::forward<Args>(args)...)); > } > > template <class... Args> > std::pair<iterator, bool> try_emplace(const key_type& k, Args&&... args); > > template <class... Args> > std::pair<iterator, bool> try_emplace(key_type&& k, Args&&... args); > > template <class... Args> > iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args); > > template <class... Args> > iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args); > > std::pair<iterator, bool> insert_or_assign(const value_type& value); > std::pair<iterator, bool> insert_or_assign(value_type&& value); > iterator insert_or_assign(const_iterator hint, const value_type& value); > iterator insert_or_assign(const_iterator hint, value_type&& value); > > template< class InputIt > > void insert_or_assign(InputIt first, InputIt last); > void insert_or_assign(std::initializer_list<value_type> ilist) { return insert_or_assign(ilist.begin(), ilist.end()); } > > iterator erase(const_iterator pos) { return container.erase(pos); } > iterator erase(const_iterator first, const_iterator last) { return container.erase(first, last); } > > size_type erase(const key_type& key); > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > size_type erase(const K& k, Compare2 cmp2 = Compare2()); > > template <typename Pred> > size_type erase_if(Pred pred); > > template <typename Pred, typename OutputIterator> > void erase_if_copy(OutputIterator out, Pred pred) { > container.erase(hsh::remove_copy_if(container.begin(), container.end(), out, pred), container.end()); > } > > > void swap(flat_map &other) > { > std::swap(container, other.container); > cmp& me = *this; > cmp& rhs = other; > std::swap(me, rhs); > } > > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > bool contains(const K &k, Compare2 cmp2 = Compare2()) const { return end() != find(k, cmp2); } > bool contains(const Key &key) const { return end() != find(key); } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > size_type count(const K& k, Compare2 cmp2 = Compare2()) const { return contains(k, cmp2) ? 1u : 0u; } > size_type count(const Key& key) const { return contains(key) ? 1u : 0u; } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator find(const K& k, Compare2 cmp2 = Compare2()) const { > return hsh::binary_find(begin(), end(), k, compare_first_element<Compare2>{cmp2} ); > } > const_iterator find(const Key& key) const { return hsh::binary_find(begin(), end(), key, get_cmp()); } > > const_iterator lower_bound(const Key& key) const { return std::lower_bound(begin(), end(), key, get_cmp()); } > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator lower_bound(const K& k, Compare2 cmp2 = Compare2()) const { > return std::lower_bound(begin(), end(), k, compare_first_element<Compare2>{cmp2} ); > } > > const_iterator upper_bound(const Key& key) const { return std::upper_bound(begin(), end(), key, get_cmp()); } > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator upper_bound(const K& k, Compare2 cmp2 = Compare2()) const { > return std::upper_bound(begin(), end(), k, compare_first_element<Compare2>{cmp2} ); > } > > std::pair<const_iterator, const_iterator> equal_range(const Key& key) const { > auto _lower_bound = lower_bound(key); > return std::make_pair(_lower_bound, std::upper_bound(_lower_bound, end(), key, get_cmp())); > } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > std::pair<const_iterator, const_iterator> equal_range(const K& k, Compare2 cmp2 = Compare2()) const { > auto _lower_bound = lower_bound(k, cmp2); > return std::make_pair(_lower_bound, std::upper_bound(_lower_bound, end(), k, compare_first_element<Compare2>{cmp2} )); > } > > > friend bool operator==(const flat_map &lhs, const flat_map &rhs) { return lhs.container == rhs.container; } > friend bool operator!=(const flat_map &lhs, const flat_map &rhs) { return lhs.container != rhs.container; } > friend bool operator<(const flat_map &lhs, const flat_map &rhs) { return lhs.container < rhs.container; } > friend bool operator>(const flat_map &lhs, const flat_map &rhs) { return lhs.container > rhs.container; } > friend bool operator<=(const flat_map &lhs, const flat_map &rhs) { return lhs.container <= rhs.container; } > friend bool operator>=(const flat_map &lhs, const flat_map &rhs) { return lhs.container >= rhs.container; } > friend void swap(flat_map &lhs, flat_map &rhs) { return lhs.swap(rhs); } > > private: > > inline cmp &get_cmp() { return *this; } > inline const cmp &get_cmp() const { return *this; } > > > container_type container; > }; > > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::mapped_type& flat_map<K,T,C,A>::operator[](const key_type& k) > { > auto it = std::lower_bound(container.begin(), container.end(), k, get_cmp()); > if ( container.end() == it || cmp::operator()(k, *it) ) { > it = container.insert(it, value_type(k, mapped_type())); > } > return (*it).second; > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::mapped_type& flat_map<K,T,C,A>::operator[](key_type&& k) > { > auto it = std::lower_bound(container.begin(), container.end(), k, get_cmp()); > if ( container.end() == it || cmp::operator()(k, *it) ) { > it = container.insert(it, value_type(std::move(k), mapped_type())); > } > return (*it).second; > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::mapped_type& flat_map<K,T,C,A>::at(const key_type& key) > { > auto it = std::lower_bound(container.begin(), container.end(), key, get_cmp()); > if ( container.end() == it || cmp::operator()(key, *it) ) { > throw std::out_of_range("Out of range access: At"); > } > return (*it).second; > } > > template <typename K, typename T, typename C, typename A> > inline const typename flat_map<K,T,C,A>::mapped_type& flat_map<K, T, C, A>::at(const key_type& key) const > { > auto it = lower_bound(key); > if ( end() == it || cmp::operator()(key, *it) ) { > throw std::out_of_range("Out of range access: At"); > } > return (*it).second; > } > > > template <typename K, typename T, typename C, typename A> > inline std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::insert(const value_type& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value.first, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, value); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > inline std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::insert(value_type&& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value.first, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, std::move(value)); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::insert(const_iterator hint, const value_type& value) > { > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(hint, value); > } > return insert(value).first; > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::insert(const_iterator hint, value_type&& value) > { > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(container.begin() + index_of(hint), std::move(value)); > } > return insert(std::move(value)).first; > } > > template <typename K, typename T, typename C, typename A> > template< class InputIt > > inline void flat_map<K, T, C, A>::insert(InputIt first, InputIt last) > { > > size_t starting_size = size(); > for (; first != last; ++first) > { > auto end_itr = nth(starting_size); > if (end_itr == hsh::binary_find(begin(), end_itr, *first, get_cmp())) { > container.push_back(*first); > } > } > > if (size() != starting_size) > { > > std::sort(container.begin() + starting_size, container.end(), get_cmp()); > > > container.erase(std::unique(container.begin() + starting_size, container.end(), less_to_equal_to<cmp>{get_cmp()}), container.end()); > > > std::inplace_merge(container.begin(), container.begin() + starting_size, container.end(), get_cmp()); > } > } > > > template <typename K, typename T, typename C, typename A> > template <class... Args> > std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::try_emplace(const key_type& k, Args&&... args) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), k, get_cmp()); > if (end() == it || cmp::operator()(k, *it)) { > inserted = true; > it = container.insert(it, value_type(k, mapped_type(std::forward<Args>(args)...))); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > template <class... Args> > std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::try_emplace(key_type&& k, Args&&... args) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), k, get_cmp()); > if (end() == it || cmp::operator()(k, *it)) { > inserted = true; > it = container.insert(it, value_type(std::move(k), mapped_type(std::forward<Args>(args)...))); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > template <class... Args> > typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::try_emplace(const_iterator hint, const key_type& k, Args&&... args) > { > if ((begin() == hint || cmp::operator()(*std::prev(hint), k)) && > (end() == hint || cmp::operator()(k, *hint))) > { > return container.insert(container.begin() + index_of(hint), value_type(k, mapped_type(std::forward<Args>(args)...))); > } > return try_emplace(k, std::forward<Args>(args)...).first; > } > > template <typename K, typename T, typename C, typename A> > template <class... Args> > typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::try_emplace(const_iterator hint, key_type&& k, Args&&... args) > { > if ( (begin() == hint || cmp::operator()(*std::prev(hint), k)) && > (end() == hint || cmp::operator()(k, *hint)) ) > { > return container.insert(container.begin() + index_of(hint), value_type(std::move(k), mapped_type(std::forward<Args>(args)...))); > } > return try_emplace(std::move(k), std::forward<Args>(args)...).first; > } > > > template <typename K, typename T, typename C, typename A> > inline std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::insert_or_assign(const value_type& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, value); > } else { > *it = value; > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > inline std::pair<typename flat_map<K,T,C,A>::iterator, bool> flat_map<K,T,C,A>::insert_or_assign(value_type&& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (container.end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, std::move(value)); > } else { > it->second = std::move(value.second); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::insert_or_assign(const_iterator hint, const value_type& value) > { > > if (end() != hint && > (!cmp::operator()(*hint, value) && !cmp::operator()(value, *hint))) > { > > *(container.begin() + index_of(hint)) = value; > return hint; > } > > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(container.begin() + index_of(hint), value); > } > return insert_or_assign(value).first; > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::iterator flat_map<K,T,C,A>::insert_or_assign(const_iterator hint, value_type&& value) > { > if (end() != hint && > (!cmp::operator()(*hint, value) && !cmp::operator()(value, *hint))) > { > > auto it = container.begin() + index_of(hint); > it->second = std::move(value.second); > return it; > } > > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(container.begin() + index_of(hint), std::move(value)); > } > return insert_or_assign(std::move(value)).first; > } > > template <typename K, typename T, typename C, typename A> > template< class InputIt > > inline void flat_map<K,T,C,A>::insert_or_assign(InputIt first, InputIt last) > { > > size_t starting_size = size(); > for (; first != last; ++first) > { > auto initial_end_it = container.begin() + starting_size; > auto find_itr = hsh::binary_find(container.begin(), initial_end_it, *first, get_cmp()); > if (initial_end_it == find_itr) { > container.push_back(*first); > } else { > find_itr->second = first->second; > } > } > > if (size() != starting_size) > { > > std::sort(container.begin() + starting_size, container.end(), get_cmp()); > > > container.erase(std::unique(container.begin() + starting_size, container.end(), less_to_equal_to<cmp>{ get_cmp() }), container.end()); > > > std::inplace_merge(container.begin(), container.begin() + starting_size, container.end(), get_cmp()); > } > } > > template <typename K, typename T, typename C, typename A> > inline typename flat_map<K,T,C,A>::size_type flat_map<K,T,C,A>::erase(const key_type& key) > { > auto it = hsh::binary_find(container.begin(), container.end(), key, get_cmp()); > if (end() != it) { > container.erase(it); > return 1u; > } > return 0u; > } > > template <typename K, typename T, typename C, typename A> > template<class Key, typename Compare2> > inline typename flat_map<K,T,C, A>::size_type flat_map<K,T,C, A>::erase(const Key& k, Compare2 cmp2) > { > auto it = hsh::binary_find(container.begin(), container.end(), k, cmp2); > if (end() != it) { > container.erase(it); > return 1u; > } > return 0u; > } > > template <typename K, typename T, typename C, typename A> > template <typename Pred> > inline typename flat_map<K,T,C,A>::size_type flat_map<K,T,C,A>::erase_if(Pred pred) > { > auto new_end = std::remove_if(container.begin(), container.end(), pred); > auto num_removed = std::distance(new_end, container.end()); > container.erase(new_end, container.end()); > return num_removed; > } > > >} ># 9 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryStreams.h" 2 > > > >namespace query >{ > class IContinuousStream > { > public: > virtual ~IContinuousStream() = default; > virtual hsh::milliseconds integrity_period() const noexcept = 0; > }; > > class IPeriodicStream > { > public: > virtual ~IPeriodicStream() = default; > virtual hsh::milliseconds period() const noexcept = 0; > }; > > class IMetricStream > { > public: > virtual ~IMetricStream() = default; > virtual const std::string& host() const noexcept = 0; > virtual const std::string& process() const noexcept = 0; > virtual const std::string& metric_name() const noexcept = 0; > virtual hsh::milliseconds integrity_period() const noexcept = 0; > }; > > struct StreamCreationData > { > std::string uid; > std::string recording_id; > std::string enum_table_id; > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors; > hsh::flat_map<std::string, std::string> supporting_data; > hsh::time_point last_change_time; > uint32_t cpid = 0u; > hsh::ValueType value_type; > StreamType stream_type; > bool step = true; > }; > > > class Stream > { > public: > > inline uint32_t cpid() const noexcept { return _cpid; } > inline const std::string& uid() const noexcept { return _uid; } > inline const std::string& recording_id() const noexcept { return _recording_id; } > inline StreamType stream_type() const noexcept { return _stream_type; } > inline hsh::ValueType value_type() const noexcept { return _value_type; } > inline const std::string& enum_table_id() const noexcept { return _enum_table_id; } > inline hsh::span<const uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors() const noexcept { return _aors; } > inline bool step() const noexcept { return _step; } > inline const hsh::flat_map<std::string, std::string>& supporting_data() const noexcept { return _supporting_data; } > > inline hsh::string_view supporting_data(hsh::string_view attr_name) const noexcept { > auto it = _supporting_data.find(attr_name); > return _supporting_data.end() != it ? it->second : ""_sv; > } > inline hsh::time_point last_change_time() const noexcept { return _last_change_time; } > > > virtual const IContinuousStream *continuous() const { return nullptr; } > virtual const IPeriodicStream *periodic() const { return nullptr; } > virtual const IMetricStream *metric() const { return nullptr; } > > protected: > > Stream() = default; > > Stream(const StreamCreationData &creation_data) noexcept > : _cpid(creation_data.cpid), _stream_type(creation_data.stream_type), _value_type(creation_data.value_type), _step(creation_data.step), _uid(creation_data.uid), > _recording_id(creation_data.recording_id), _enum_table_id(creation_data.enum_table_id),_supporting_data(creation_data.supporting_data), _last_change_time(creation_data.last_change_time) > { > std::copy(creation_data.aors.begin(), creation_data.aors.end(), _aors.begin()); > } > > Stream(StreamCreationData &&creation_data) noexcept > : _cpid(creation_data.cpid), _stream_type(creation_data.stream_type), _value_type(creation_data.value_type), _step(creation_data.step), > _uid(std::move(creation_data.uid)), _recording_id(std::move(creation_data.recording_id)),_enum_table_id(std::move(creation_data.enum_table_id)), > _supporting_data(std::move(creation_data.supporting_data)), _last_change_time(creation_data.last_change_time) > { > std::copy(creation_data.aors.begin(), creation_data.aors.end(), _aors.begin()); > } > > virtual ~Stream() = default; > > std::string _uid; > std::string _recording_id; > std::string _enum_table_id; > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> _aors; > hsh::flat_map<std::string, std::string> _supporting_data; > hsh::time_point _last_change_time; > uint32_t _cpid; > StreamType _stream_type; > hsh::ValueType _value_type; > bool _step = true; > }; >} ># 3 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryGroups.h" 1 > ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryGroups.h" >namespace query >{ > struct GroupedStreamCreationData > { > std::string uid; > std::string member_name; > std::string recording_id; > std::string enum_table_id; > hsh::flat_map<std::string, std::string> supporting_data; > uint32_t parent_cpid = 0u; > uint32_t cpid = 0u; > StreamType stream_type; > hsh::ValueType value_type; > }; > > > class GroupedStream > { > public: > GroupedStream(const GroupedStreamCreationData& data) > : _parent_cpid(data.parent_cpid), _cpid(data.cpid), _stream_type(data.stream_type), _value_type(data.value_type), _member_name(data.member_name), _uid(data.uid), _recording_id(data.recording_id), > _enum_table_id(data.enum_table_id), _supporting_data(data.supporting_data) {} > > GroupedStream(GroupedStreamCreationData&& data) noexcept > : _parent_cpid(data.parent_cpid), _cpid(data.cpid), _stream_type(data.stream_type), _value_type(data.value_type), _member_name(std::move(data.member_name)), _uid(std::move(data.uid)), > _recording_id(std::move(data.recording_id)), _enum_table_id(std::move(data.enum_table_id)), _supporting_data(std::move(data.supporting_data)) {} > > ~GroupedStream() = default; > > inline uint32_t parent_cpid() const noexcept { return _parent_cpid; } > inline uint32_t cpid() const noexcept { return _cpid; } > inline const std::string& uid() const noexcept { return _uid; } > inline const std::string& recording_id() const noexcept { return _recording_id; } > inline const std::string& member_name() const noexcept { return _member_name; } > > inline hsh::ValueType value_type() const noexcept { return _value_type; } > inline StreamType stream_type() const noexcept { return _stream_type; } > inline const std::string& enum_table_id() const noexcept { return _enum_table_id; } > > inline const hsh::flat_map<std::string, std::string> &supporting_data() const noexcept { return _supporting_data; } > > inline hsh::string_view supporting_data(hsh::string_view attr_name) const noexcept { > auto itr = _supporting_data.find(attr_name); > return _supporting_data.end() != itr ? itr->second : ""_sv; > } > > protected: > std::string _uid; > std::string _member_name; > std::string _recording_id; > std::string _enum_table_id; > hsh::flat_map<std::string, std::string> _supporting_data; > uint32_t _parent_cpid; > uint32_t _cpid; > StreamType _stream_type; > hsh::ValueType _value_type; > }; > > > class IContinuousStreamGroup > { > public: > virtual hsh::milliseconds integrity_period() const noexcept = 0; > }; > > class IPeriodicStreamGroup > { > public: > virtual hsh::milliseconds period() const noexcept = 0; > }; > > struct StreamGroupCreationData > { > std::string uid; > std::string recording_id; > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors; > std::vector<std::shared_ptr<const GroupedStream>> members; > hsh::time_point last_change_time; > uint32_t cpid = 0u; > StreamType stream_type; > bool step = true; > }; > > class StreamGroup > { > public: > inline uint32_t cpid() const noexcept { return _cpid; } > inline StreamType stream_type() const noexcept { return _stream_type; } > inline bool step() const noexcept { return _step; } > inline const std::string& uid() const noexcept { return _uid; } > inline const std::string& recording_id() const noexcept { return _recording_id; } > inline hsh::span<const uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors() const noexcept { return _aors; } > inline hsh::time_point last_change_time() const noexcept { return _last_change_time; } > inline const std::vector<std::shared_ptr<const GroupedStream>>& members() const noexcept { return _members; } > inline const GroupedStream* member_by_cpid(uint32_t member_cpid) const noexcept { > auto member_itr = std::find_if(_members.cbegin(), _members.cend(), > [member_cpid](const std::shared_ptr<const GroupedStream> &member) { return member_cpid == member->cpid(); }); > return _members.cend() != member_itr ? member_itr->get() : nullptr; > } > inline const GroupedStream* member_by_name(hsh::string_view member_name) const noexcept { > auto member_itr = std::find_if(_members.cbegin(), _members.cend(), > [member_name](const std::shared_ptr<const GroupedStream> &member) { return member_name == member->member_name(); }); > return _members.cend() != member_itr ? member_itr->get() : nullptr; > } > > virtual const IContinuousStreamGroup *continuous() const noexcept { return nullptr; } > virtual const IPeriodicStreamGroup *periodic() const noexcept { return nullptr; } > > protected: > StreamGroup() = default; > > StreamGroup(const StreamGroupCreationData& data) noexcept > : _cpid(data.cpid), _stream_type(data.stream_type), _uid(data.uid), _recording_id(data.recording_id), _step(data.step), > _members(data.members), _last_change_time(data.last_change_time) > { > std::copy(data.aors.begin(), data.aors.end(), _aors.begin()); > } > > StreamGroup(StreamGroupCreationData&& data) noexcept > : _cpid(data.cpid), _stream_type(data.stream_type), _uid(std::move(data.uid)), _recording_id(std::move(data.recording_id)), _step(data.step), > _members(std::move(data.members)), _last_change_time(data.last_change_time) > { > std::copy(data.aors.begin(), data.aors.end(), _aors.begin()); > } > > ~StreamGroup() = default; > > std::string _uid; > std::string _recording_id; > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> _aors; > hsh::time_point _last_change_time; > std::vector<std::shared_ptr<const GroupedStream>> _members; > uint32_t _cpid; > StreamType _stream_type; > bool _step = true; > }; >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryLogs.h" 1 > > > > > > > >namespace query >{ > class LogColumn > { > public: > LogColumn(const std::string &column_name, hsh::ValueType value_type, bool is_time_column) > : _column_name(column_name), _value_type(value_type), _is_time_column(is_time_column) {} > > LogColumn(std::string &&column_name, hsh::ValueType value_type, bool is_time_column) noexcept > : _column_name(std::move(column_name)), _value_type(value_type), _is_time_column(is_time_column) {} > > ~LogColumn() = default; > > inline const std::string& column_name() const noexcept { return _column_name; } > inline hsh::ValueType value_type() const noexcept { return _value_type; } > inline bool is_time_column() const noexcept { return _is_time_column; } > > private: > std::string _column_name; > hsh::ValueType _value_type; > bool _is_time_column; > }; > > class LogStream > { > public: > LogStream(const std::string &source_id, const std::vector<LogColumn> &columns) > : _source_id(source_id), _columns(columns) {} > > LogStream(std::string &&source_id, std::vector<LogColumn> &&columns) noexcept > : _source_id(std::move(source_id)), _columns(std::move(columns)) {} > > ~LogStream() = default; > > inline const std::string& source_id() const noexcept { return _source_id; } > inline const std::vector<LogColumn>& columns() const noexcept { return _columns; } > > inline const LogColumn* column_by_name(hsh::string_view column_name) const noexcept { > auto column_itr = std::find_if(_columns.cbegin(), _columns.cend(), > [column_name](const LogColumn& column) { return column.column_name() == column_name; }); > return _columns.cend() != column_itr ? std::addressof(*column_itr) : nullptr; > } > > protected: > LogStream(const std::string &source_id) : _source_id(source_id) {} > > LogStream(std::string &&source_id) noexcept : _source_id(std::move(source_id)) {} > > > void add_column(const std::string &column_name, hsh::ValueType value_type, bool is_time_column) { > _columns.emplace_back(column_name, value_type, is_time_column); > } > > void add_column(std::string &&column_name, hsh::ValueType value_type, bool is_time_column) { > _columns.emplace_back(std::move(column_name), value_type, is_time_column); > } > > std::string _source_id; > std::vector<LogColumn> _columns; > }; > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryEnums.h" 1 > > > > > > > >namespace query >{ > > class EnumData > { > public: > EnumData(const std::string &table_id, const std::unordered_map<int32_t, std::string> &values, hsh::time_point last_change_time) > : _table_id(table_id), _values(values), _last_change_time(last_change_time) {} > > EnumData(std::string &&table_id, std::unordered_map<int32_t, std::string> &&values, hsh::time_point last_change_time) noexcept > : _table_id(std::move(table_id)), _values(std::move(values)), _last_change_time(last_change_time) {} > > inline const std::string &table_id() const noexcept { return _table_id; } > inline const std::unordered_map<int32_t, std::string> &values() const noexcept { return _values; } > inline hsh::time_point last_change_time() const noexcept { return _last_change_time; } > > inline hsh::string_view value(int32_t key) const noexcept { > auto itr = _values.find(key); > return _values.end() != itr ? itr->second : ""_sv; > } > > private: > std::string _table_id; > std::unordered_map<int32_t, std::string> _values; > hsh::time_point _last_change_time; > }; > >} ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/function_ref.h" 1 > > > > >namespace hsh >{ ># 15 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/function_ref.h" > template <class F> > class function_ref; > > template <class R, class... Args> > class function_ref<R(Args...)> > { > public: > > template <typename F,enable_if_t<conjunction<negation<std::is_same<decay_t<F>, function_ref>>, is_invocable_r<R, F&&, Args...>>::value>* = nullptr> > function_ref(F &&f) noexcept : obj(const_cast<void*>(reinterpret_cast<const void *>(std::addressof(f)))) { > func = [](void *obj, Args... args) -> R { > return hsh::invoke(*reinterpret_cast<typename std::add_pointer<F>::type>(obj),std::forward<Args>(args)...); > }; > } > > > function_ref(const function_ref &rhs) noexcept = default; > function_ref &operator=(const function_ref &rhs) noexcept = default; > > > template <typename F, enable_if_t<conjunction<negation<std::is_same<decay_t<F>, function_ref>>, is_invocable_r<R, F&&, Args...>>::value>* = nullptr> > function_ref &operator=(F &&f) noexcept > { > obj = reinterpret_cast<void*>(std::addressof(f)); > func = [](void *obj, Args... args) { > return hsh::invoke(*reinterpret_cast<typename std::add_pointer<F>::type>(obj),std::forward<Args>(args)...); > }; > return *this; > } > > void swap(function_ref<R(Args...)> &rhs) noexcept > { > std::swap(obj, rhs.obj); > std::swap(func, rhs.func); > } > > > R operator()(Args... args) const { return func(obj, std::forward<Args>(args)...); } > > private: > void *obj = nullptr; > R (*func)(void *, Args...) = nullptr; > }; > > > template <typename R, typename... Args> > constexpr void swap(function_ref<R(Args...)> &lhs, function_ref<R(Args...)> &rhs) noexcept { lhs.swap(rhs); } >} ># 7 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/ICaches.h" 2 > > >namespace query >{ > template <typename T> > struct ChangeNotification > { > ChangeNotification() = default; > ~ChangeNotification() = default; > > hsh::optional<std::vector<std::shared_ptr<const T>>> new_items; > hsh::optional<std::vector<std::shared_ptr<const T>>> updated_items; > hsh::optional<std::vector<std::shared_ptr<const T>>> deleted_items; > }; > > template <typename T> > class IListenableCache > { > public: > class Listener > { > public: > virtual ~Listener() = default; > virtual void notify(const ChangeNotification<T>& changes) = 0; > }; > > virtual ~IListenableCache() = default; > virtual OSII_RETCODE add_listener(Listener *listener) { return (( OSII_RETCODE )1); } > virtual void remove_listener(Listener *listener) {} > }; > > class IStreamCache : public IListenableCache<Stream> > { > public: > IStreamCache() = default; > virtual ~IStreamCache() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual std::shared_ptr<const Stream> find(uint32_t cpid) const noexcept { return nullptr; } > virtual std::shared_ptr<const Stream> find(const std::string &uid, const std::string &recording_id) const noexcept { return nullptr; } > virtual bool contains(uint32_t cpid) const noexcept { return false; } > virtual bool contains(const std::string &uid, const std::string &recording_id) const noexcept { return false; } > virtual std::vector<std::shared_ptr<const Stream>> uid(const std::string &uid) const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const Stream>> all() const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const Stream>> filter(hsh::function_ref<bool(const Stream&)> predicate) const noexcept { return {}; } > }; > > class IGroupCache : public IListenableCache<StreamGroup> > { > public: > IGroupCache() = default; > virtual ~IGroupCache() = default; > > virtual bool is_supported() const noexcept { return false; } > > > virtual std::shared_ptr<const GroupedStream> find_member(uint32_t cpid) const noexcept { return nullptr; } > virtual std::shared_ptr<const GroupedStream> find_member(const std::string &uid, const std::string &recording_id) const noexcept { return nullptr; } > virtual bool contains_member(uint32_t cpid) const noexcept { return false; } > virtual bool contains_member(const std::string &uid, const std::string &recording_id) const noexcept { return false; } > virtual std::vector<std::shared_ptr<const GroupedStream>> member_uid(const std::string &uid) const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const GroupedStream>> all_members() const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const GroupedStream>> filter_members(hsh::function_ref<bool(const GroupedStream&)> predicate) const noexcept { return {}; } > > > virtual std::shared_ptr<const StreamGroup> find(uint32_t cpid) const noexcept { return nullptr; } > virtual std::shared_ptr<const StreamGroup> find(const std::string &uid, const std::string &recording_id) const noexcept { return nullptr; } > virtual bool contains(uint32_t cpid) const noexcept { return false; } > virtual bool contains(const std::string &uid, const std::string &recording_id) const noexcept { return false; } > virtual std::vector<std::shared_ptr<const StreamGroup>> uid(const std::string &uid) const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const StreamGroup>> all() const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const StreamGroup>> filter(hsh::function_ref<bool(const StreamGroup&)> predicate) const noexcept { return {}; } > }; > > class ILogCache : public IListenableCache<LogStream> > { > public: > ILogCache() = default; > virtual ~ILogCache() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual std::shared_ptr<const LogStream> find(const std::string &source_id) const noexcept { return nullptr; } > virtual bool contains(const std::string& source_id) const noexcept { return false; } > virtual std::vector<std::shared_ptr<const LogStream>> all() const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const LogStream>> filter(hsh::function_ref<bool(const LogStream&)> predicate) const noexcept { return {}; } > }; > > class IEnumCache : public IListenableCache<EnumData> > { > public: > IEnumCache() = default; > ~IEnumCache() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual std::shared_ptr<const EnumData> find(const std::string &enum_table_id) const noexcept { return nullptr; } > virtual bool contains(const std::string& enum_table_id) const noexcept { return false; } > virtual std::vector<std::shared_ptr<const EnumData>> all() const noexcept { return {}; } > virtual std::vector<std::shared_ptr<const EnumData>> filter(hsh::function_ref<bool(const EnumData&)> predicate) const noexcept { return {}; } > }; > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_HistorianQueryConnection.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/IDataProviders.h" 1 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/flat_set.h" 1 > > > > > > > > >namespace hsh >{ > namespace details > { > template <typename Compare, bool = std::is_empty<Compare>::value> > class flat_set_compare > { > public: > flat_set_compare() : cmp() {} > explicit flat_set_compare(const Compare &cmp) : cmp(cmp) {} > > Compare& get_compare() { return cmp; } > const Compare& get_compare() const { return cmp; } > > template <typename T> > bool operator()(const T& a, const T& b) const { > return cmp(a, b); > } > > private: > Compare cmp; > }; > > > template <typename Compare> > class flat_set_compare<Compare, true> : private Compare > { > public: > flat_set_compare() : Compare() {} > explicit flat_set_compare(const Compare &cmp) : Compare(cmp) {} > > Compare& get_compare() { return *this; } > const Compare& get_compare() const { return *this; } > > template <typename T> > bool operator()(const T& a, const T& b) const { > return Compare::operator()(a, b); > } > }; > } > > template<typename Key, typename Compare = std::less<Key>, class Allocator = std::allocator<Key>> > class flat_set : private details::flat_set_compare<Compare> > { > using cmp = details::flat_set_compare<Compare>; > public: > > using key_type = Key; > using value_type = Key; > using size_type = size_t; > using difference_type = ptrdiff_t; > using key_compare = Compare; > using value_compare = Compare; > using allocator_type = Allocator; > using reference = value_type&; > using const_reference = const value_type&; > using container_type = std::vector <value_type, allocator_type>; > using pointer = typename std::allocator_traits<Allocator>::pointer; > using const_pointer = typename std::allocator_traits<Allocator>::const_pointer; > using iterator = typename std::vector<value_type, Allocator>::const_iterator; > using const_iterator = iterator; > using reverse_iterator = typename std::vector<value_type, Allocator>::const_reverse_iterator; > using const_reverse_iterator = reverse_iterator; > > > > flat_set() = default; > > explicit flat_set( const Compare& comp, const Allocator& alloc = Allocator() ) : cmp(comp), container(alloc) {} > > template<class InputIt> > flat_set(InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc) > { > std::sort( container.begin(), container.end(), get_cmp()); > container.erase( std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end() ); > } > > template<class InputIt> > flat_set(hsh::ordered_range_t, InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc) > { > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > template<class InputIt> > flat_set(hsh::ordered_unique_range_t, InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) > : cmp(comp), container(first, last, alloc){} > > template< class InputIt > > flat_set(InputIt first, InputIt last, const Allocator& alloc) : flat_set(first, last, Compare(), alloc) {} > > template< class InputIt > > flat_set(hsh::ordered_range_t, InputIt first, InputIt last, const Allocator& alloc) : flat_set(hsh::ordered_range, first, last, Compare(), alloc) {} > > template< class InputIt > > flat_set(hsh::ordered_unique_range_t, InputIt first, InputIt last, const Allocator& alloc) : flat_set(hsh::ordered_unique_range, first, last, Compare(), alloc) {} > > flat_set( std::initializer_list<value_type> init, const Compare& comp = Compare(), const Allocator& alloc = Allocator() ) : flat_set(init.begin(),init.end(), comp, alloc) {} > flat_set( std::initializer_list<value_type> init, const Allocator& alloc ) : flat_set(init, Compare(), alloc) {} > > explicit flat_set(container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) > { > std::sort(container.begin(), container.end(), get_cmp()); > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > flat_set(hsh::ordered_range_t, container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) > { > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > } > > flat_set(hsh::ordered_unique_range_t, container_type&& data, const Compare& comp = Compare()) : cmp(comp), container(std::move(data)) {} > > flat_set(const flat_set& other) = default; > flat_set( const flat_set& other, const Allocator& alloc ) : cmp(other.cmp), container(other.container, alloc) {} > > flat_set( flat_set&& other ) = default; > flat_set( flat_set&& other, const Allocator& alloc ) : cmp(std::move(other.cmp)), container(std::move(other.container), alloc) {} > > > > flat_set& operator=( const flat_set& other ) = default; > flat_set& operator=( flat_set&& other ) = default; > flat_set& operator=( std::initializer_list<value_type> ilist ) > { > clear(); > insert(ilist.begin(), ilist.end()); > return *this; > } > > flat_set& operator=(container_type&& data) > { > container = std::move(data); > std::sort(container.begin(), container.end(), get_cmp()); > container.erase(std::unique(container.begin(), container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > return *this; > } > > > allocator_type get_allocator() const noexcept { return container.get_allocator(); } > key_compare key_comp() const { return cmp::get_compare(); } > value_compare value_comp() const { return cmp::get_compare(); } > > > iterator begin() const noexcept { return container.cbegin(); } > const_iterator cbegin() const noexcept { return begin(); } > > iterator end() const noexcept { return container.cend(); } > const_iterator cend() const noexcept { return end(); } > > reverse_iterator rbegin() const noexcept { return container.crbegin(); } > const_reverse_iterator crbegin() const noexcept { return rbegin(); } > > reverse_iterator rend() const noexcept { return container.crend();} > const_reverse_iterator crend() const noexcept { return rend(); } > > > bool empty() const noexcept { return container.empty(); } > size_type size() const noexcept { return container.size(); } > size_type capacity() const noexcept { return container.capacity(); } > void reserve(size_type n) { container.reserve(n); } > void shrink_to_fit() { container.shrink_to_fit(); } > size_type max_size() const noexcept { return std::numeric_limits<difference_type>::max(); } > > > const value_type* data() const noexcept { return container.data(); } > const_reference front() const { return container.front(); } > const_reference back() const { return container.back(); } > const_iterator nth(size_type n) const noexcept { return begin() + n; } > size_type index_of(const_iterator it) const noexcept { return (size_type)std::distance(begin(), it); } > > > container_type extract() && noexcept { return std::move(container); } > void clear() noexcept { container.clear(); } > > std::pair<iterator, bool> insert(const value_type& value); > std::pair<iterator, bool> insert(value_type&& value); > iterator insert(const_iterator hint, const value_type& value); > iterator insert(const_iterator hint, value_type&& value); > > template<class InputIt> > void insert(InputIt first, InputIt last); > void insert(std::initializer_list<value_type> ilist) { return insert(ilist.begin(), ilist.end()); } > > template <class... Args> > std::pair<iterator, bool> emplace(Args&&... args){ return insert(value_type(std::forward<Args>(args)...)); } > > template <class... Args> > iterator emplace_hint(const_iterator position, Args&&... args) { > return insert(position, value_type(std::forward<Args>(args)...)); > } > > std::pair<iterator, bool> insert_or_assign(const value_type& value); > std::pair<iterator, bool> insert_or_assign(value_type&& value); > iterator insert_or_assign(const_iterator hint, const value_type& value); > iterator insert_or_assign(const_iterator hint, value_type&& value); > > template< class InputIt > > void insert_or_assign(InputIt first, InputIt last); > void insert_or_assign(std::initializer_list<value_type> ilist) { return insert_or_assign(ilist.begin(), ilist.end());} > > iterator erase(const_iterator pos) { return container.erase(pos); } > iterator erase(const_iterator first, const_iterator last){ return container.erase(first, last); } > > size_type erase(const key_type& key); > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > size_type erase(const K& k, Compare2 cmp2 = Compare2()); > > template <typename Pred> > size_type erase_if(Pred pred); > > template <typename Pred, typename OutputIterator> > void erase_if_copy(OutputIterator out, Pred pred){ > container.erase(hsh::remove_copy_if(container.begin(), container.end(), out, pred), container.end()); > } > > > void swap(flat_set &other) > { > std::swap(container, other.container); > cmp& me = *this; > cmp& rhs = other; > std::swap(me, rhs); > } > > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator find(const K& k, Compare2 cmp2 = Compare2()) const { return hsh::binary_find(begin(), end(), k, cmp2); } > const_iterator find( const Key& key ) const { return hsh::binary_find(begin(), end(), key, get_cmp()); } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > bool contains(const K &k, Compare2 cmp2 = Compare2()) const { return end() != find(k, cmp2); } > bool contains(const Key &key) const { return end() != find(key); } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > size_type count(const K& k, Compare2 cmp2 = Compare2()) const { return contains(k, cmp2) ? 1u : 0u; } > size_type count(const Key& key) const { return contains(key) ? 1u : 0u; } > > const_iterator lower_bound(const Key& key) const { > return std::lower_bound(begin(), end(), key, get_cmp()); > } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator lower_bound(const K& k, Compare2 cmp2 = Compare2()) const { > return std::lower_bound(begin(), end(), k, cmp2); > } > > const_iterator upper_bound(const Key& key) const { > return std::upper_bound(begin(), end(), key, get_cmp()); > } > > template<class K, typename Compare2 = hsh::less_2<Key, K>> > const_iterator upper_bound(const K& k, Compare2 cmp2 = Compare2()) const { > return std::upper_bound(begin(), end(), k, cmp2); > } > > std::pair<const_iterator,const_iterator> equal_range( const Key& key ) const{ > auto _lower_bound = lower_bound(key); > return std::make_pair(_lower_bound, std::upper_bound(_lower_bound, end(), key, get_cmp())); > } > > template<class K, typename Compare2 = hsh::less_2<Key,K>> > std::pair<const_iterator, const_iterator> equal_range(const K& k, Compare2 cmp2 = Compare2()) const { > auto _lower_bound = lower_bound(k, cmp2); > return std::make_pair(_lower_bound, std::upper_bound(_lower_bound, end(), k, cmp2)); > } > > > > > friend bool operator==(const flat_set &lhs, const flat_set &rhs) { return lhs.container == rhs.container; } > friend bool operator!=(const flat_set &lhs, const flat_set &rhs) { return lhs.container != rhs.container; } > friend bool operator<(const flat_set &lhs, const flat_set &rhs) { return lhs.container < rhs.container; } > friend bool operator>(const flat_set &lhs, const flat_set &rhs) { return lhs.container > rhs.container; } > friend bool operator<=(const flat_set &lhs, const flat_set &rhs) { return lhs.container <= rhs.container; } > friend bool operator>=(const flat_set &lhs, const flat_set &rhs) { return lhs.container >= rhs.container; } > friend void swap(flat_set &lhs, flat_set &rhs) { return lhs.swap(rhs); } > > private: > > inline cmp &get_cmp() { return *this; } > inline const cmp &get_cmp() const { return *this; } > > container_type container; > }; > > > template <typename K, typename C, typename A> > inline std::pair<typename flat_set<K, C, A>::iterator, bool> flat_set<K,C,A>::insert(const value_type& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, value); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename C, typename A> > inline std::pair<typename flat_set<K, C, A>::iterator, bool> flat_set<K, C, A>::insert(value_type&& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, std::move(value)); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename C, typename A> > inline typename flat_set<K, C, A>::iterator flat_set<K, C, A>::insert(const_iterator hint, const value_type& value) > { > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(container.begin() + index_of(hint), value); > } > return insert(value).first; > } > > template <typename K, typename C, typename A> > inline typename flat_set<K, C, A>::iterator flat_set<K, C, A>::insert(const_iterator hint, value_type&& value) > { > if ( (begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint)) ) > { > return container.insert(container.begin() + index_of(hint), std::move(value)); > } > return insert(std::move(value)).first; > } > > template <typename K, typename C, typename A> > template< class InputIt > > inline void flat_set<K, C, A>::insert(InputIt first, InputIt last) > { > > size_t starting_size = size(); > for (; first != last; ++first) > { > auto end_itr = nth(starting_size); > if (end_itr == hsh::binary_find(begin(), end_itr, *first, get_cmp())) { > container.push_back(*first); > } > } > > if (size() != starting_size) > { > > std::sort(container.begin() + starting_size, container.end(), get_cmp()); > > > container.erase(std::unique(container.begin() + starting_size, container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > > > std::inplace_merge(container.begin(), container.begin() + starting_size, container.end(), get_cmp()); > } > } > > > template <typename K, typename C, typename A> > inline std::pair<typename flat_set<K, C, A>::iterator, bool> flat_set<K, C, A>::insert_or_assign(const value_type& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, value); > } else { > *it = value; > } > return std::make_pair(it, inserted); > } > > template <typename K, typename C, typename A> > inline std::pair<typename flat_set<K, C, A>::iterator, bool> flat_set<K, C, A>::insert_or_assign(value_type&& value) > { > bool inserted = false; > auto it = std::lower_bound(container.begin(), container.end(), value, get_cmp()); > if (container.end() == it || cmp::operator()(value, *it)) { > inserted = true; > it = container.insert(it, std::move(value)); > } > else { > *it = std::move(value); > } > return std::make_pair(it, inserted); > } > > template <typename K, typename C, typename A> > inline typename flat_set<K, C, A>::iterator flat_set<K, C, A>::insert_or_assign(const_iterator hint, const value_type& value) > { > if ( end() != hint && > (!cmp::operator()(*hint, value) && !cmp::operator()(value, *hint))) > { > > container[index_of(hint)] = value; > return hint; > } > > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(hint, value); > } > return insert_or_assign(value).first; > } > > template <typename K, typename C, typename A> > inline typename flat_set<K, C, A>::iterator flat_set<K, C, A>::insert_or_assign(const_iterator hint, value_type&& value) > { > if (end() != hint && > (!cmp::operator()(*hint, value) && !cmp::operator()(value, *hint))) > { > > container[index_of(hint)] = std::move(value); > return hint; > } > > if ((begin() == hint || cmp::operator()(*std::prev(hint), value)) && > (end() == hint || cmp::operator()(value, *hint))) > { > return container.insert(container.begin() + index_of(hint), std::move(value)); > } > return insert_or_assign(std::move(value)).first; > } > > template <typename K, typename C, typename A> > template< class InputIt > > inline void flat_set<K, C, A>::insert_or_assign(InputIt first, InputIt last) > { > > size_t starting_size = size(); > for (; first != last; ++first) > { > auto initial_end_it = container.begin() + starting_size; > auto find_itr = hsh::binary_find(container.begin(), initial_end_it, *first, get_cmp()); > if (initial_end_it == find_itr) { > container.push_back(*first); > } else { > *find_itr = *first; > } > } > > if (size() != starting_size) > { > > std::sort(container.begin() + starting_size, container.end(), get_cmp()); > > > container.erase(std::unique(container.begin() + starting_size, container.end(), less_to_equal_to<cmp>(get_cmp())), container.end()); > > > std::inplace_merge(container.begin(), container.begin() + starting_size, container.end(), get_cmp()); > } > } > > template <typename K, typename C, typename A> > inline typename flat_set<K, C, A>::size_type flat_set<K, C, A>::erase(const key_type& key) > { > auto it = hsh::binary_find(container.begin(), container.end(), key, get_cmp()); > if (end() != it) { > container.erase(it); > return 1u; > } > return 0u; > } > > template <typename Key, typename C, typename A> > template<class K, typename Compare2> > inline typename flat_set<Key, C, A>::size_type flat_set<Key, C, A>::erase(const K& k, Compare2 cmp2) > { > auto it = hsh::binary_find(container.begin(), container.end(), k, cmp2); > if (end() != it) { > container.erase(it); > return 1u; > } > return 0u; > } > > template <typename K, typename C, typename A> > template <typename Pred> > inline typename flat_set<K, C, A>::size_type flat_set<K, C, A>::erase_if(Pred pred) > { > auto new_end = std::remove_if(container.begin(), container.end(), pred); > auto num_removed = std::distance(new_end, container.end()); > container.erase(new_end, container.end()); > return num_removed; > } > > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/IDataProviders.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/QueryValues.h" 1 > > > > > > > >namespace query >{ > class StreamValue > { > public: > explicit StreamValue(hsh::time_point primary_time) noexcept : _primary_time(primary_time) {} > > StreamValue(hsh::time_point primary_time, CHRONUS_QUALITY cquality, hsh::primitive_value &&value, > hsh::time_point secondary_time = {}, CHRONUS_TIME_QUALITY tquality = CHRONUS_TIME_QUALITY_INVALID) noexcept > : _primary_time(primary_time), _secondary_time(secondary_time), _cquality(cquality), _value(std::move(value)) {} > > > inline hsh::time_point primary_time() const noexcept { return _primary_time; } > inline hsh::time_point secondary_time() const noexcept { return _secondary_time; } > inline const hsh::primitive_value &value() const noexcept { return _value; } > inline CHRONUS_QUALITY cquality() const noexcept { return _cquality; } > inline CHRONUS_TIME_QUALITY tquality() const noexcept { return _tquality; } > > > inline void set_primary_time(hsh::time_point primary_time) noexcept { _primary_time = primary_time; } > inline void set_secondary_time(hsh::time_point secondary_time) noexcept { _secondary_time = secondary_time; } > inline void set_cquality(CHRONUS_QUALITY cquality) noexcept { _cquality = cquality; } > inline void set_tquality(CHRONUS_TIME_QUALITY tquality) noexcept { _tquality = tquality; } > inline hsh::primitive_value& mutable_value() noexcept { return _value; } > > private: > hsh::time_point _primary_time; > hsh::time_point _secondary_time; > hsh::primitive_value _value; > CHRONUS_QUALITY _cquality = CHRONUS_QUALITY_NODATA; > CHRONUS_TIME_QUALITY _tquality = CHRONUS_TIME_QUALITY_GOOD; > }; > > class StreamGroupSliceEntry > { > public: > explicit StreamGroupSliceEntry(uint32_t cpid) : _cpid(cpid) {} > > StreamGroupSliceEntry(uint32_t cpid, CHRONUS_QUALITY cquality, hsh::time_point secondary_time, > hsh::primitive_value &&value) noexcept > : _cpid(cpid), _cquality(cquality), _secondary_time(secondary_time), _value(std::move(value)) {} > > > inline uint32_t cpid() const noexcept { return _cpid; } > inline const hsh::primitive_value &value() const noexcept { return _value; } > inline CHRONUS_QUALITY cquality() const noexcept { return _cquality; } > inline hsh::time_point secondary_time() const noexcept { return _secondary_time; } > > > inline void set_cquality(CHRONUS_QUALITY cquality) noexcept { _cquality = cquality; } > inline void set_secondary_time(hsh::time_point secondary_time) noexcept { _secondary_time = secondary_time; } > inline hsh::primitive_value& mutable_value() noexcept { return _value; } > > private: > hsh::time_point _secondary_time; > hsh::primitive_value _value; > uint32_t _cpid; > CHRONUS_QUALITY _cquality = CHRONUS_QUALITY_NODATA; > }; > > class StreamGroupSlice > { > public: > > > StreamGroupSlice(hsh::time_point primary_time, hsh::span<const uint32_t> member_cpids) : _primary_time(primary_time) > { > std::for_each(member_cpids.begin(), member_cpids.end(), [&](const uint32_t member_cpid) { _member_values.emplace_back(member_cpid); }); > } > > StreamGroupSlice(size_t num_members, hsh::time_point primary_time, > hsh::time_point secondary_time = {}, CHRONUS_TIME_QUALITY t_quality = CHRONUS_TIME_QUALITY_INVALID) noexcept > : _primary_time(primary_time), _secondary_time(secondary_time), _tquality(t_quality) > { > _member_values.reserve(num_members); > } > > > inline hsh::time_point primary_time() const noexcept { return _primary_time; } > inline hsh::time_point secondary_time() const noexcept { return _secondary_time; } > inline hsh::span<const StreamGroupSliceEntry> member_values() const noexcept { return _member_values; } > inline CHRONUS_TIME_QUALITY t_quality() const noexcept { return _tquality; } > inline const StreamGroupSliceEntry* member_value(uint32_t member_cpid) const noexcept { > auto it = std::find_if(_member_values.cbegin(), _member_values.cend(), > [member_cpid](const StreamGroupSliceEntry &member) { return member.cpid() == member_cpid; }); > return _member_values.cend() != it ? std::addressof(*it) : nullptr; > } > > > inline void set_primary_time(hsh::time_point primary_time) noexcept { _primary_time = primary_time; } > inline void set_secondary_time(hsh::time_point secondary_time) noexcept { _secondary_time = secondary_time; } > inline void set_tquality(CHRONUS_TIME_QUALITY t_quality) noexcept { _tquality = t_quality; } > inline std::vector<StreamGroupSliceEntry> &mutable_member_values() noexcept { return _member_values; } > inline StreamGroupSliceEntry* mutable_member_value(uint32_t member_cpid) noexcept { > auto it = std::find_if(_member_values.begin(), _member_values.end(), > [member_cpid](const StreamGroupSliceEntry &member) { return member.cpid() == member_cpid; }); > return _member_values.end() != it ? std::addressof(*it) : nullptr; > } > > private: > hsh::time_point _primary_time; > hsh::time_point _secondary_time; > std::vector<StreamGroupSliceEntry> _member_values; > CHRONUS_TIME_QUALITY _tquality; > }; > > > class LogValue > { > public: > LogValue(const std::string &ceid, hsh::time_point source_time, hsh::time_point collection_time, > hsh::span<const uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors) > : _ceid(ceid), _source_time(source_time), _collection_time(collection_time) > { > std::copy(aors.begin(), aors.end(), _aors.begin()); > } > > LogValue(std::string &&ceid, hsh::time_point source_time, hsh::time_point collection_time, > hsh::span<const uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors) noexcept > : _ceid(std::move(ceid)), _source_time(source_time), _collection_time(collection_time) > { > std::copy(aors.begin(), aors.end(), _aors.begin()); > } > > > const std::string& ceid() const noexcept { return _ceid; } > hsh::span<const uint8_t, IAORManager::SECURITY_GROUP_BYTES> aors() const noexcept { return _aors; } > hsh::time_point source_time() const noexcept { return _source_time; } > hsh::time_point collection_time() const noexcept { return _collection_time; } > const hsh::flat_map<std::string, hsh::primitive_value>& values() const noexcept { return _values; } > > > hsh::flat_map<std::string, hsh::primitive_value>& mutable_values() noexcept { return _values; } > > private: > std::string _ceid; > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> _aors; > hsh::time_point _source_time; > hsh::time_point _collection_time; > hsh::flat_map<std::string, hsh::primitive_value> _values; > }; > > class StreamAuditEntry > { > public: > StreamAuditEntry() = default; > > StreamAuditEntry(uint32_t cpid, const std::string &ceid, hsh::time_point commit_time, hsh::time_point start_time, hsh::time_point end_time, > const std::string& user_name, const std::string& action, const std::string& result) > : _cpid(cpid), _ceid(ceid), _commit_time(commit_time), _start_time(start_time), _end_time(end_time), _user_name(user_name), > _action(action), _result(result) {} > > StreamAuditEntry(uint32_t cpid, std::string &&ceid, hsh::time_point commit_time, hsh::time_point start_time, hsh::time_point end_time, > std::string&& user_name, std::string&& action, std::string&& result) noexcept > : _cpid(cpid), _ceid(std::move(ceid)), _commit_time(commit_time), _start_time(start_time), _end_time(end_time), _user_name(std::move(user_name)), > _action(std::move(action)), _result(std::move(result)) {} > > > > inline const std::string& ceid() const noexcept { return _ceid; } > inline uint32_t cpid() const noexcept { return _cpid; } > inline hsh::time_point commit_time() const noexcept { return _commit_time; } > inline hsh::time_point start_time() const noexcept { return _start_time; } > inline hsh::time_point end_time() const noexcept { return _end_time; } > inline const hsh::primitive_value& old_value() const noexcept { return _old_value; } > inline const hsh::primitive_value& new_value() const noexcept { return _new_value; } > inline const std::string& user_name() const noexcept { return _user_name; } > inline const std::string& action() const noexcept { return _action; } > inline const std::string& result() const noexcept { return _result; } > > > inline std::string& mutable_ceid() noexcept { return _ceid; } > inline void set_cpid(uint32_t cpid) { _cpid = cpid; } > inline void set_commit_time(hsh::time_point commit_time) noexcept { _commit_time = commit_time; } > inline void set_start_time(hsh::time_point start_time) noexcept { _start_time = start_time; } > inline void set_end_time(hsh::time_point end_time) noexcept { _end_time = end_time; } > inline hsh::primitive_value& mutable_old_value() noexcept { return _old_value; } > inline hsh::primitive_value& mutable_new_value() noexcept { return _new_value; } > inline std::string& mutable_user_name() noexcept { return _user_name; } > inline std::string& mutable_action() noexcept { return _action; } > inline std::string& mutable_result() noexcept { return _result; } > > private: > std::string _ceid; > hsh::time_point _commit_time; > hsh::time_point _start_time; > hsh::time_point _end_time; > hsh::primitive_value _old_value; > hsh::primitive_value _new_value; > std::string _user_name; > std::string _action; > std::string _result; > uint32_t _cpid; > }; > > class GroupAuditEntry > { > public: > GroupAuditEntry() = default; > > GroupAuditEntry(uint32_t cpid, const std::string &ceid, hsh::time_point commit_time, hsh::time_point start_time, > hsh::time_point end_time, const std::string& user_name, const std::string& action, const std::string& result) > : _cpid(cpid), _ceid(ceid), _commit_time(commit_time), _start_time(start_time), _end_time(end_time), _user_name(user_name), > _action(action), _result(result) {} > > GroupAuditEntry(uint32_t cpid, std::string &&ceid, hsh::time_point commit_time, hsh::time_point start_time, > hsh::time_point end_time, std::string&& user_name, std::string&& action, std::string&& result) > : _cpid(cpid), _ceid(std::move(ceid)), _commit_time(commit_time), _start_time(start_time), _end_time(end_time), _user_name(std::move(user_name)), > _action(std::move(action)), _result(std::move(result)) {} > > > inline const std::string& ceid() const noexcept { return _ceid; } > inline uint32_t cpid() const noexcept { return _cpid; } > inline hsh::time_point commit_time() const noexcept { return _commit_time; } > inline hsh::time_point start_time() const noexcept { return _start_time; } > inline hsh::time_point end_time() const noexcept { return _end_time; } > inline const std::unordered_map<uint32_t, hsh::primitive_value>& old_values() const noexcept { return _old_values; } > inline const std::unordered_map<uint32_t, hsh::primitive_value>& new_values() const noexcept { return _new_values; } > inline const std::string& user_name() const noexcept { return _user_name; } > inline const std::string& action() const noexcept { return _action; } > inline const std::string& result() const noexcept { return _result; } > > > inline std::string& mutable_ceid() noexcept { return _ceid; } > inline void set_cpid(uint32_t cpid) { _cpid = cpid; } > inline void set_commit_time(hsh::time_point commit_time) noexcept { _commit_time = commit_time; } > inline void set_start_time(hsh::time_point start_time) noexcept { _start_time = start_time; } > inline void set_end_time(hsh::time_point end_time) noexcept { _end_time = end_time; } > inline std::unordered_map<uint32_t, hsh::primitive_value>& mutable_old_values() noexcept { return _old_values; } > inline std::unordered_map<uint32_t, hsh::primitive_value>& mutable_new_values() noexcept { return _new_values; } > inline std::string& mutable_user_name() noexcept { return _user_name; } > inline std::string& mutable_action() noexcept { return _action; } > inline std::string& mutable_result() noexcept { return _result; } > > > private: > std::string _ceid; > hsh::time_point _commit_time; > hsh::time_point _start_time; > hsh::time_point _end_time; > std::unordered_map<uint32_t, hsh::primitive_value> _old_values; > std::unordered_map<uint32_t, hsh::primitive_value> _new_values; > std::string _user_name; > std::string _action; > std::string _result; > uint32_t _cpid; > }; > >} ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/IDataProviders.h" 2 > > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/result.h" 1 > > > > > > >namespace hsh >{ > > using in_place_success_t = hsh::in_place_index_t<0>; > using in_place_failure_t = hsh::in_place_index_t<1>; > > constexpr in_place_success_t in_place_success{}; > constexpr in_place_failure_t in_place_failure{}; > > template<typename T, typename E = std::error_code> > class result; > > template <typename T> > class ok_t > { > public: > using value_type = T; > ok_t() = default; > ok_t(const ok_t &) = default; > ok_t(ok_t &&) = default; > ok_t &operator=(const ok_t &) = default; > ok_t &operator=(ok_t &&) = default; > ~ok_t() = default; > > template<typename U, enable_if_t<!std::is_same<ok_t, decay_t<U>>::value>* = nullptr> > constexpr explicit ok_t(U &&u) noexcept(std::is_nothrow_constructible<T, U&&>::value) > : _value(hsh::forward<U>(u)) {} > > value_type &value() & { return _value; } > constexpr const value_type &value() const & { return _value; } > value_type &&value() && { return hsh::move(_value); } > constexpr const value_type &&value() const && { return hsh::move(_value); } > > private: > value_type _value; > }; > > template <> > class ok_t<void> > { > using value_type = void; > }; > > inline constexpr ok_t<void> Ok() noexcept { return ok_t<void>{}; } > > template <class T> > inline constexpr ok_t<decay_t<T>> Ok(T &&t) { return ok_t<decay_t<T>>{hsh::forward<T>(t)}; } > > template <typename T> > class error_t > { > public: > using error_type = T; > error_t() = default; > error_t(const error_t &) = default; > error_t(error_t &&) = default; > error_t &operator=(const error_t &) = default; > error_t &operator=(error_t &&) = default; > ~error_t() = default; > > template<typename U, enable_if_t<!std::is_same<error_t, decay_t<U>>::value>* = nullptr> > constexpr explicit error_t(U &&u) noexcept(std::is_nothrow_constructible<T, U&&>::value) > : _error(hsh::forward<U>(u)) {} > > error_type &error() & { return _error; } > constexpr const error_type &error() const & { return _error; } > error_type &&error() && { return hsh::move(_error); } > constexpr const error_type &&error() const && { return hsh::move(_error); } > > private: > error_type _error; > }; > > template <class T> > inline constexpr error_t<decay_t<T>> Err(T &&t) { return error_t<decay_t<T>>{ hsh::forward<T>(t) }; } > > namespace detail > { > template <class T> > struct is_ok_t_impl : std::false_type {}; > ; > template <class T> > struct is_ok_t_impl<ok_t<T>> : std::true_type {}; > > template <class T> > struct is_error_t_impl : std::false_type {}; > > template <class E> > struct is_error_t_impl<error_t<E>> : std::true_type {}; > } > > template <class T> > using is_ok_t = detail::is_ok_t_impl<decay_t<T>>; > > template <class T> > using is_error_t = detail::is_error_t_impl<decay_t<T>>; > > namespace result_detail > { > inline namespace type_traits > { > template <class T, class U> > struct is_implicitly_constructible : std::is_convertible<U, T> {}; > > template <class T> > struct is_implicitly_constructible<T, void> : std::false_type {}; > > template <> > struct is_implicitly_constructible<void, void> : std::false_type {}; > > template <typename T> > struct is_in_place_index : std::false_type {}; > > template <std::size_t I> > struct is_in_place_index<in_place_index_t<I>> : std::true_type {}; > > template <typename T> > struct is_result : std::false_type {}; > > template <typename T, typename E> > struct is_result<result<T, E>> : std::true_type {}; > > template <class T, class E, class U> > using enable_value_converting_constructor = > enable_if_t<conjunction<std::is_constructible<T, U&&>, > negation<std::is_constructible<E, U&&>>, > negation<is_ok_t<U>>, > negation<is_error_t<U>>, > negation<is_in_place_index<decay_t<U>>>, > negation<is_result<decay_t<U>>>, > negation<disjunction<is_implicitly_constructible<T, E>, is_implicitly_constructible<E, T>>>>::value>; > > template <class T, class E, class U> > using enable_error_converting_constructor = > enable_if_t<conjunction<std::is_constructible<E, U&&>, > negation<std::is_constructible<T, U&&>>, > negation<is_ok_t<U>>, > negation<is_error_t<U>>, > negation<is_in_place_index<decay_t<U>>>, > negation<is_result<decay_t<U>>>, > negation<disjunction<is_implicitly_constructible<T, E>, is_implicitly_constructible<E, T>>>>::value>; > > template<class T, class E, class U> > using enable_value_converting_assignment = > enable_if_t<conjunction<std::is_constructible<T, U>, > std::is_assignable<T&, U>, > negation<std::is_assignable<E&, U>>, > negation<is_ok_t<U>>, > negation<is_error_t<U>>, > negation<is_in_place_index<decay_t<U>>>, > negation<is_result<decay_t<U>>>, > negation<disjunction<is_implicitly_constructible<T, E>, is_implicitly_constructible<E, T>>>>::value>; > > template<class T, class E, class U> > using enable_error_converting_assignment = > enable_if_t<conjunction<std::is_constructible<E, U>, > std::is_assignable<E&, U>, > disjunction<std::is_void<T>, negation<std::is_assignable<T&, U>>>, > negation<is_ok_t<U>>, > negation<is_error_t<U>>, > negation<is_in_place_index<decay_t<U>>>, > negation<is_result<decay_t<U>>>, > negation<disjunction<is_implicitly_constructible<T, E>, is_implicitly_constructible<E, T>>>>::value>; > > > > > > template<typename T, typename E, typename T1, typename E1> > using result_from_other_base = > conjunction< > negation<disjunction<std::is_constructible<T, result<T1, E1>&>, std::is_constructible<E, result<T1, E1>&>>>, > negation<disjunction<std::is_constructible<T, const result<T1, E1>&>, std::is_constructible<E, const result<T1, E1>&>>>, > negation<disjunction<std::is_constructible<T, result<T1, E1>&&>, std::is_constructible<E, result<T1, E1>&&>>>, > negation<disjunction<std::is_constructible<T, const result<T1, E1>&&>, std::is_constructible<E, const result<T1, E1>&&>>>, > negation<disjunction<std::is_convertible<result<T1, E1>&, T>, std::is_convertible<result<T1, E1>&, E>>>, > negation<disjunction<std::is_convertible<const result<T1, E1>&, T>, std::is_convertible<const result<T1, E1>&, E>>>, > negation<disjunction<std::is_convertible<result<T1, E1>&&, T>, std::is_convertible<result<T1, E1>&&, E>>>, > negation<disjunction<std::is_convertible<const result<T1, E1>&&, T>, std::is_convertible<const result<T1, E1>&&, E>>>>; > > template<typename T, typename E, typename T1, typename E1> > using result_from_other_copy = > conjunction<result_from_other_base<T, E, T1, E1>, std::is_constructible<T, const T1&>, std::is_constructible<E, const E1&>>; > > template<typename T, typename E, typename T1, typename E1> > using result_from_other_move = > conjunction<result_from_other_base<T, E, T1, E1>, std::is_constructible<T, T1&&>, std::is_constructible<E, E1&&>>; > } > > enum class result_state : uint8_t { invalid = 0, value = 1, error = 2 }; > > struct valueless_t {}; > > > template <typename T, typename E, bool = hsh::is_trivially_destructible<T>::value, bool = hsh::is_trivially_destructible<E>::value> > class result_storage_base > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : valueless{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : _value(hsh::forward<Args>(args)...), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() { clear(); } > > inline void clear() noexcept > { > switch (_state) > { > case result_state::value: > _value.~T(); > break; > case result_state::error: > _error.~E(); > break; > case result_state::invalid: > default: > break; > } > _state = result_state::invalid; > } > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > T _value; > E _error; > char valueless; > }; > result_state _state; > }; > > > template<typename T, typename E> > class result_storage_base<T, E, true, true> > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : valueless{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : _value(hsh::forward<Args>(args)...), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() = default; > > inline void clear() noexcept { _state = result_state::invalid; } > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > T _value; > E _error; > char valueless; > }; > result_state _state; > }; > > > template<typename T, typename E> > class result_storage_base<T, E, true, false> > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : valueless{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : _value(hsh::forward<Args>(args)...), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() { clear(); } > > inline void clear() noexcept > { > switch (_state) > { > case result_state::error: > _error.~E(); > break; > case result_state::invalid: > case result_state::value: > default: > break; > } > _state = result_state::invalid; > } > > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > T _value; > E _error; > char valueless; > }; > result_state _state; > }; > > > template<typename T, typename E> > class result_storage_base<T, E, false, true> > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : valueless{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : _value(hsh::forward<Args>(args)...), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() { clear(); } > > inline void clear() noexcept > { > switch (_state) > { > case result_state::value: > _value.~T(); > break; > case result_state::invalid: > case result_state::error: > default: > break; > } > _state = result_state::invalid; > } > > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > T _value; > E _error; > char valueless; > }; > result_state _state; > }; > > > template <class E> > class result_storage_base<void, E, false, true> > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : _value{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t) noexcept > : _value(), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() = default; > > inline void clear() noexcept { _state = result_state::invalid; } > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > char _value; > E _error; > }; > result_state _state; > }; > > > template <class E> > class result_storage_base<void, E, false, false> > { > public: > explicit constexpr result_storage_base(valueless_t) noexcept : _value{}, _state(result_state::invalid) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_success_t) noexcept > : _value(), _state(result_state::value) {} > > template <class... Args> > explicit constexpr result_storage_base(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : _error(hsh::forward<Args>(args)...), _state(result_state::error) {} > > result_storage_base(const result_storage_base&) = default; > result_storage_base(result_storage_base&&) = default; > > ~result_storage_base() { clear(); } > > inline void clear() noexcept > { > switch (_state) > { > case result_state::error: > _error.~E(); > break; > case result_state::invalid: > case result_state::value: > default: > break; > } > _state = result_state::invalid; > } > > result_storage_base& operator=(const result_storage_base&) = default; > result_storage_base& operator=(result_storage_base&&) = default; > > union > { > char _value; > E _error; > }; > result_state _state; > }; > > > template <class T, class E> > class result_operations_base : public result_storage_base<T, E> > { > using super = result_storage_base<T, E>; > public: > using super::super; > using super::operator=; > > template<typename Other> > inline void construct(Other&& other) > { > switch (other._state) > { > case result_state::value: > this->construct_value(hsh::forward<Other>(other).get()); > break; > case result_state::error: > this->construct_error(hsh::forward<Other>(other).get_err()); > break; > case result_state::invalid: > default: > break; > } > } > > template <class... Args> > inline void construct_value(Args&&... args) > { > new (std::addressof(this->_value)) T(std::forward<Args>(args)...); > this->_state = result_state::value; > } > > template <class... Args> > inline void construct_error(Args&&... args) > { > new (std::addressof(this->_error)) E(std::forward<Args>(args)...); > this->_state = result_state::error; > } > > template<typename Other> > inline void assign(Other&& other) > { > switch (other._state) > { > case result_state::value: > this->assign_value(hsh::forward<Other>(other).get()); > break; > case result_state::error: > this->assign_error(hsh::forward<Other>(other).get_err()); > break; > case result_state::invalid: > default: > this->clear(); > break; > } > } > > template<class V> > inline void assign_value(V&& v) > { > if (result_state::value == this->_state) { > this->_value = hsh::forward<V>(v); > } > else { > this->clear(); > construct_value(hsh::forward<V>(v)); > } > } > > template<class Er> > inline void assign_error(Er&& er) > { > if (result_state::error == this->_state) { > this->_error = hsh::forward<Er>(er); > } > else { > this->clear(); > construct_error(hsh::forward<Er>(er)); > } > } > > T &get() & { return this->_value; } > constexpr const T &get() const & { return this->_value; } > T &&get() && { return hsh::move(this->_value); } > constexpr const T &&get() const && { return hsh::move(this->_value); } > > E &get_err() & { return this->_error; } > constexpr const E &get_err() const & { return this->_error; } > E &&get_err() && { return hsh::move(this->_error); } > constexpr const E &&get_err() const && { return hsh::move(this->_error); } > > }; > > > template <class E> > class result_operations_base<void, E> : public result_storage_base<void, E> > { > using super = result_storage_base<void, E>; > > public: > using super::super; > using super::operator=; > > template<typename Other> > inline void construct(Other&& other) > { > switch (other._state) > { > case result_state::value: > this->construct_value(); > break; > case result_state::error: > this->construct_error(hsh::forward<Other>(other).get_err()); > break; > case result_state::invalid: > default: > break; > } > } > > template <class... Args> > inline void construct_value(Args&&... args) > { > this->_state = result_state::value; > } > > template <class... Args> > inline void construct_error(Args&&... args) > { > new (std::addressof(this->_error)) E(std::forward<Args>(args)...); > this->_state = result_state::error; > } > > template<typename Other> > inline void assign(Other&& other) > { > switch (other._state) > { > case result_state::value: > this->assign_value(); > break; > case result_state::error: > this->assign_error(hsh::forward<Other>(other).get_err()); > break; > case result_state::invalid: > default: > this->clear(); > break; > } > } > > inline void assign_value() > { > if (result_state::value != this->_state) > { > this->clear(); > construct_value(); > } > } > > template<class Er> > inline void assign_error(Er&& er) > { > if (result_state::error == this->_state) { > this->_error = hsh::forward<Er>(er); > } else { > this->clear(); > construct_error(hsh::forward<Er>(er)); > } > } > > E &get_err() & { return this->_error; } > constexpr const E &get_err() const & { return this->_error; } > E &&get_err() && { return hsh::move(this->_error); } > constexpr const E &&get_err() const && { return hsh::move(this->_error); } > }; > > > template<typename T> > using is_void_or_t = hsh::conditional_t<std::is_void<T>::value, hsh::monostate, T>; > > > template <typename T, typename E, operation_support_trait = copy_constructor_traits<is_void_or_t<T>, E>::traits> > class result_copy_constructor_base : public result_operations_base<T, E> > { > using super = result_operations_base<T, E>; > public: > using super::super; > result_copy_constructor_base(const result_copy_constructor_base&) = default; > result_copy_constructor_base(result_copy_constructor_base&&) = default; > > ~result_copy_constructor_base() = default; > > using super::operator=; > result_copy_constructor_base& operator=(const result_copy_constructor_base&) = default; > result_copy_constructor_base& operator=(result_copy_constructor_base&&) = default; > }; > > > template <typename T, typename E> > class result_copy_constructor_base<T, E, operation_support_trait::available> : public result_operations_base<T, E> > { > template<typename...Args> > using is_nothrow = conjunction<std::is_nothrow_copy_constructible<Args>...>; > using super = result_operations_base<T, E>; > public: > using super::super; > > result_copy_constructor_base(const result_copy_constructor_base& other) noexcept(is_nothrow<T, E>::value) : super(valueless_t{}) > { > this->construct(other); > } > result_copy_constructor_base(result_copy_constructor_base&&) = default; > > ~result_copy_constructor_base() = default; > > using super::operator=; > result_copy_constructor_base& operator=(const result_copy_constructor_base&) = default; > result_copy_constructor_base& operator=(result_copy_constructor_base&&) = default; > }; > > > template <typename T, typename E> > class result_copy_constructor_base<T, E, operation_support_trait::unavailable> : public result_operations_base<T, E> > { > using super = result_operations_base<T, E>; > public: > using super::super; > result_copy_constructor_base(const result_copy_constructor_base&) = delete; > result_copy_constructor_base(result_copy_constructor_base&&) = default; > > ~result_copy_constructor_base() = default; > > using super::operator=; > result_copy_constructor_base& operator=(const result_copy_constructor_base&) = default; > result_copy_constructor_base& operator=(result_copy_constructor_base&&) = default; > }; > > > template <typename T, typename E, operation_support_trait = move_constructor_traits<is_void_or_t<T>, E>::traits> > class result_move_constructor_base : public result_copy_constructor_base<T, E> > { > using super = result_copy_constructor_base<T, E>; > public: > using super::super; > result_move_constructor_base(const result_move_constructor_base&) = default; > result_move_constructor_base(result_move_constructor_base&&) = default; > > ~result_move_constructor_base() = default; > > using super::operator=; > result_move_constructor_base& operator=(const result_move_constructor_base&) = default; > result_move_constructor_base& operator=(result_move_constructor_base&&) = default; > }; > > > template <typename T, typename E> > class result_move_constructor_base<T, E, operation_support_trait::available> : public result_copy_constructor_base<T, E> > { > template<typename...Args> > using is_nothrow = conjunction<std::is_nothrow_move_constructible<Args>...>; > using super = result_copy_constructor_base<T, E>; > public: > using super::super; > result_move_constructor_base(const result_move_constructor_base&) = default; > result_move_constructor_base(result_move_constructor_base&& other) noexcept(is_nothrow<T, E>::value) : super(valueless_t{}) > { > this->construct(hsh::move(other)); > } > > ~result_move_constructor_base() = default; > > using super::operator=; > result_move_constructor_base& operator=(const result_move_constructor_base&) = default; > result_move_constructor_base& operator=(result_move_constructor_base&&) = default; > }; > > > template <typename T, typename E> > class result_move_constructor_base<T, E, operation_support_trait::unavailable> : public result_copy_constructor_base<T, E> > { > using super = result_copy_constructor_base<T, E>; > public: > using super::super; > result_move_constructor_base(const result_move_constructor_base&) = default; > result_move_constructor_base(result_move_constructor_base&&) = delete; > > ~result_move_constructor_base() = default; > > using super::operator=; > result_move_constructor_base& operator=(const result_move_constructor_base&) = default; > result_move_constructor_base& operator=(result_move_constructor_base&&) = default; > }; > > > template <typename T, typename E, operation_support_trait = copy_assignment_traits<is_void_or_t<T>, E>::traits> > class result_copy_assignment_base : public result_move_constructor_base<T, E> > { > using super = result_move_constructor_base<T, E>; > public: > using super::super; > result_copy_assignment_base(const result_copy_assignment_base&) = default; > result_copy_assignment_base(result_copy_assignment_base&&) = default; > > ~result_copy_assignment_base() = default; > > using super::operator=; > result_copy_assignment_base& operator=(const result_copy_assignment_base&) = default; > result_copy_assignment_base& operator=(result_copy_assignment_base&&) = default; > }; > > > template <typename T, typename E> > class result_copy_assignment_base<T, E, operation_support_trait::available> : public result_move_constructor_base<T, E> > { > template<typename...Args> > using is_nothrow = conjunction<conjunction<std::is_nothrow_copy_assignable<Args>, std::is_nothrow_copy_constructible<Args>>...>; > using super = result_move_constructor_base<T, E>; > public: > using super::super; > result_copy_assignment_base(const result_copy_assignment_base&) = default; > result_copy_assignment_base(result_copy_assignment_base&&) = default; > > ~result_copy_assignment_base() = default; > > using super::operator=; > result_copy_assignment_base& operator=(const result_copy_assignment_base& other) noexcept(is_nothrow<T, E>::value) > { > this->assign(other); > return *this; > } > result_copy_assignment_base& operator=(result_copy_assignment_base&&) = default; > }; > > > template <typename T, typename E> > class result_copy_assignment_base<T, E, operation_support_trait::unavailable> : public result_move_constructor_base<T, E> > { > using super = result_move_constructor_base<T, E>; > public: > using super::super; > result_copy_assignment_base(const result_copy_assignment_base&) = default; > result_copy_assignment_base(result_copy_assignment_base&&) = default; > > ~result_copy_assignment_base() = default; > > using super::operator=; > result_copy_assignment_base& operator=(const result_copy_assignment_base&) = delete; > result_copy_assignment_base& operator=(result_copy_assignment_base&&) = default; > }; > > > template <typename T, typename E, operation_support_trait = move_assignment_traits<is_void_or_t<T>, E>::traits> > class result_move_assignment_base : public result_copy_assignment_base<T, E> > { > using super = result_copy_assignment_base<T, E>; > public: > using super::super; > result_move_assignment_base(const result_move_assignment_base&) = default; > result_move_assignment_base(result_move_assignment_base&&) = default; > > ~result_move_assignment_base() = default; > > using super::operator=; > result_move_assignment_base& operator=(const result_move_assignment_base&) = default; > result_move_assignment_base& operator=(result_move_assignment_base&&) = default; > }; > > > template <typename T, typename E> > class result_move_assignment_base<T, E, operation_support_trait::available> : public result_copy_assignment_base<T, E> > { > template<typename...Args> > using is_nothrow = conjunction<conjunction<std::is_nothrow_move_assignable<Args>, std::is_nothrow_move_constructible<Args>>...>; > using super = result_copy_assignment_base<T, E>; > public: > using super::super; > result_move_assignment_base(const result_move_assignment_base&) = default; > result_move_assignment_base(result_move_assignment_base&&) = default; > > ~result_move_assignment_base() = default; > > using super::operator=; > result_move_assignment_base& operator=(const result_move_assignment_base&) = default; > result_move_assignment_base& operator=(result_move_assignment_base&& other) noexcept(is_nothrow<T, E>::value) > { > this->assign(hsh::move(other)); > return *this; > } > }; > > > template <typename T, typename E> > class result_move_assignment_base<T, E, operation_support_trait::unavailable> : public result_copy_assignment_base<T, E> > { > using super = result_copy_assignment_base<T, E>; > public: > using super::super; > result_move_assignment_base(const result_move_assignment_base&) = default; > result_move_assignment_base(result_move_assignment_base&&) = default; > > ~result_move_assignment_base() = default; > > using super::operator=; > result_move_assignment_base& operator=(const result_move_assignment_base&) = default; > result_move_assignment_base& operator=(result_move_assignment_base&&) = delete; > }; > > template<typename R> > using result_error_type = typename decay_t<R>::error_type; > > template<typename R> > using result_value_type = typename decay_t<R>::value_type; > > > template<typename Res, > typename F, > enable_if_t<!std::is_void<result_value_type<Res>>::value> * = nullptr, > typename R = hsh::invoke_result_t<F, decltype(*std::declval<Res>())>, > enable_if_t<!std::is_void<R>::value>* = nullptr> > auto map_impl(Res&& r, F&& f) -> hsh::result<decay_t<R>, result_error_type<Res>> > { > using result = hsh::result<R, result_error_type<Res>>; > return r.has_value() ? result{ in_place_success, hsh::invoke(hsh::forward<F>(f), *hsh::forward<Res>(r)) } > : result{ in_place_failure, hsh::forward<Res>(r).error() }; > } > > > template <typename Res, > typename F, > enable_if_t<!std::is_void<result_value_type<Res>>::value>* = nullptr, > typename R = hsh::invoke_result_t<F, decltype(*std::declval<Res>())>, > enable_if_t<std::is_void<R>::value> * = nullptr> > auto map_impl(Res &&r, F &&f) -> hsh::result<void, result_error_type<Res>> > { > using result = hsh::result<void, result_error_type<Res>>; > if (r.has_value()) { > hsh::invoke(hsh::forward<F>(f), *hsh::forward<Res>(r)); > return hsh::Ok(); > } > return result{ in_place_failure, std::forward<Res>(r).error() }; > } > > > template<typename Res, > typename F, > enable_if_t<std::is_void<result_value_type<Res>>::value> * = nullptr, > typename R = hsh::invoke_result_t<F>, > enable_if_t<!std::is_void<R>::value>* = nullptr> > auto map_impl(Res&& r, F&& f) -> hsh::result<decay_t<R>, result_error_type<Res>> > { > using result = hsh::result<R, result_error_type<Res>>; > return r.has_value() ? result{ in_place_success, hsh::invoke(hsh::forward<F>(f)) } > : result{ in_place_failure, hsh::forward<Res>(r).error() }; > } > > > template <typename Res, > typename F, > enable_if_t<std::is_void<result_value_type<Res>>::value>* = nullptr, > typename R = hsh::invoke_result_t<F>, > enable_if_t<std::is_void<R>::value> * = nullptr> > auto map_impl(Res &&r, F &&f) -> hsh::result<void, result_error_type<Res>> > { > using result = hsh::result<void, result_error_type<Res>>; > if (r.has_value()) { > hsh::invoke(hsh::forward<F>(f)); > return hsh::Ok(); > } > return result(in_place_failure, std::forward<Res>(r).error()); > } > > > template <typename Res, > typename F, > enable_if_t<!std::is_void<result_value_type<Res>>::value>* = nullptr, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<!std::is_void<R>::value>* = nullptr> > auto map_error_impl(Res &&r, F &&f) -> hsh::result<result_value_type<Res>, decay_t<R>> > { > using result = hsh::result<result_value_type<Res>, decay_t<R>>; > return r.has_value() ? result{ in_place_success, *hsh::forward<Res>(r) } > : result{ in_place_failure, hsh::invoke(hsh::forward<F>(f), hsh::forward<Res>(r).error()) }; > } > > > template <typename Res, > typename F, > enable_if_t<!std::is_void<result_value_type<Res>>::value>* = nullptr, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<std::is_void<R>::value>* = nullptr> > auto map_error_impl(Res &&r, F &&f) -> hsh::result<result_value_type<Res>, hsh::monostate> > { > using result = hsh::result<result_value_type<Res>, hsh::monostate>; > if (r.has_value()) { > return result{ in_place_success, *hsh::forward<Res>(r) }; > } > hsh::invoke(hsh::forward<F>(f), hsh::forward<Res>(r).error()); > return result{ in_place_failure }; > } > > > template<typename Res, > typename F, > enable_if_t<std::is_void<result_value_type<Res>>::value> * = nullptr, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<!std::is_void<R>::value>* = nullptr> > auto map_error_impl(Res&& r, F&& f) -> hsh::result<void, decay_t<R>> > { > using result = hsh::result<void, decay_t<R>>; > return r.has_value() ? hsh::Ok() : result{ in_place_failure, hsh::invoke(hsh::forward<F>(f), hsh::forward<Res>(r).error()) }; > } > > > template<typename Res, > typename F, > enable_if_t<std::is_void<result_value_type<Res>>::value> * = nullptr, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<std::is_void<R>::value>* = nullptr, > typename Er = hsh::monostate> > auto map_error_impl(Res&& r, F&& f) -> hsh::result<void, Er> > { > using result = hsh::result<void, hsh::monostate>; > if (r.has_value()) { > return hsh::Ok(); > } > hsh::invoke(std::forward<F>(f), std::forward<Res>(r).error()); > return result(in_place_failure); > } > > > template <typename Res, > typename F, > enable_if_t<!std::is_void<result_value_type<Res>>::value> * = nullptr, > typename R = hsh::invoke_result_t<F, result_value_type<Res>>> > auto and_then_impl(Res&& r, F&& f) -> R > { > static_assert(is_result<R>::value, "F must return a result<>"); > return r.has_value() ? hsh::invoke(std::forward<F>(f), *hsh::forward<Res>(r)) > : R(in_place_failure, hsh::forward<Res>(r).error()); > } > > > template <typename Res, > typename F, > typename R = hsh::invoke_result_t<F>, > enable_if_t<std::is_void<result_value_type<Res>>::value> * = nullptr> > auto and_then_impl(Res&& r, F&& f) -> R > { > static_assert(is_result<R>::value, "F must return a result<>"); > return r.has_value() ? hsh::invoke(std::forward<F>(f)) > : R(in_place_failure, std::forward<Res>(r).error()); > } > > > template <typename Res, > typename F, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<!std::is_void<R>::value> * = nullptr> > auto or_else_impl(Res&& r, F&& f) -> R > { > static_assert(is_result<R>::value, "F must return a result<>"); > return r.has_value() > ? std::forward<Res>(r) > : hsh::invoke(hsh::forward<F>(f), hsh::forward<Res>(r).error()); > } > > > template <typename Res, > typename F, > typename R = hsh::invoke_result_t<F, result_error_type<Res>>, > enable_if_t<std::is_void<R>::value> * = nullptr> > auto or_else_impl(Res&& r, F&& f) -> decay_t<Res> > { > return r.has_value() > ? hsh::forward<Res>(r) > : (hsh::invoke(hsh::forward<F>(f), hsh::forward<Res>(r).error()), > std::forward<Res>(r)); > } > > } > > class bad_result_access : public std::logic_error > { > public: > bad_result_access() : std::logic_error("hsh::bad_result_access exception") {} > }; > > template<typename T, typename E> > class result final : private result_detail::result_move_assignment_base<T, E> > { > static_assert(!disjunction<std::is_reference<T>, std::is_reference<E>>::value, "hsh::result of a reference type is ill-formed, use std::reference_wrapper if you need a ref"); > static_assert(!std::is_void<E>::value, "Error Type cannot be void"); > > using base = result_detail::result_move_assignment_base<T, E>; > > template<class, class> > friend class result; > > public: > using value_type = T; > using error_type = E; > > > result() = delete; > > > template<typename...Args, enable_if_t<std::is_constructible<T, Args...>::value>* = nullptr> > constexpr explicit result(in_place_success_t, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : base(in_place_success, hsh::forward<Args>(args)...) {} > > > template <typename U, typename... Args, enable_if_t<std::is_constructible<T, std::initializer_list<U> &, Args...>::value>* = nullptr> > constexpr explicit result(in_place_success_t, std::initializer_list<U> ilist, Args&&... args) > noexcept(std::is_nothrow_constructible<T, std::initializer_list<U>&, Args...>::value) > : base(in_place_success, ilist, std::forward<Args>(args)...) {} > > > template<typename...Args, enable_if_t<std::is_constructible<E, Args...>::value>* = nullptr> > constexpr explicit result(in_place_failure_t, Args&&... args) noexcept(std::is_nothrow_constructible<E, Args...>::value) > : base(in_place_failure, hsh::forward<Args>(args)...) {} > > > template <typename U, typename... Args, enable_if_t<std::is_constructible<E, std::initializer_list<U> &, Args...>::value>* = nullptr> > constexpr explicit result(in_place_failure_t, std::initializer_list<U> ilist, Args&&... args) > noexcept(std::is_nothrow_constructible<E, std::initializer_list<U>&, Args...>::value) > : base(in_place_failure, ilist, std::forward<Args>(args)...) {} > > > template<typename T1 = T, enable_if_t<disjunction<std::is_void<T1>, std::is_default_constructible<T1>>::value>* = nullptr> > constexpr result(const ok_t<void>&) noexcept(noexcept(base(in_place_success))) : base(in_place_success) {} > > > template<typename U, > enable_if_t<conjunction< > negation<std::is_void<U>>, > std::is_constructible<T, const U&>>::value>* = nullptr> > constexpr result(const ok_t<U>& val) noexcept(std::is_nothrow_constructible<T, const U&>::value) > : base(in_place_success, val.value()) {} > > > template<typename U, > enable_if_t<conjunction< > negation<std::is_void<U>>, > std::is_constructible<T, U&&>>::value>* = nullptr> > constexpr result(ok_t<U>&& val) noexcept(std::is_nothrow_constructible<T, U&&>::value) > : base(in_place_success, hsh::move(val).value()) {} > > > template<typename U, enable_if_t<std::is_constructible<E, const U&>::value>* = nullptr> > constexpr result(const error_t<U>& val) noexcept(std::is_nothrow_constructible<E, const U&>::value) > : base(in_place_failure, val.error()) {} > > > template<typename U, enable_if_t<std::is_constructible<E, U&&>::value>* = nullptr> > constexpr result(error_t<U>&& val) noexcept(std::is_nothrow_constructible<E, U&&>::value) > : base(in_place_failure, hsh::move(val).error()) {} > > > template<typename Arg, > enable_if_t<std::is_convertible<Arg&&, T>::value>* = nullptr, > result_detail::enable_value_converting_constructor<T, E, Arg>* = nullptr> > constexpr result(Arg&& arg, in_place_success_t = in_place_success_t{}) noexcept(std::is_nothrow_constructible<T, Arg&&>::value) > : base(in_place_success, hsh::forward<Arg>(arg)) {} > > > template<typename Arg, > enable_if_t<!std::is_convertible<Arg&&, T>::value>* = nullptr, > result_detail::enable_value_converting_constructor<T, E, Arg>* = nullptr> > constexpr explicit result(Arg&& arg, in_place_success_t = in_place_success_t{}) noexcept(std::is_nothrow_constructible<T, Arg&&>::value) > : base(in_place_success, hsh::forward<Arg>(arg)) {} > > > template<typename Arg, > enable_if_t<std::is_convertible<Arg&&, E>::value>* = nullptr, > result_detail::enable_error_converting_constructor<T, E, Arg>* = nullptr> > constexpr result(Arg&& arg, in_place_failure_t = in_place_failure_t{}) noexcept(std::is_nothrow_constructible<E, Arg&&>::value) > : base(in_place_failure, hsh::forward<Arg>(arg)) {} > > > template<typename Arg, > enable_if_t<!std::is_convertible<Arg&&, E>::value>* = nullptr, > result_detail::enable_error_converting_constructor<T, E, Arg>* = nullptr> > constexpr explicit result(Arg&& arg, in_place_failure_t = in_place_failure_t{}) noexcept(std::is_nothrow_constructible<E, Arg&&>::value) > : base(in_place_failure, hsh::forward<Arg>(arg)) {} > > > template<typename T1, typename E1, > enable_if_t<conjunction<std::is_convertible<const T1&, T>, std::is_convertible<const E1&, E>>::value>* = nullptr, > enable_if_t<result_detail::result_from_other_copy<T, E, T1, E1>::value>* = nullptr> > result(const result<T1, E1>& other) > : base(result_detail::valueless_t{}) > { > this->construct(other); > } > > > template<typename T1, typename E1, > enable_if_t<!conjunction<std::is_convertible<const T1&, T>, std::is_convertible<const E1&, E>>::value>* = nullptr, > enable_if_t<result_detail::result_from_other_copy<T, E, T1, E1>::value>* = nullptr> > explicit result(const result<T1, E1>& other) > : base(result_detail::valueless_t{}) > { > this->construct(other); > } > > > template<typename T1, typename E1, > enable_if_t<conjunction<std::is_convertible<T1&&, T>, std::is_convertible<E1&&, E>>::value>* = nullptr, > enable_if_t<result_detail::result_from_other_move<T, E, T1, E1>::value>* = nullptr> > result(result<T1, E1>&& other) > : base(result_detail::valueless_t{}) > { > this->construct(hsh::move(other)); > } > > > template<typename T1, typename E1, > enable_if_t<!conjunction<std::is_convertible<T1&&, T>, std::is_convertible<E1&&, E>>::value>* = nullptr, > enable_if_t<result_detail::result_from_other_move<T, E, T1, E1>::value>* = nullptr> > explicit result(result<T1, E1>&& other) > : base(result_detail::valueless_t{}) > { > this->construct(hsh::move(other)); > } > > > result(const result&) = default; > result(result&&) = default; > > > template<typename Arg, > typename T1 = T, > typename E1 = E, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > result_detail::enable_value_converting_assignment<T1, E1, Arg&&>* = nullptr> > result& operator=(Arg&& arg) noexcept(std::is_nothrow_constructible<T, Arg&&>::value && std::is_nothrow_assignable<T&, Arg&&>::value) > { > this->assign_value(hsh::forward<Arg>(arg)); > return *this; > } > > > template<typename Arg, > typename T1 = T, > typename E1 = E, > result_detail::enable_error_converting_assignment<T1, E1, Arg&&>* = nullptr> > result& operator=(Arg&& arg) noexcept(std::is_nothrow_constructible<E, Arg&&>::value && std::is_nothrow_assignable<E&, Arg&&>::value) > { > this->assign_error(hsh::forward<Arg>(arg)); > return *this; > } > > > template<typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > result& operator=(const hsh::ok_t<void>&) noexcept > { > this->assign_value(); > return *this; > } > > > template<typename U, > typename T1 = T, > enable_if_t<conjunction< > negation<std::is_void<T1>>, > negation<std::is_void<U>>, > std::is_assignable<T1&, const U&>, > std::is_constructible<T1, const U&>>::value>* = nullptr> > result& operator=(const ok_t<U>& val) noexcept(std::is_nothrow_constructible<T, const U&>::value && std::is_nothrow_assignable<T&, const U&>::value) > { > this->assign_value(val.value()); > return *this; > } > > > template<typename U, > typename T1 = T, > enable_if_t<conjunction< > negation<std::is_void<T1>>, > negation<std::is_void<U>>, > std::is_assignable<T1&, U&&>, > std::is_constructible<T1, U&&>>::value>* = nullptr> > result& operator=(ok_t<U>&& val) noexcept(std::is_nothrow_constructible<T, U&&>::value && std::is_nothrow_assignable<T&, U&&>::value) > { > this->assign_value(std::move(val).value()); > return *this; > } > > > template<typename U, enable_if_t<conjunction<std::is_assignable<E&, const U&>, std::is_constructible<E, const U&>>::value>* = nullptr> > result& operator=(const error_t<U>& err) noexcept(std::is_nothrow_constructible<E, const U&>::value && std::is_nothrow_assignable<E&, const U&>::value) > { > this->assign_error(err.error()); > return *this; > } > > > template<typename U, enable_if_t<conjunction<std::is_assignable<E&, U&&>, std::is_constructible<E, U&&>>::value>* = nullptr> > result& operator=(error_t<U>&& err) noexcept(std::is_nothrow_constructible<E, U&&>::value && std::is_nothrow_assignable<E&, U&&>::value) > { > this->assign_error(std::move(err).error()); > return *this; > } > > > result& operator=(const result&) = default; > result& operator=(result&&) = default; > > > template<typename T1 = T, > enable_if_t<std::is_void<T1>::value>* = nullptr> > void emplace_value() > { > this->clear(); > this->construct_value(); > } > > template<typename T1 = T, > typename...Args, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > enable_if_t<std::is_constructible<T1, Args&&...>::value>* = nullptr> > T1& emplace_value(Args&&... args) > { > this->clear(); > this->construct_value(hsh::forward<Args>(args)...); > return this->_value; > } > > template<class U, > typename T1 = T, > typename...Args, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > enable_if_t<std::is_constructible<T1, std::initializer_list<U>&, Args&&...>::value>* = nullptr> > T1& emplace_value(std::initializer_list<U> il, Args&&... args) > { > this->clear(); > this->construct_value(il, hsh::forward<Args>(args)...); > return this->_value; > } > > template<typename E1 = E, > typename...Args, > enable_if_t<std::is_constructible<E1, Args&&...>::value>* = nullptr> > E1& emplace_error(Args&&... args) > { > this->clear(); > this->construct_error(hsh::forward<Args>(args)...); > return this->_error; > } > > template<class U, > typename E1 = E, > typename...Args, > enable_if_t<std::is_constructible<E1, std::initializer_list<U>&, Args&&...>::value>* = nullptr> > E1& emplace_error(std::initializer_list<U> il, Args&&... args) > { > this->clear(); > this->construct_error(il, hsh::forward<Args>(args)...); > return this->_error; > } > > > constexpr explicit operator bool() const noexcept { return has_value(); } > constexpr bool has_value() const noexcept { return result_detail::result_state::value == this->_state; } > constexpr bool has_error() const noexcept { return result_detail::result_state::error == this->_state; } > constexpr bool valueless_by_exception() const noexcept { return result_detail::result_state::invalid == this->_state; } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1* operator->() noexcept { return hsh::addressof(this->_value); } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > constexpr const T1* operator->() const noexcept { return hsh::addressof(this->_value); } > > template<class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1& operator*() & noexcept { return this->_value; } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > constexpr const T1& operator*() const& noexcept { return this->_value; } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1&& operator*() && noexcept { return std::move(this->_value); } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > constexpr const T1&& operator*() const&& noexcept { return std::move(this->_value); } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1& value() & > { > if (!has_value()) { > throw bad_result_access(); > } > return this->_value; > } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > const T1& value() const& > { > if (!has_value()) { > throw bad_result_access(); > } > return this->_value; > } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1&& value() && > { > if (!has_value()) { > throw bad_result_access(); > } > return std::move(this->_value); > } > > template <class T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > const T1&& value() const && > { > if (!has_value()) { > throw bad_result_access(); > } > return std::move(this->_value); > } > > > E &error() & { return this->_error; } > constexpr const E &error() const & { return this->_error; } > E &&error() && { return hsh::move(this->_error); } > constexpr const E &&error() const && { return hsh::move(this->_error); } > > template <typename U> > T value_or(U&& v) const& noexcept { return has_value() ? **this : static_cast<T>(std::forward<U>(v)); } > > template <typename U> > T value_or(U&& v) && noexcept { return has_value() ? std::move(**this) : static_cast<T>(std::forward<U>(v)); } > > > > > template <typename F> > auto map(F&& f) & -> decltype(result_detail::map_impl(std::declval<result&>(), std::declval<F&&>())) > { > return result_detail::map_impl(*this, hsh::forward<F>(f)); > } > > template <typename F> > auto map(F&& f) const& -> decltype(result_detail::map_impl(std::declval<const result&>(), std::declval<F&&>())) > { > return result_detail::map_impl(*this, hsh::forward<F>(f)); > } > > template <typename F> > auto map(F&& f) && -> decltype(result_detail::map_impl(std::declval<result>(), std::declval<F&&>())) > { > return result_detail::map_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > template <typename F> > auto map(F&& f) const&& -> decltype(result_detail::map_impl(std::declval<const result&&>(), std::declval<F&&>())) > { > return result_detail::map_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > > template <typename F> > auto map_error(F&& f) & -> decltype(result_detail::map_error_impl(std::declval<result&>(), std::declval<F&&>())) > { > return result_detail::map_error_impl(*this, hsh::forward<F>(f)); > } > > template <typename F> > auto map_error(F&& f) const& -> decltype(result_detail::map_error_impl(std::declval<const result&>(), std::declval<F&&>())) > { > return result_detail::map_error_impl(*this, hsh::forward<F>(f)); > } > > template <typename F> > auto map_error(F&& f) && -> decltype(result_detail::map_error_impl(std::declval<result>(), std::declval<F&&>())) > { > return result_detail::map_error_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > template <typename F> > auto map_error(F&& f) const&& -> decltype(result_detail::map_error_impl(std::declval<const result&&>(), std::declval<F&&>())) > { > return result_detail::map_error_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > > template <class F> > auto and_then(F&& f) & -> decltype(result_detail::and_then_impl(std::declval<result&>(), std::declval<F&&>())) > { > return result_detail::and_then_impl(*this, hsh::forward<F>(f)); > } > > template <class F> > auto and_then(F &&f) const & -> decltype(result_detail::and_then_impl(std::declval<const result&>(), std::declval<F&&>())) > { > return result_detail::and_then_impl(*this, hsh::forward<F>(f)); > } > > template <class F> > auto and_then(F &&f) && -> decltype(result_detail::and_then_impl(std::declval<result&&>(), std::declval<F&&>())) > { > return and_then_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > template <class F> > auto and_then(F &&f) const && -> decltype(result_detail::and_then_impl(std::declval<const result&&>(), std::declval<F&&>())) > { > return result_detail::and_then_impl(std::move(*this), hsh::forward<F>(f)); > } > > > template <class F> > auto or_else(F&& f) & -> decltype(result_detail::or_else_impl(std::declval<result&>(), std::declval<F&&>())) > { > return result_detail::or_else_impl(*this, hsh::forward<F>(f)); > } > > template <class F> > auto or_else(F &&f) const & -> decltype(result_detail::or_else_impl(std::declval<const result&>(), std::declval<F&&>())) > { > return result_detail::or_else_impl(*this, hsh::forward<F>(f)); > } > > template <class F> > auto or_else(F &&f) && -> decltype(result_detail::or_else_impl(std::declval<result&&>(), std::declval<F&&>())) > { > return result_detail::or_else_impl(hsh::move(*this), hsh::forward<F>(f)); > } > > template <class F> > auto or_else(F &&f) const && -> decltype(result_detail::or_else_impl(std::declval<const result&&>(), std::declval<F&&>())) > { > return result_detail::or_else_impl(std::move(*this), hsh::forward<F>(f)); > } > > > template <typename T1 = T, > typename E1 = E, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > enable_if_t<conjunction<is_swappable<T1>, std::is_move_constructible<T1>, is_swappable<E1>, std::is_move_constructible<E1>>::value>* = nullptr> > void swap(result& other) noexcept(conjunction<std::is_nothrow_move_constructible<T>, is_nothrow_swappable<T>, std::is_nothrow_move_constructible<E>, is_nothrow_swappable<E>>::value) > { > using std::swap; > switch (this->_state) > { > case result_detail::result_state::value: > { > switch (other._state) > { > case result_detail::result_state::value: > swap(this->_value, other._value); > break; > case result_detail::result_state::error: > { > E temp(std::move(other._error)); > other.construct_value(std::move(this->_value)); > this->construct_error(std::move(temp)); > break; > } > case result_detail::result_state::invalid: > default: > other.construct_value(std::move(this->_value)); > this->clear(); > break; > } > break; > } > case result_detail::result_state::error: > { > switch (other._state) > { > case result_detail::result_state::value: > { > E temp(std::move(this->_error)); > this->construct_value(std::move(other._value)); > other.construct_error(std::move(temp)); > break; > } > case result_detail::result_state::error: > swap(this->_error, other._error); > break; > case result_detail::result_state::invalid: > default: > other.construct_error(std::move(this->_error)); > this->clear(); > break; > } > break; > } > case result_detail::result_state::invalid: > default: > { > switch (other._state) > { > case result_detail::result_state::value: > this->construct_value(std::move(other._value)); > other.clear(); > break; > case result_detail::result_state::error: > this->construct_error(std::move(other._error)); > other.clear(); > break; > case result_detail::result_state::invalid: > default: > break; > } > break; > } > } > } > > > template <typename T1 = T, > typename E1 = E, > enable_if_t<std::is_void<T1>::value>* = nullptr, > enable_if_t<conjunction<is_swappable<E1>, std::is_move_constructible<E1>>::value>* = nullptr> > void swap(result& other) noexcept(conjunction<std::is_nothrow_move_constructible<E>, is_nothrow_swappable<E>>::value) > { > using std::swap; > switch (this->_state) > { > case result_detail::result_state::value: > { > switch (other._state) > { > case result_detail::result_state::value: > break; > case result_detail::result_state::error: > this->construct_error(std::move(other._error)); > other.construct_value(); > break; > case result_detail::result_state::invalid: > default: > other.construct_value(); > this->clear(); > break; > } > break; > } > case result_detail::result_state::error: > { > switch (other._state) > { > case result_detail::result_state::value: > other.construct_error(std::move(this->_error)); > this->construct_value(); > break; > case result_detail::result_state::error: > swap(this->_error, other._error); > break; > case result_detail::result_state::invalid: > default: > other.construct_error(std::move(this->_error)); > this->clear(); > break; > } > break; > } > case result_detail::result_state::invalid: > default: > { > switch (other._state) > { > case result_detail::result_state::value: > this->construct_value(); > other.clear(); > break; > case result_detail::result_state::error: > this->construct_error(std::move(other._error)); > other.clear(); > break; > case result_detail::result_state::invalid: > default: > break; > } > break; > } > } > } > > private: > template<typename Other> > void construct(Other&& other) > { > switch (other._state) > { > case result_detail::result_state::value: > this->construct_value(hsh::forward<Other>(other)._value); > break; > case result_detail::result_state::error: > this->construct_error(hsh::forward<Other>(other)._error); > break; > case result_detail::result_state::invalid: > default: > break; > } > } > > template<typename Other> > inline void assign(Other&& other) > { > switch (other._state) > { > case result_detail::result_state::value: > this->assign_value(hsh::forward<Other>(other)._value); > break; > case result_detail::result_state::error: > this->assign_error(hsh::forward<Other>(other)._error); > break; > case result_detail::result_state::invalid: > default: > this->clear(); > break; > } > } > }; > > > template <class T, class E> > void swap(result<T, E>& lhs, result<T, E>& rhs) noexcept(noexcept(lhs.swap(rhs))) { lhs.swap(rhs); } > >} ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/IDataProviders.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/future.h" 1 > > ># 1 "/usr/include/c++/4.8.2/condition_variable" 1 3 ># 32 "/usr/include/c++/4.8.2/condition_variable" 3 > ># 33 "/usr/include/c++/4.8.2/condition_variable" 3 ># 43 "/usr/include/c++/4.8.2/condition_variable" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 56 "/usr/include/c++/4.8.2/condition_variable" 3 > enum class cv_status { no_timeout, timeout }; > > > class condition_variable > { > typedef chrono::system_clock __clock_t; > typedef __gthread_cond_t __native_type; > > > __native_type _M_cond = { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }; > > > > > public: > typedef __native_type* native_handle_type; > > condition_variable() noexcept; > ~condition_variable() noexcept; > > condition_variable(const condition_variable&) = delete; > condition_variable& operator=(const condition_variable&) = delete; > > void > notify_one() noexcept; > > void > notify_all() noexcept; > > void > wait(unique_lock<mutex>& __lock); > > template<typename _Predicate> > void > wait(unique_lock<mutex>& __lock, _Predicate __p) > { > while (!__p()) > wait(__lock); > } > > template<typename _Duration> > cv_status > wait_until(unique_lock<mutex>& __lock, > const chrono::time_point<__clock_t, _Duration>& __atime) > { return __wait_until_impl(__lock, __atime); } > > template<typename _Clock, typename _Duration> > cv_status > wait_until(unique_lock<mutex>& __lock, > const chrono::time_point<_Clock, _Duration>& __atime) > { > > const typename _Clock::time_point __c_entry = _Clock::now(); > const __clock_t::time_point __s_entry = __clock_t::now(); > const auto __delta = __atime - __c_entry; > const auto __s_atime = __s_entry + __delta; > > return __wait_until_impl(__lock, __s_atime); > } > > template<typename _Clock, typename _Duration, typename _Predicate> > bool > wait_until(unique_lock<mutex>& __lock, > const chrono::time_point<_Clock, _Duration>& __atime, > _Predicate __p) > { > while (!__p()) > if (wait_until(__lock, __atime) == cv_status::timeout) > return __p(); > return true; > } > > template<typename _Rep, typename _Period> > cv_status > wait_for(unique_lock<mutex>& __lock, > const chrono::duration<_Rep, _Period>& __rtime) > { return wait_until(__lock, __clock_t::now() + __rtime); } > > template<typename _Rep, typename _Period, typename _Predicate> > bool > wait_for(unique_lock<mutex>& __lock, > const chrono::duration<_Rep, _Period>& __rtime, > _Predicate __p) > { return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); } > > native_handle_type > native_handle() > { return &_M_cond; } > > private: > template<typename _Dur> > cv_status > __wait_until_impl(unique_lock<mutex>& __lock, > const chrono::time_point<__clock_t, _Dur>& __atime) > { > auto __s = chrono::time_point_cast<chrono::seconds>(__atime); > auto __ns = chrono::duration_cast<chrono::nanoseconds>(__atime - __s); > > __gthread_time_t __ts = > { > static_cast<std::time_t>(__s.time_since_epoch().count()), > static_cast<long>(__ns.count()) > }; > > __gthread_cond_timedwait(&_M_cond, __lock.mutex()->native_handle(), > &__ts); > > return (__clock_t::now() < __atime > ? cv_status::no_timeout : cv_status::timeout); > } > }; > > > > class condition_variable_any > { > typedef chrono::system_clock __clock_t; > condition_variable _M_cond; > mutex _M_mutex; > > > template<typename _Lock> > struct _Unlock > { > explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); } > > ~_Unlock() noexcept(false) > { > if (uncaught_exception()) > try { _M_lock.lock(); } catch(...) { } > else > _M_lock.lock(); > } > > _Unlock(const _Unlock&) = delete; > _Unlock& operator=(const _Unlock&) = delete; > > _Lock& _M_lock; > }; > > public: > > condition_variable_any() noexcept; > ~condition_variable_any() noexcept; > > condition_variable_any(const condition_variable_any&) = delete; > condition_variable_any& operator=(const condition_variable_any&) = delete; > > void > notify_one() noexcept > { > lock_guard<mutex> __lock(_M_mutex); > _M_cond.notify_one(); > } > > void > notify_all() noexcept > { > lock_guard<mutex> __lock(_M_mutex); > _M_cond.notify_all(); > } > > template<typename _Lock> > void > wait(_Lock& __lock) > { > unique_lock<mutex> __my_lock(_M_mutex); > _Unlock<_Lock> __unlock(__lock); > > > unique_lock<mutex> __my_lock2(std::move(__my_lock)); > _M_cond.wait(__my_lock2); > } > > > template<typename _Lock, typename _Predicate> > void > wait(_Lock& __lock, _Predicate __p) > { > while (!__p()) > wait(__lock); > } > > template<typename _Lock, typename _Clock, typename _Duration> > cv_status > wait_until(_Lock& __lock, > const chrono::time_point<_Clock, _Duration>& __atime) > { > unique_lock<mutex> __my_lock(_M_mutex); > _Unlock<_Lock> __unlock(__lock); > > > unique_lock<mutex> __my_lock2(std::move(__my_lock)); > return _M_cond.wait_until(__my_lock2, __atime); > } > > template<typename _Lock, typename _Clock, > typename _Duration, typename _Predicate> > bool > wait_until(_Lock& __lock, > const chrono::time_point<_Clock, _Duration>& __atime, > _Predicate __p) > { > while (!__p()) > if (wait_until(__lock, __atime) == cv_status::timeout) > return __p(); > return true; > } > > template<typename _Lock, typename _Rep, typename _Period> > cv_status > wait_for(_Lock& __lock, const chrono::duration<_Rep, _Period>& __rtime) > { return wait_until(__lock, __clock_t::now() + __rtime); } > > template<typename _Lock, typename _Rep, > typename _Period, typename _Predicate> > bool > wait_for(_Lock& __lock, > const chrono::duration<_Rep, _Period>& __rtime, _Predicate __p) > { return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); } > }; > > > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/future.h" 2 ># 1 "/usr/include/c++/4.8.2/future" 1 3 ># 32 "/usr/include/c++/4.8.2/future" 3 > ># 33 "/usr/include/c++/4.8.2/future" 3 ># 50 "/usr/include/c++/4.8.2/future" 3 >namespace std __attribute__ ((__visibility__ ("default"))) >{ > ># 63 "/usr/include/c++/4.8.2/future" 3 > enum class future_errc > { > future_already_retrieved = 1, > promise_already_satisfied, > no_state, > broken_promise > }; > > > template<> > struct is_error_code_enum<future_errc> : public true_type { }; > > > const error_category& > future_category() noexcept; > > > inline error_code > make_error_code(future_errc __errc) noexcept > { return error_code(static_cast<int>(__errc), future_category()); } > > > inline error_condition > make_error_condition(future_errc __errc) noexcept > { return error_condition(static_cast<int>(__errc), future_category()); } > > > > > > class future_error : public logic_error > { > error_code _M_code; > > public: > explicit future_error(error_code __ec) > : logic_error("std::future_error"), _M_code(__ec) > { } > > virtual ~future_error() noexcept; > > virtual const char* > what() const noexcept; > > const error_code& > code() const noexcept { return _M_code; } > }; > > > template<typename _Res> > class future; > > template<typename _Res> > class shared_future; > > template<typename _Signature> > class packaged_task; > > template<typename _Res> > class promise; > > > enum class launch > { > async = 1, > deferred = 2 > }; > > constexpr launch operator&(launch __x, launch __y) > { > return static_cast<launch>( > static_cast<int>(__x) & static_cast<int>(__y)); > } > > constexpr launch operator|(launch __x, launch __y) > { > return static_cast<launch>( > static_cast<int>(__x) | static_cast<int>(__y)); > } > > constexpr launch operator^(launch __x, launch __y) > { > return static_cast<launch>( > static_cast<int>(__x) ^ static_cast<int>(__y)); > } > > constexpr launch operator~(launch __x) > { return static_cast<launch>(~static_cast<int>(__x)); } > > inline launch& operator&=(launch& __x, launch __y) > { return __x = __x & __y; } > > inline launch& operator|=(launch& __x, launch __y) > { return __x = __x | __y; } > > inline launch& operator^=(launch& __x, launch __y) > { return __x = __x ^ __y; } > > > enum class future_status > { > ready, > timeout, > deferred > }; > > template<typename _Fn, typename... _Args> > future<typename result_of<_Fn(_Args...)>::type> > async(launch __policy, _Fn&& __fn, _Args&&... __args); > > template<typename _Fn, typename... _Args> > future<typename result_of<_Fn(_Args...)>::type> > async(_Fn&& __fn, _Args&&... __args); > > > > > > struct __future_base > { > > struct _Result_base > { > exception_ptr _M_error; > > _Result_base(const _Result_base&) = delete; > _Result_base& operator=(const _Result_base&) = delete; > > > virtual void _M_destroy() = 0; > > struct _Deleter > { > void operator()(_Result_base* __fr) const { __fr->_M_destroy(); } > }; > > protected: > _Result_base(); > virtual ~_Result_base(); > }; > > > template<typename _Res> > struct _Result : _Result_base > { > private: > typedef alignment_of<_Res> __a_of; > typedef aligned_storage<sizeof(_Res), __a_of::value> __align_storage; > typedef typename __align_storage::type __align_type; > > __align_type _M_storage; > bool _M_initialized; > > public: > typedef _Res result_type; > > _Result() noexcept : _M_initialized() { } > > ~_Result() > { > if (_M_initialized) > _M_value().~_Res(); > } > > > _Res& > _M_value() noexcept { return *static_cast<_Res*>(_M_addr()); } > > void > _M_set(const _Res& __res) > { > ::new (_M_addr()) _Res(__res); > _M_initialized = true; > } > > void > _M_set(_Res&& __res) > { > ::new (_M_addr()) _Res(std::move(__res)); > _M_initialized = true; > } > > private: > void _M_destroy() { delete this; } > > void* _M_addr() noexcept { return static_cast<void*>(&_M_storage); } > }; > > > template<typename _Res> > using _Ptr = unique_ptr<_Res, _Result_base::_Deleter>; > > > template<typename _Res, typename _Alloc> > struct _Result_alloc final : _Result<_Res>, _Alloc > { > typedef typename allocator_traits<_Alloc>::template > rebind_alloc<_Result_alloc> __allocator_type; > > explicit > _Result_alloc(const _Alloc& __a) : _Result<_Res>(), _Alloc(__a) > { } > > private: > void _M_destroy() > { > typedef allocator_traits<__allocator_type> __traits; > __allocator_type __a(*this); > __traits::destroy(__a, this); > __traits::deallocate(__a, this, 1); > } > }; > > template<typename _Res, typename _Allocator> > static _Ptr<_Result_alloc<_Res, _Allocator>> > _S_allocate_result(const _Allocator& __a) > { > typedef _Result_alloc<_Res, _Allocator> __result_type; > typedef allocator_traits<typename __result_type::__allocator_type> > __traits; > typename __traits::allocator_type __a2(__a); > __result_type* __p = __traits::allocate(__a2, 1); > try > { > __traits::construct(__a2, __p, __a); > } > catch(...) > { > __traits::deallocate(__a2, __p, 1); > throw; > } > return _Ptr<__result_type>(__p); > } > > template<typename _Res, typename _Tp> > static _Ptr<_Result<_Res>> > _S_allocate_result(const std::allocator<_Tp>& __a) > { > return _Ptr<_Result<_Res>>(new _Result<_Res>); > } > > > > class _State_base > { > typedef _Ptr<_Result_base> _Ptr_type; > > _Ptr_type _M_result; > mutex _M_mutex; > condition_variable _M_cond; > atomic_flag _M_retrieved; > once_flag _M_once; > > public: > _State_base() noexcept : _M_result(), _M_retrieved({ 0 }) { } > _State_base(const _State_base&) = delete; > _State_base& operator=(const _State_base&) = delete; > virtual ~_State_base(); > > _Result_base& > wait() > { > _M_run_deferred(); > unique_lock<mutex> __lock(_M_mutex); > _M_cond.wait(__lock, [&] { return _M_ready(); }); > return *_M_result; > } > > template<typename _Rep, typename _Period> > future_status > wait_for(const chrono::duration<_Rep, _Period>& __rel) > { > unique_lock<mutex> __lock(_M_mutex); > if (_M_cond.wait_for(__lock, __rel, [&] { return _M_ready(); })) > return future_status::ready; > return future_status::timeout; > } > > template<typename _Clock, typename _Duration> > future_status > wait_until(const chrono::time_point<_Clock, _Duration>& __abs) > { > unique_lock<mutex> __lock(_M_mutex); > if (_M_cond.wait_until(__lock, __abs, [&] { return _M_ready(); })) > return future_status::ready; > return future_status::timeout; > } > > void > _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false) > { > bool __set = false; > > > call_once(_M_once, &_State_base::_M_do_set, this, ref(__res), > ref(__set)); > if (__set) > _M_cond.notify_all(); > else if (!__ignore_failure) > __throw_future_error(int(future_errc::promise_already_satisfied)); > } > > void > _M_break_promise(_Ptr_type __res) > { > if (static_cast<bool>(__res)) > { > error_code __ec(make_error_code(future_errc::broken_promise)); > __res->_M_error = copy_exception(future_error(__ec)); > { > lock_guard<mutex> __lock(_M_mutex); > _M_result.swap(__res); > } > _M_cond.notify_all(); > } > } > > > void > _M_set_retrieved_flag() > { > if (_M_retrieved.test_and_set()) > __throw_future_error(int(future_errc::future_already_retrieved)); > } > > template<typename _Res, typename _Arg> > struct _Setter; > > > template<typename _Res, typename _Arg> > struct _Setter<_Res, _Arg&> > { > > > static_assert(is_same<_Res, _Arg&>::value > || is_same<const _Res, _Arg>::value, > "Invalid specialisation"); > > typename promise<_Res>::_Ptr_type operator()() > { > _State_base::_S_check(_M_promise->_M_future); > _M_promise->_M_storage->_M_set(_M_arg); > return std::move(_M_promise->_M_storage); > } > promise<_Res>* _M_promise; > _Arg& _M_arg; > }; > > > template<typename _Res> > struct _Setter<_Res, _Res&&> > { > typename promise<_Res>::_Ptr_type operator()() > { > _State_base::_S_check(_M_promise->_M_future); > _M_promise->_M_storage->_M_set(std::move(_M_arg)); > return std::move(_M_promise->_M_storage); > } > promise<_Res>* _M_promise; > _Res& _M_arg; > }; > > struct __exception_ptr_tag { }; > > > template<typename _Res> > struct _Setter<_Res, __exception_ptr_tag> > { > typename promise<_Res>::_Ptr_type operator()() > { > _State_base::_S_check(_M_promise->_M_future); > _M_promise->_M_storage->_M_error = _M_ex; > return std::move(_M_promise->_M_storage); > } > > promise<_Res>* _M_promise; > exception_ptr& _M_ex; > }; > > template<typename _Res, typename _Arg> > static _Setter<_Res, _Arg&&> > __setter(promise<_Res>* __prom, _Arg&& __arg) > { > return _Setter<_Res, _Arg&&>{ __prom, __arg }; > } > > template<typename _Res> > static _Setter<_Res, __exception_ptr_tag> > __setter(exception_ptr& __ex, promise<_Res>* __prom) > { > return _Setter<_Res, __exception_ptr_tag>{ __prom, __ex }; > } > > static _Setter<void, void> > __setter(promise<void>* __prom); > > template<typename _Tp> > static void > _S_check(const shared_ptr<_Tp>& __p) > { > if (!static_cast<bool>(__p)) > __throw_future_error((int)future_errc::no_state); > } > > private: > void > _M_do_set(function<_Ptr_type()>& __f, bool& __set) > { > _Ptr_type __res = __f(); > { > lock_guard<mutex> __lock(_M_mutex); > _M_result.swap(__res); > } > __set = true; > } > > bool _M_ready() const noexcept { return static_cast<bool>(_M_result); } > > > virtual void _M_run_deferred() { } > }; > > template<typename _BoundFn, typename = typename _BoundFn::result_type> > class _Deferred_state; > > class _Async_state_common; > > template<typename _BoundFn, typename = typename _BoundFn::result_type> > class _Async_state_impl; > > template<typename _Signature> > class _Task_state_base; > > template<typename _Fn, typename _Alloc, typename _Signature> > class _Task_state; > > template<typename _BoundFn> > static std::shared_ptr<_State_base> > _S_make_deferred_state(_BoundFn&& __fn); > > template<typename _BoundFn> > static std::shared_ptr<_State_base> > _S_make_async_state(_BoundFn&& __fn); > > template<typename _Res_ptr, > typename _Res = typename _Res_ptr::element_type::result_type> > struct _Task_setter; > > template<typename _Res_ptr, typename _BoundFn> > static _Task_setter<_Res_ptr> > _S_task_setter(_Res_ptr& __ptr, _BoundFn&& __call) > { > return _Task_setter<_Res_ptr>{ __ptr, std::ref(__call) }; > } > }; > > > template<typename _Res> > struct __future_base::_Result<_Res&> : __future_base::_Result_base > { > typedef _Res& result_type; > > _Result() noexcept : _M_value_ptr() { } > > void _M_set(_Res& __res) noexcept { _M_value_ptr = &__res; } > > _Res& _M_get() noexcept { return *_M_value_ptr; } > > private: > _Res* _M_value_ptr; > > void _M_destroy() { delete this; } > }; > > > template<> > struct __future_base::_Result<void> : __future_base::_Result_base > { > typedef void result_type; > > private: > void _M_destroy() { delete this; } > }; > > > > template<typename _Res> > class __basic_future : public __future_base > { > protected: > typedef shared_ptr<_State_base> __state_type; > typedef __future_base::_Result<_Res>& __result_type; > > private: > __state_type _M_state; > > public: > > __basic_future(const __basic_future&) = delete; > __basic_future& operator=(const __basic_future&) = delete; > > bool > valid() const noexcept { return static_cast<bool>(_M_state); } > > void > wait() const > { > _State_base::_S_check(_M_state); > _M_state->wait(); > } > > template<typename _Rep, typename _Period> > future_status > wait_for(const chrono::duration<_Rep, _Period>& __rel) const > { > _State_base::_S_check(_M_state); > return _M_state->wait_for(__rel); > } > > template<typename _Clock, typename _Duration> > future_status > wait_until(const chrono::time_point<_Clock, _Duration>& __abs) const > { > _State_base::_S_check(_M_state); > return _M_state->wait_until(__abs); > } > > protected: > > __result_type > _M_get_result() const > { > _State_base::_S_check(_M_state); > _Result_base& __res = _M_state->wait(); > if (!(__res._M_error == 0)) > rethrow_exception(__res._M_error); > return static_cast<__result_type>(__res); > } > > void _M_swap(__basic_future& __that) noexcept > { > _M_state.swap(__that._M_state); > } > > > explicit > __basic_future(const __state_type& __state) : _M_state(__state) > { > _State_base::_S_check(_M_state); > _M_state->_M_set_retrieved_flag(); > } > > > explicit > __basic_future(const shared_future<_Res>&) noexcept; > > > explicit > __basic_future(shared_future<_Res>&&) noexcept; > > > explicit > __basic_future(future<_Res>&&) noexcept; > > constexpr __basic_future() noexcept : _M_state() { } > > struct _Reset > { > explicit _Reset(__basic_future& __fut) noexcept : _M_fut(__fut) { } > ~_Reset() { _M_fut._M_state.reset(); } > __basic_future& _M_fut; > }; > }; > > > > template<typename _Res> > class future : public __basic_future<_Res> > { > friend class promise<_Res>; > template<typename> friend class packaged_task; > template<typename _Fn, typename... _Args> > friend future<typename result_of<_Fn(_Args...)>::type> > async(launch, _Fn&&, _Args&&...); > > typedef __basic_future<_Res> _Base_type; > typedef typename _Base_type::__state_type __state_type; > > explicit > future(const __state_type& __state) : _Base_type(__state) { } > > public: > constexpr future() noexcept : _Base_type() { } > > > future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } > > > future(const future&) = delete; > future& operator=(const future&) = delete; > > future& operator=(future&& __fut) noexcept > { > future(std::move(__fut))._M_swap(*this); > return *this; > } > > > _Res > get() > { > typename _Base_type::_Reset __reset(*this); > return std::move(this->_M_get_result()._M_value()); > } > > shared_future<_Res> share(); > }; > > > template<typename _Res> > class future<_Res&> : public __basic_future<_Res&> > { > friend class promise<_Res&>; > template<typename> friend class packaged_task; > template<typename _Fn, typename... _Args> > friend future<typename result_of<_Fn(_Args...)>::type> > async(launch, _Fn&&, _Args&&...); > > typedef __basic_future<_Res&> _Base_type; > typedef typename _Base_type::__state_type __state_type; > > explicit > future(const __state_type& __state) : _Base_type(__state) { } > > public: > constexpr future() noexcept : _Base_type() { } > > > future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } > > > future(const future&) = delete; > future& operator=(const future&) = delete; > > future& operator=(future&& __fut) noexcept > { > future(std::move(__fut))._M_swap(*this); > return *this; > } > > > _Res& > get() > { > typename _Base_type::_Reset __reset(*this); > return this->_M_get_result()._M_get(); > } > > shared_future<_Res&> share(); > }; > > > template<> > class future<void> : public __basic_future<void> > { > friend class promise<void>; > template<typename> friend class packaged_task; > template<typename _Fn, typename... _Args> > friend future<typename result_of<_Fn(_Args...)>::type> > async(launch, _Fn&&, _Args&&...); > > typedef __basic_future<void> _Base_type; > typedef typename _Base_type::__state_type __state_type; > > explicit > future(const __state_type& __state) : _Base_type(__state) { } > > public: > constexpr future() noexcept : _Base_type() { } > > > future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } > > > future(const future&) = delete; > future& operator=(const future&) = delete; > > future& operator=(future&& __fut) noexcept > { > future(std::move(__fut))._M_swap(*this); > return *this; > } > > > void > get() > { > typename _Base_type::_Reset __reset(*this); > this->_M_get_result(); > } > > shared_future<void> share(); > }; > > > > template<typename _Res> > class shared_future : public __basic_future<_Res> > { > typedef __basic_future<_Res> _Base_type; > > public: > constexpr shared_future() noexcept : _Base_type() { } > > > shared_future(const shared_future& __sf) : _Base_type(__sf) { } > > > shared_future(future<_Res>&& __uf) noexcept > : _Base_type(std::move(__uf)) > { } > > > shared_future(shared_future&& __sf) noexcept > : _Base_type(std::move(__sf)) > { } > > shared_future& operator=(const shared_future& __sf) > { > shared_future(__sf)._M_swap(*this); > return *this; > } > > shared_future& operator=(shared_future&& __sf) noexcept > { > shared_future(std::move(__sf))._M_swap(*this); > return *this; > } > > > const _Res& > get() const { return this->_M_get_result()._M_value(); } > }; > > > template<typename _Res> > class shared_future<_Res&> : public __basic_future<_Res&> > { > typedef __basic_future<_Res&> _Base_type; > > public: > constexpr shared_future() noexcept : _Base_type() { } > > > shared_future(const shared_future& __sf) : _Base_type(__sf) { } > > > shared_future(future<_Res&>&& __uf) noexcept > : _Base_type(std::move(__uf)) > { } > > > shared_future(shared_future&& __sf) noexcept > : _Base_type(std::move(__sf)) > { } > > shared_future& operator=(const shared_future& __sf) > { > shared_future(__sf)._M_swap(*this); > return *this; > } > > shared_future& operator=(shared_future&& __sf) noexcept > { > shared_future(std::move(__sf))._M_swap(*this); > return *this; > } > > > _Res& > get() const { return this->_M_get_result()._M_get(); } > }; > > > template<> > class shared_future<void> : public __basic_future<void> > { > typedef __basic_future<void> _Base_type; > > public: > constexpr shared_future() noexcept : _Base_type() { } > > > shared_future(const shared_future& __sf) : _Base_type(__sf) { } > > > shared_future(future<void>&& __uf) noexcept > : _Base_type(std::move(__uf)) > { } > > > shared_future(shared_future&& __sf) noexcept > : _Base_type(std::move(__sf)) > { } > > shared_future& operator=(const shared_future& __sf) > { > shared_future(__sf)._M_swap(*this); > return *this; > } > > shared_future& operator=(shared_future&& __sf) noexcept > { > shared_future(std::move(__sf))._M_swap(*this); > return *this; > } > > > void > get() const { this->_M_get_result(); } > }; > > > template<typename _Res> > inline __basic_future<_Res>:: > __basic_future(const shared_future<_Res>& __sf) noexcept > : _M_state(__sf._M_state) > { } > > template<typename _Res> > inline __basic_future<_Res>:: > __basic_future(shared_future<_Res>&& __sf) noexcept > : _M_state(std::move(__sf._M_state)) > { } > > template<typename _Res> > inline __basic_future<_Res>:: > __basic_future(future<_Res>&& __uf) noexcept > : _M_state(std::move(__uf._M_state)) > { } > > template<typename _Res> > inline shared_future<_Res> > future<_Res>::share() > { return shared_future<_Res>(std::move(*this)); } > > template<typename _Res> > inline shared_future<_Res&> > future<_Res&>::share() > { return shared_future<_Res&>(std::move(*this)); } > > inline shared_future<void> > future<void>::share() > { return shared_future<void>(std::move(*this)); } > > > template<typename _Res> > class promise > { > typedef __future_base::_State_base _State; > typedef __future_base::_Result<_Res> _Res_type; > typedef __future_base::_Ptr<_Res_type> _Ptr_type; > template<typename, typename> friend class _State::_Setter; > > shared_ptr<_State> _M_future; > _Ptr_type _M_storage; > > public: > promise() > : _M_future(std::make_shared<_State>()), > _M_storage(new _Res_type()) > { } > > promise(promise&& __rhs) noexcept > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator& __a) > : _M_future(std::allocate_shared<_State>(__a)), > _M_storage(__future_base::_S_allocate_result<_Res>(__a)) > { } > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator&, promise&& __rhs) > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > promise(const promise&) = delete; > > ~promise() > { > if (static_cast<bool>(_M_future) && !_M_future.unique()) > _M_future->_M_break_promise(std::move(_M_storage)); > } > > > promise& > operator=(promise&& __rhs) noexcept > { > promise(std::move(__rhs)).swap(*this); > return *this; > } > > promise& operator=(const promise&) = delete; > > void > swap(promise& __rhs) noexcept > { > _M_future.swap(__rhs._M_future); > _M_storage.swap(__rhs._M_storage); > } > > > future<_Res> > get_future() > { return future<_Res>(_M_future); } > > > void > set_value(const _Res& __r) > { > auto __future = _M_future; > auto __setter = _State::__setter(this, __r); > __future->_M_set_result(std::move(__setter)); > } > > void > set_value(_Res&& __r) > { > auto __future = _M_future; > auto __setter = _State::__setter(this, std::move(__r)); > __future->_M_set_result(std::move(__setter)); > } > > void > set_exception(exception_ptr __p) > { > auto __future = _M_future; > auto __setter = _State::__setter(__p, this); > __future->_M_set_result(std::move(__setter)); > } > }; > > template<typename _Res> > inline void > swap(promise<_Res>& __x, promise<_Res>& __y) noexcept > { __x.swap(__y); } > > template<typename _Res, typename _Alloc> > struct uses_allocator<promise<_Res>, _Alloc> > : public true_type { }; > > > > template<typename _Res> > class promise<_Res&> > { > typedef __future_base::_State_base _State; > typedef __future_base::_Result<_Res&> _Res_type; > typedef __future_base::_Ptr<_Res_type> _Ptr_type; > template<typename, typename> friend class _State::_Setter; > > shared_ptr<_State> _M_future; > _Ptr_type _M_storage; > > public: > promise() > : _M_future(std::make_shared<_State>()), > _M_storage(new _Res_type()) > { } > > promise(promise&& __rhs) noexcept > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator& __a) > : _M_future(std::allocate_shared<_State>(__a)), > _M_storage(__future_base::_S_allocate_result<_Res&>(__a)) > { } > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator&, promise&& __rhs) > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > promise(const promise&) = delete; > > ~promise() > { > if (static_cast<bool>(_M_future) && !_M_future.unique()) > _M_future->_M_break_promise(std::move(_M_storage)); > } > > > promise& > operator=(promise&& __rhs) noexcept > { > promise(std::move(__rhs)).swap(*this); > return *this; > } > > promise& operator=(const promise&) = delete; > > void > swap(promise& __rhs) noexcept > { > _M_future.swap(__rhs._M_future); > _M_storage.swap(__rhs._M_storage); > } > > > future<_Res&> > get_future() > { return future<_Res&>(_M_future); } > > > void > set_value(_Res& __r) > { > auto __future = _M_future; > auto __setter = _State::__setter(this, __r); > __future->_M_set_result(std::move(__setter)); > } > > void > set_exception(exception_ptr __p) > { > auto __future = _M_future; > auto __setter = _State::__setter(__p, this); > __future->_M_set_result(std::move(__setter)); > } > }; > > > template<> > class promise<void> > { > typedef __future_base::_State_base _State; > typedef __future_base::_Result<void> _Res_type; > typedef __future_base::_Ptr<_Res_type> _Ptr_type; > template<typename, typename> friend class _State::_Setter; > > shared_ptr<_State> _M_future; > _Ptr_type _M_storage; > > public: > promise() > : _M_future(std::make_shared<_State>()), > _M_storage(new _Res_type()) > { } > > promise(promise&& __rhs) noexcept > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator& __a) > : _M_future(std::allocate_shared<_State>(__a)), > _M_storage(__future_base::_S_allocate_result<void>(__a)) > { } > > > > template<typename _Allocator> > promise(allocator_arg_t, const _Allocator&, promise&& __rhs) > : _M_future(std::move(__rhs._M_future)), > _M_storage(std::move(__rhs._M_storage)) > { } > > promise(const promise&) = delete; > > ~promise() > { > if (static_cast<bool>(_M_future) && !_M_future.unique()) > _M_future->_M_break_promise(std::move(_M_storage)); > } > > > promise& > operator=(promise&& __rhs) noexcept > { > promise(std::move(__rhs)).swap(*this); > return *this; > } > > promise& operator=(const promise&) = delete; > > void > swap(promise& __rhs) noexcept > { > _M_future.swap(__rhs._M_future); > _M_storage.swap(__rhs._M_storage); > } > > > future<void> > get_future() > { return future<void>(_M_future); } > > > void set_value(); > > void > set_exception(exception_ptr __p) > { > auto __future = _M_future; > auto __setter = _State::__setter(__p, this); > __future->_M_set_result(std::move(__setter)); > } > }; > > > template<> > struct __future_base::_State_base::_Setter<void, void> > { > promise<void>::_Ptr_type operator()() > { > _State_base::_S_check(_M_promise->_M_future); > return std::move(_M_promise->_M_storage); > } > > promise<void>* _M_promise; > }; > > inline __future_base::_State_base::_Setter<void, void> > __future_base::_State_base::__setter(promise<void>* __prom) > { > return _Setter<void, void>{ __prom }; > } > > inline void > promise<void>::set_value() > { > auto __future = _M_future; > auto __setter = _State::__setter(this); > __future->_M_set_result(std::move(__setter)); > } > > > template<typename _Ptr_type, typename _Res> > struct __future_base::_Task_setter > { > _Ptr_type operator()() > { > try > { > _M_result->_M_set(_M_fn()); > } > catch(...) > { > _M_result->_M_error = current_exception(); > } > return std::move(_M_result); > } > _Ptr_type& _M_result; > std::function<_Res()> _M_fn; > }; > > template<typename _Ptr_type> > struct __future_base::_Task_setter<_Ptr_type, void> > { > _Ptr_type operator()() > { > try > { > _M_fn(); > } > catch(...) > { > _M_result->_M_error = current_exception(); > } > return std::move(_M_result); > } > _Ptr_type& _M_result; > std::function<void()> _M_fn; > }; > > template<typename _Res, typename... _Args> > struct __future_base::_Task_state_base<_Res(_Args...)> > : __future_base::_State_base > { > typedef _Res _Res_type; > > template<typename _Alloc> > _Task_state_base(const _Alloc& __a) > : _M_result(_S_allocate_result<_Res>(__a)) > { } > > virtual void > _M_run(_Args... __args) = 0; > > virtual shared_ptr<_Task_state_base> > _M_reset() = 0; > > typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; > _Ptr_type _M_result; > }; > > template<typename _Fn, typename _Alloc, typename _Res, typename... _Args> > struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final > : __future_base::_Task_state_base<_Res(_Args...)> > { > template<typename _Fn2> > _Task_state(_Fn2&& __fn, const _Alloc& __a) > : _Task_state_base<_Res(_Args...)>(__a), > _M_impl(std::forward<_Fn2>(__fn), __a) > { } > > private: > virtual void > _M_run(_Args... __args) > { > > auto __boundfn = std::__bind_simple(std::ref(_M_impl._M_fn), > _S_maybe_wrap_ref(std::forward<_Args>(__args))...); > auto __setter = _S_task_setter(this->_M_result, std::move(__boundfn)); > this->_M_set_result(std::move(__setter)); > } > > virtual shared_ptr<_Task_state_base<_Res(_Args...)>> > _M_reset(); > > template<typename _Tp> > static reference_wrapper<_Tp> > _S_maybe_wrap_ref(_Tp& __t) > { return std::ref(__t); } > > template<typename _Tp> > static > typename enable_if<!is_lvalue_reference<_Tp>::value, _Tp>::type&& > _S_maybe_wrap_ref(_Tp&& __t) > { return std::forward<_Tp>(__t); } > > struct _Impl : _Alloc > { > template<typename _Fn2> > _Impl(_Fn2&& __fn, const _Alloc& __a) > : _Alloc(__a), _M_fn(std::forward<_Fn2>(__fn)) { } > _Fn _M_fn; > } _M_impl; > }; > > template<typename _Signature, typename _Fn, typename _Alloc> > static shared_ptr<__future_base::_Task_state_base<_Signature>> > __create_task_state(_Fn&& __fn, const _Alloc& __a) > { > typedef typename decay<_Fn>::type _Fn2; > typedef __future_base::_Task_state<_Fn2, _Alloc, _Signature> _State; > return std::allocate_shared<_State>(__a, std::forward<_Fn>(__fn), __a); > } > > template<typename _Fn, typename _Alloc, typename _Res, typename... _Args> > shared_ptr<__future_base::_Task_state_base<_Res(_Args...)>> > __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)>::_M_reset() > { > return __create_task_state<_Res(_Args...)>(std::move(_M_impl._M_fn), > static_cast<_Alloc&>(_M_impl)); > } > > template<typename _Task, typename _Fn, bool > = is_same<_Task, typename decay<_Fn>::type>::value> > struct __constrain_pkgdtask > { typedef void __type; }; > > template<typename _Task, typename _Fn> > struct __constrain_pkgdtask<_Task, _Fn, true> > { }; > > > template<typename _Res, typename... _ArgTypes> > class packaged_task<_Res(_ArgTypes...)> > { > typedef __future_base::_Task_state_base<_Res(_ArgTypes...)> _State_type; > shared_ptr<_State_type> _M_state; > > public: > > packaged_task() noexcept { } > > > > template<typename _Allocator> > packaged_task(allocator_arg_t, const _Allocator& __a) noexcept > { } > > template<typename _Fn, typename = typename > __constrain_pkgdtask<packaged_task, _Fn>::__type> > explicit > packaged_task(_Fn&& __fn) > : packaged_task(allocator_arg, std::allocator<int>(), > std::forward<_Fn>(__fn)) > { } > > > > template<typename _Fn, typename _Alloc, typename = typename > __constrain_pkgdtask<packaged_task, _Fn>::__type> > explicit > packaged_task(allocator_arg_t, const _Alloc& __a, _Fn&& __fn) > : _M_state(__create_task_state<_Res(_ArgTypes...)>( > std::forward<_Fn>(__fn), __a)) > { } > > ~packaged_task() > { > if (static_cast<bool>(_M_state) && !_M_state.unique()) > _M_state->_M_break_promise(std::move(_M_state->_M_result)); > } > > > packaged_task(const packaged_task&) = delete; > packaged_task& operator=(const packaged_task&) = delete; > > template<typename _Allocator> > packaged_task(allocator_arg_t, const _Allocator&, > const packaged_task&) = delete; > > > packaged_task(packaged_task&& __other) noexcept > { this->swap(__other); } > > template<typename _Allocator> > packaged_task(allocator_arg_t, const _Allocator&, > packaged_task&& __other) noexcept > { this->swap(__other); } > > packaged_task& operator=(packaged_task&& __other) noexcept > { > packaged_task(std::move(__other)).swap(*this); > return *this; > } > > void > swap(packaged_task& __other) noexcept > { _M_state.swap(__other._M_state); } > > bool > valid() const noexcept > { return static_cast<bool>(_M_state); } > > > future<_Res> > get_future() > { return future<_Res>(_M_state); } > > > void > operator()(_ArgTypes... __args) > { > __future_base::_State_base::_S_check(_M_state); > auto __state = _M_state; > __state->_M_run(std::forward<_ArgTypes>(__args)...); > } > > void > reset() > { > __future_base::_State_base::_S_check(_M_state); > packaged_task __tmp; > __tmp._M_state = _M_state; > _M_state = _M_state->_M_reset(); > } > }; > > > template<typename _Res, typename... _ArgTypes> > inline void > swap(packaged_task<_Res(_ArgTypes...)>& __x, > packaged_task<_Res(_ArgTypes...)>& __y) noexcept > { __x.swap(__y); } > > template<typename _Res, typename _Alloc> > struct uses_allocator<packaged_task<_Res>, _Alloc> > : public true_type { }; > > > template<typename _BoundFn, typename _Res> > class __future_base::_Deferred_state final > : public __future_base::_State_base > { > public: > explicit > _Deferred_state(_BoundFn&& __fn) > : _M_result(new _Result<_Res>()), _M_fn(std::move(__fn)) > { } > > private: > typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; > _Ptr_type _M_result; > _BoundFn _M_fn; > > virtual void > _M_run_deferred() > { > > _M_set_result(_S_task_setter(_M_result, _M_fn), true); > } > }; > > class __future_base::_Async_state_common : public __future_base::_State_base > { > protected: > > > > ~_Async_state_common() = default; > > > > > virtual void _M_run_deferred() { _M_join(); } > > void _M_join() { std::call_once(_M_once, &thread::join, ref(_M_thread)); } > > thread _M_thread; > once_flag _M_once; > }; > > template<typename _BoundFn, typename _Res> > class __future_base::_Async_state_impl final > : public __future_base::_Async_state_common > { > public: > explicit > _Async_state_impl(_BoundFn&& __fn) > : _M_result(new _Result<_Res>()), _M_fn(std::move(__fn)) > { > _M_thread = std::thread{ [this] { > _M_set_result(_S_task_setter(_M_result, _M_fn)); > } }; > } > > ~_Async_state_impl() { _M_join(); } > > private: > typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; > _Ptr_type _M_result; > _BoundFn _M_fn; > }; > > template<typename _BoundFn> > inline std::shared_ptr<__future_base::_State_base> > __future_base::_S_make_deferred_state(_BoundFn&& __fn) > { > typedef typename remove_reference<_BoundFn>::type __fn_type; > typedef _Deferred_state<__fn_type> __state_type; > return std::make_shared<__state_type>(std::move(__fn)); > } > > template<typename _BoundFn> > inline std::shared_ptr<__future_base::_State_base> > __future_base::_S_make_async_state(_BoundFn&& __fn) > { > typedef typename remove_reference<_BoundFn>::type __fn_type; > typedef _Async_state_impl<__fn_type> __state_type; > return std::make_shared<__state_type>(std::move(__fn)); > } > > > > template<typename _Fn, typename... _Args> > future<typename result_of<_Fn(_Args...)>::type> > async(launch __policy, _Fn&& __fn, _Args&&... __args) > { > typedef typename result_of<_Fn(_Args...)>::type result_type; > std::shared_ptr<__future_base::_State_base> __state; > if ((__policy & (launch::async|launch::deferred)) == launch::async) > { > __state = __future_base::_S_make_async_state(std::__bind_simple( > std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); > } > else > { > __state = __future_base::_S_make_deferred_state(std::__bind_simple( > std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); > } > return future<result_type>(__state); > } > > > template<typename _Fn, typename... _Args> > inline future<typename result_of<_Fn(_Args...)>::type> > async(_Fn&& __fn, _Args&&... __args) > { > return async(launch::async|launch::deferred, std::forward<_Fn>(__fn), > std::forward<_Args>(__args)...); > } > > > > > > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/future.h" 2 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/executor.h" 1 > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/unique_function.h" 1 > ># 18 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/unique_function.h" >namespace hsh >{ > template <typename> > class unique_function; > > template <typename R, typename ... Args> > class unique_function<R(Args...)> > { > private: > > static constexpr size_t inline_storage_size = 6u * sizeof(void*); > > > template <typename F> > using is_inline_constructible = conjunction<bool_constant<(sizeof(F) <= inline_storage_size)>, std::is_nothrow_move_constructible<F>>; > > public: > unique_function() = default; > unique_function(std::nullptr_t) noexcept {} > > > template < > typename F, > typename F_TYPE = decay_t<F>, > enable_if_t< > conjunction<negation<std::is_same<F_TYPE, unique_function>>, > is_invocable_r<R, F&&, Args...>, > is_inline_constructible<F_TYPE>>::value>* = nullptr > > unique_function(F&& f) noexcept(noexcept(F_TYPE(std::forward<F>(f)))) : handler(internal_handler<F_TYPE>::get_handler()) > { > ::new (static_cast<void*>(&storage.internal)) F_TYPE(std::forward<F>(f)); > } > > > template< > typename F, > typename F_TYPE = decay_t<F>, > enable_if_t< > conjunction<negation<std::is_same<F_TYPE, unique_function>>, > is_invocable_r<R, F&&, Args...>, > negation<is_inline_constructible<F_TYPE>>>::value>* = nullptr> > unique_function(F&& f) : handler(dynamic_handler<F_TYPE>::get_handler()) > { > storage.dynamic = new F_TYPE(std::forward<F>(f)); > } > > > unique_function(const unique_function&) = delete; > > unique_function(unique_function&& other) noexcept : handler(other.handler) > { > if (handler) > { > handler->move_func_ptr(storage, other.storage); > other.handler = nullptr; > } > } > > ~unique_function() { reset(); } > > > unique_function& operator=(const unique_function&) = delete; > > unique_function& operator=(unique_function&& other) noexcept > { > reset(); > ::new (this) unique_function(std::move(other)); > return *this; > } > > unique_function& operator=(std::nullptr_t) noexcept > { > reset(); > return *this; > } > > template <typename F, > enable_if_t< > conjunction<negation<std::is_same<decay_t<F>, unique_function>>, > is_invocable_r<R, F&&, Args...>, > std::is_nothrow_constructible<unique_function, F&&>>::value>* = nullptr> > unique_function& operator=(F&& f) noexcept > { > reset(); > ::new (this) unique_function(std::forward<F>(f)); > return *this; > } > > template <typename F, > enable_if_t< > conjunction<negation<std::is_same<decay_t<F>, unique_function>>, > is_invocable_r<R, F&&, Args...>, > negation<std::is_nothrow_constructible<unique_function, F&&>>>::value>* = nullptr> > unique_function& operator=(F&& f) > { > unique_function(std::forward<F>(f)).swap(*this); > return *this; > } > > explicit operator bool() const noexcept { return handler; } > > R operator()(Args... args) const > { > if (!handler) { > throw std::bad_function_call(); > } > return handler->call_func_ptr(storage, std::forward<Args>(args)...); > } > > inline void reset() > { > > if (handler && handler->destroy_func_ptr) > { > handler->destroy_func_ptr(storage); > } > handler = nullptr; > } > > void swap(unique_function& that) noexcept { std::swap(*this, that); } > > private: > union storage_union > { > using stack_storage_t = typename std::aligned_storage<inline_storage_size, std::alignment_of<void*>::value>::type; > > void* dynamic; > stack_storage_t internal; > }; > > using call_func_ptr_t = R(*)(const storage_union& storage, Args... args); > using move_func_ptr_t = void(*)(storage_union& lhs, storage_union& rhs); > using destroy_func_ptr_t = void(*)(storage_union& storage); > > struct storage_handler > { > call_func_ptr_t call_func_ptr; > move_func_ptr_t move_func_ptr; > destroy_func_ptr_t destroy_func_ptr; > }; > storage_union storage; > const storage_handler* handler = nullptr; > > > template<typename F> > struct internal_handler > { > > static inline F* internal_cast(storage_union& storage) noexcept { return reinterpret_cast<F*>(static_cast<void*>(&storage.internal)); } > static inline const F* internal_cast(const storage_union& storage) noexcept { return reinterpret_cast<const F*>(static_cast<const void*>(&storage.internal)); } > > > template <bool IsVoid = std::is_same<R, void>::value> > static enable_if_t<!IsVoid, R> call_impl(const storage_union& storage, Args... args) > { > return hsh::invoke(*const_cast<F*>(internal_cast(storage)), std::forward<Args>(args)...); > } > > > template <bool IsVoid = std::is_same<R, void>::value> > static enable_if_t<IsVoid> call_impl(const storage_union& storage, Args... args) > { > hsh::invoke(*const_cast<F*>(internal_cast(storage)), std::forward<Args>(args)...); > } > > static void move_impl(storage_union& lhs, storage_union& rhs) > { > ::new (static_cast<void*>(&lhs.internal)) F(std::move(*internal_cast(rhs))); > } > > static void destroy_impl(storage_union& storage) > { > internal_cast(storage)->~F(); > } > > inline static const storage_handler* get_handler() noexcept > { > static constexpr storage_handler handler{ &call_impl, &move_impl, hsh::is_trivially_destructible<F>::value ? nullptr : &destroy_impl }; > return &handler; > } > }; > > > template<typename F> > struct dynamic_handler > { > > template <bool IsVoid = std::is_same<R, void>::value> > static enable_if_t<!IsVoid, R> call_impl(const storage_union& storage, Args... args) > { > return hsh::invoke(*reinterpret_cast<F*>(const_cast<void*>(storage.dynamic)), std::forward<Args>(args)...); > } > > > template <bool IsVoid = std::is_same<R, void>::value> > static enable_if_t<IsVoid> call_impl(const storage_union& storage, Args... args) > { > hsh::invoke(*reinterpret_cast<F*>(const_cast<void*>(storage.dynamic)), std::forward<Args>(args)...); > } > > static void move_impl(storage_union& lhs, storage_union& rhs) > { > lhs.dynamic = hsh::exchange(rhs.dynamic, nullptr); > } > > static void destroy_impl(storage_union& storage) > { > delete static_cast<F*>(storage.dynamic); > } > > inline static const storage_handler* get_handler() noexcept > { > static constexpr storage_handler handler{ &call_impl, &move_impl, &destroy_impl }; > return &handler; > } > }; > }; > > template <typename T> > void swap(unique_function<T> &lhs, unique_function<T> &rhs) noexcept { lhs.swap(rhs); } > > template <typename T> > bool operator==(const unique_function<T>& f, nullptr_t) { return !f; } > > template <typename T> > bool operator==( nullptr_t, const unique_function<T>& f) { return !f; } > > template <typename T> > bool operator!=(const unique_function<T>& f, nullptr_t) { return !(f == nullptr); } > > template <typename T> > bool operator!=( nullptr_t, const unique_function<T>& f) { return !(nullptr == f); } > > > >} ># 4 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/executor.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/blocking_queue.h" 1 > ># 11 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/blocking_queue.h" >namespace hsh >{ > > template<class T, class Mutex = std::mutex, class Container = std::deque<T>> > class blocking_queue > { > public: > using mutex_type = Mutex; > using container_type = Container; > using value_type = typename container_type::value_type; > using reference = typename container_type::reference; > using const_reference = typename container_type::const_reference; > using size_type = typename container_type::size_type; > > > blocking_queue() = default; > > template<class Allocator> > explicit blocking_queue(const Allocator& allocator, enable_if_t<std::uses_allocator<container_type, Allocator>::value>* = nullptr) > : queue(allocator) {} > > explicit blocking_queue(const container_type& cont) : queue(cont) {} > > explicit blocking_queue(container_type&& cont) : queue(std::move(cont)) {} > > blocking_queue(std::initializer_list<value_type> il) : queue(il.begin(), il.end()) {} > > template<class InputIt> > blocking_queue(InputIt first, InputIt last) : queue(first, last) {} > > template<class Allocator> > blocking_queue(const container_type& cont, const Allocator& allocator, enable_if_t<std::uses_allocator<container_type, Allocator>::value>* = nullptr) > : queue(cont, allocator) {} > > template<class Allocator> > blocking_queue(container_type&& cont, const Allocator& allocator, enable_if_t<std::uses_allocator<container_type, Allocator>::value>* = nullptr) > : queue(std::move(cont), allocator) {} > > template<class Allocator> > blocking_queue(std::initializer_list<value_type> il, const Allocator& allocator, enable_if_t<std::uses_allocator<container_type, Allocator>::value>* = nullptr) > : queue(il.begin(), il.end(), allocator) {} > > template<class InputIt, class Allocator> > blocking_queue(InputIt first, InputIt last, const Allocator& allocator, enable_if_t<std::uses_allocator<container_type, Allocator>::value>* = nullptr) > : queue(first, last, allocator) {} > > ~blocking_queue() { > shutdown(); > clear(); > } > > inline void push(const value_type& value) > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > queue.push_back(value); > } > not_empty_var.notify_one(); > } > > inline void push(value_type&& value) > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > queue.push_back(std::move(value)); > } > not_empty_var.notify_one(); > } > > template<class... Args> > inline void emplace(Args&&... args) > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > queue.emplace_back(std::forward<Args>(args)...); > } > not_empty_var.notify_one(); > } > > template<class InputIt> > inline void insert(InputIt first, InputIt last) > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > queue.insert(queue.end(), first, last); > } > not_empty_var.notify_all(); > } > > inline void insert(std::initializer_list<value_type> il) { insert(il.begin(), il.end()); } > > > inline hsh::optional<value_type> try_pop() > { > std::unique_lock<mutex_type> ulock{ lock }; > return (destroy_queue || queue.empty()) ? nullopt : pop_internal(ulock); > } > > inline bool try_pop(value_type& out) > { > std::unique_lock<mutex_type> ulock{ lock }; > return (destroy_queue || queue.empty()) ? false : pop_internal(ulock, out); > } > > template <class Rep, class Period> > inline hsh::optional<value_type> try_pop_for(const std::chrono::duration<Rep, Period>& timeout) > { > return try_pop_until( std::chrono::steady_clock::now() + timeout ); > } > > template <class Rep, class Period> > inline bool try_pop_for(value_type& out, const std::chrono::duration<Rep, Period>& timeout) > { > return try_pop_until( out, std::chrono::steady_clock::now() + timeout ); > } > > template <class Clock, class Duration> > inline hsh::optional<value_type> try_pop_until(const std::chrono::time_point<Clock, Duration>& timeout_time) > { > std::unique_lock<mutex_type> ulock{ lock }; > if( !not_empty_var.wait_until(ulock, timeout_time, [this](){ return !queue.empty() || destroy_queue;}) || destroy_queue ){ > return {}; > } > return pop_internal(ulock); > } > > template <class Clock, class Duration> > inline bool try_pop_until(value_type& out, const std::chrono::time_point<Clock, Duration>& timeout_time) > { > std::unique_lock<mutex_type> ulock{ lock }; > if( !not_empty_var.wait_until(ulock, timeout_time, [this](){ return !queue.empty() || destroy_queue;}) || destroy_queue ){ > return false; > } > return pop_internal(ulock, out); > } > > inline hsh::optional<value_type> wait_pop() > { > std::unique_lock<mutex_type> ulock{ lock }; > not_empty_var.wait(ulock, [this]() { return !queue.empty() || destroy_queue; }); > return destroy_queue ? nullopt : pop_internal(ulock); > } > > inline bool wait_pop(value_type& out) > { > std::unique_lock<mutex_type> ulock{ lock }; > not_empty_var.wait(ulock, [this]() { return !queue.empty() || destroy_queue; }); > return destroy_queue ? false : pop_internal(ulock, out); > } > > template<class OutputIt> > void consume_all(OutputIt out) > { > { > std::lock_guard<mutex_type> ulock{ lock }; > std::copy(std::make_move_iterator(queue.begin()), std::make_move_iterator(queue.end()), out); > queue.clear(); > } > empty_var.notify_all(); > } > > void consume_all(container_type& out) > { > { > std::lock_guard<mutex_type> ulock{ lock }; > out = std::move(queue); > queue.clear(); > } > empty_var.notify_all(); > } > > > > > > template <class Rep, class Period> > inline bool try_empty_for(const std::chrono::duration<Rep, Period>& timeout) > { > return try_empty_until(std::chrono::steady_clock::now() + timeout); > } > > template <class Clock, class Duration> > inline bool try_empty_until(const std::chrono::time_point<Clock, Duration>& timeout_time) > { > std::unique_lock<mutex_type> ulock{ lock }; > return empty_var.wait_until(ulock, timeout_time, [this](){ return queue.empty() || destroy_queue; } ); > } > > inline void wait_empty() > { > std::unique_lock<mutex_type> ulock{ lock }; > empty_var.wait(ulock, [this] { return queue.empty() || destroy_queue; }); > } > > inline void clear() > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > queue.clear(); > } > empty_var.notify_all(); > } > > inline void shutdown() > { > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > destroy_queue = true; > } > not_empty_var.notify_all(); > empty_var.notify_all(); > } > > inline bool is_shutdown() const > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > return destroy_queue; > } > > inline bool empty() const > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > return queue.empty(); > } > > inline size_type size() const > { > std::lock_guard<mutex_type> scoped_lock{ lock }; > return queue.size(); > } > > private: > > > > inline hsh::optional<value_type> pop_internal(std::unique_lock<mutex_type>& ulock) > { > hsh::optional<value_type> ret_val{ std::move(queue.front()) }; > queue.pop_front(); > bool is_empty = queue.empty(); > ulock.unlock(); > if( is_empty ){ empty_var.notify_all(); } > return ret_val; > } > > inline bool pop_internal(std::unique_lock<mutex_type>& ulock, value_type& out) > { > out = std::move(queue.front()); > queue.pop_front(); > bool is_empty = queue.empty(); > ulock.unlock(); > if( is_empty ){ empty_var.notify_all(); } > return true; > } > > std::condition_variable_any not_empty_var; > std::condition_variable_any empty_var; > mutable mutex_type lock; > container_type queue; > bool destroy_queue = false; > }; > > > > >} ># 5 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/executor.h" 2 > > > >namespace hsh >{ ># 22 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/executor.h" > class executor_interface > { > public: > virtual ~executor_interface() = default; > virtual void execute(hsh::unique_function<void()>&& f) = 0; > }; > > > template<typename Ex> > class generic_executor_wrapper : public executor_interface > { > public: > explicit generic_executor_wrapper(Ex ex) noexcept : ex(ex) {} > > virtual void execute(hsh::unique_function<void()>&& f) override { ex.execute( hsh::move( f ) ); } > > private: > Ex ex; > }; > > > class inline_executor > { > public: > template <typename F> > void execute(F&& f) noexcept(hsh::is_nothrow_invocable<F&&>::value) { hsh::invoke( std::forward<F>(f) ); } > > friend bool operator==(const inline_executor& lhs, const inline_executor& rhs) { return true; } > friend bool operator!=(const inline_executor& lhs, const inline_executor& rhs) { return false; } > }; > > > class detached_thread_executor > { > public: > template <typename F> > void execute(F&& f) > { > std::thread new_thread( std::forward<F>(f) ); > new_thread.detach(); > } > > friend bool operator==(const detached_thread_executor& lhs, const detached_thread_executor& rhs) { return true; } > friend bool operator!=(const detached_thread_executor& lhs, const detached_thread_executor& rhs) { return false; } > }; > > > > > > > > class basic_thread_pool > { > using task_t = hsh::unique_function<void()>; > public: > class dispatch_executor > { > public: > template<typename F> > void execute(F&& f) { pool->dispatch( hsh::forward<F>(f) ); } > > basic_thread_pool& context() noexcept { return *pool; } > > private: > friend class basic_thread_pool; > friend bool operator==(const dispatch_executor&,const dispatch_executor&) noexcept; > explicit dispatch_executor(basic_thread_pool *pool) noexcept : pool(pool) {} > basic_thread_pool *pool; > }; > > class post_executor > { > public: > > template<typename F> > void execute(F&& f) { pool->post( hsh::forward<F>(f) ); } > > basic_thread_pool& context() noexcept { return *pool; } > > private: > friend class basic_thread_pool; > friend bool operator==(const post_executor&, const post_executor&) noexcept; > explicit post_executor(basic_thread_pool *pool) noexcept : pool(pool) {} > basic_thread_pool *pool; > }; > > basic_thread_pool() : basic_thread_pool( std::thread::hardware_concurrency() ) {} > > explicit basic_thread_pool(unsigned int num_threads) > { > auto num_threads_to_create = std::max(1u, num_threads); > threads.reserve(num_threads_to_create); > for(unsigned int thread_index = 0; thread_index < num_threads_to_create; ++thread_index) > { > threads.emplace_back(&basic_thread_pool::worker_task, this); > } > } > > > basic_thread_pool(const basic_thread_pool&) = delete; > basic_thread_pool(basic_thread_pool&&) = delete; > > ~basic_thread_pool() > { > tasks.shutdown(); > for(auto &t : threads) { > t.join(); > } > } > > > basic_thread_pool& operator=(const basic_thread_pool&) = delete; > basic_thread_pool& operator=(basic_thread_pool&&) = delete; > > > post_executor get_post_executor() noexcept { return post_executor(this); } > dispatch_executor get_dispatch_executor() noexcept { return dispatch_executor(this); } > > size_t queue_depth() const noexcept { return tasks.size(); } > size_t thread_count() const noexcept { return threads.size(); } > > inline bool is_current_thread_in_pool() const noexcept { return thread_pool_id() == this; } > > > > template <typename F> > void post(F&& f) { tasks.emplace( hsh::forward<F>(f) ); } > > > > > template <typename F> > void dispatch(F&& f) > { > if( is_current_thread_in_pool() ) { > hsh::invoke( hsh::forward<F>(f) ); > } else { > tasks.emplace( hsh::forward<F>(f) ); > } > } > > private: > void worker_task() > { > > thread_pool_id() = this; > while( true ) > { > task_t task; > if(tasks.wait_pop(task)) { > task(); > } else { > return; > } > } > } > > inline basic_thread_pool*& thread_pool_id() const > { > static thread_local basic_thread_pool* tp_id = nullptr; > return tp_id; > } > > std::vector<std::thread> threads; > hsh::blocking_queue<task_t> tasks; > }; > > inline bool operator==(const basic_thread_pool::dispatch_executor& lhs, const basic_thread_pool::dispatch_executor& rhs) noexcept { return lhs.pool == rhs.pool; } > > inline bool operator!=(const basic_thread_pool::dispatch_executor& lhs, const basic_thread_pool::dispatch_executor& rhs) noexcept { return !(lhs == rhs); } > > inline bool operator==(const basic_thread_pool::post_executor& lhs, const basic_thread_pool::post_executor& rhs) noexcept { return lhs.pool == rhs.pool; } > > inline bool operator!=(const basic_thread_pool::post_executor& lhs, const basic_thread_pool::post_executor& rhs) noexcept { return !(lhs == rhs); } > > namespace detail > { > template <typename Ex, typename F> > class executor_binder > { > public: > executor_binder(Ex ex, F&& f) : ex(ex), f(hsh::forward<F>(f)) {} > > void operator()() { ex.execute( hsh::move(f) ); } > > private: > > Ex ex; > F f; > }; > } > > > template<typename Ex, typename F> > auto bind_executor(Ex ex, F&& f) -> detail::executor_binder<Ex, decay_t<F>> > { > return detail::executor_binder<Ex, decay_t<F>>{ ex, hsh::forward<F>(f) }; > } > > > class stop_token > { > public: > stop_token() : _state(std::make_shared<state>()) {} > > template<class Alloc> > stop_token(std::allocator_arg_t, const Alloc& alloc) : _state(std::allocate_shared<state>(alloc)) {} > > stop_token(const stop_token&) = default; > stop_token(stop_token&&) = default; > ~stop_token() = default; > > stop_token& operator=(const stop_token&) = default; > stop_token& operator=(stop_token&&) = default; > > void request_stop() noexcept { _state->request_stop(); } > > bool stop_requested() const noexcept { return _state->stop_requested(); } > > private: > struct state > { > void request_stop() noexcept { stop_flag.exchange(true, std::memory_order_release); } > bool stop_requested() const noexcept { return stop_flag.load(std::memory_order_acquire); } > > std::atomic_bool stop_flag{ false }; > }; > std::shared_ptr<state> _state; > }; > > >} ># 10 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/future.h" 2 > > >namespace hsh >{ > template <class T> > class shared_future; > > template <typename T> > class promise; > > template <class> > class packaged_task; > > template <class T> > class future; > > > struct no_unwrap_t { explicit no_unwrap_t() = default; }; > constexpr no_unwrap_t no_unwrap{}; > > > namespace future_details > { > struct future_tag_t { explicit future_tag_t() = default; }; > > struct shared_future_tag_t { explicit shared_future_tag_t() = default; }; > > > template<typename T> > struct is_future_impl : std::false_type > { > using type = T; > }; > > template<typename T> > struct is_future_impl<hsh::future<T>> : std::true_type > { > using type = T; > > using tag = future_tag_t; > }; > > template<typename T> > struct is_future_impl<hsh::shared_future<T>> : std::true_type > { > using type = T; > > using tag = shared_future_tag_t; > }; > } > > > template <typename T> > using is_future = future_details::is_future_impl<decay_t<T>>; > > template <typename T> > using future_value_type_t = typename future_details::is_future_impl<decay_t<T>>::type; > > > namespace future_details > { > enum class future_state > { > uninitialized = 0, > value = 1, > exception = 2, > }; > > inline void throw_promise_already_satisfied() { throw std::future_error(std::future_errc::promise_already_satisfied); } > inline void throw_no_state() { throw std::future_error(std::future_errc::no_state); } > inline void throw_future_already_retrieved() { throw std::future_error(std::future_errc::future_already_retrieved); } > > template <class T> > class shared_state_base > { > public: > shared_state_base() : dummy{} {} > > shared_state_base(const shared_state_base&) = delete; > shared_state_base(shared_state_base&&) = delete; > > template <class... Args> > inline void construct_value(Args&&... args) > { > new (std::addressof(this->value)) T(std::forward<Args>(args)...); > } > > inline void construct_error(std::exception_ptr&& e) > { > new (std::addressof(this->exception)) std::exception_ptr(std::move(e)); > } > > ~shared_state_base() > { > switch (state) > { > case future_state::value: > value.~T(); > break; > case future_state::exception: > exception.~exception_ptr(); > break; > default: > break; > } > } > > shared_state_base& operator=(const shared_state_base&) = delete; > shared_state_base& operator=(shared_state_base&&) = delete; > > future_state unwrap_helper(future_tag_t, shared_state_base& other) > { > if (future_state::value == other.state) { > construct_value( std::move(other.value) ); > return future_state::value; > } else { > construct_error( std::move(other.exception) ); > return future_state::exception; > } > } > > future_state unwrap_helper(shared_future_tag_t, shared_state_base& other) > { > if (future_state::value == other.state) { > construct_value( other.value ); > return future_state::value; > } else { > auto copy = other.exception; > construct_error( std::move(copy) ); > return future_state::exception; > } > } > > union > { > char dummy; > T value; > std::exception_ptr exception; > }; > mutable std::mutex lock; > mutable std::condition_variable cv; > future_state state = future_state::uninitialized; > }; > > template <> > class shared_state_base<void> > { > public: > shared_state_base() : dummy{} {} > > shared_state_base(const shared_state_base&) = delete; > shared_state_base(shared_state_base&&) = delete; > > ~shared_state_base() > { > if (future_state::exception == state) { > exception.~exception_ptr(); > } > } > > shared_state_base& operator=(const shared_state_base&) = delete; > shared_state_base& operator=(shared_state_base&&) = delete; > > inline void construct_error(std::exception_ptr&& e) > { > new (std::addressof(this->exception)) std::exception_ptr(std::move(e)); > } > > > future_state unwrap_helper(future_tag_t, shared_state_base& other) > { > if (future_state::value == other.state) { > return future_state::value; > } else { > construct_error(std::move(other.exception)); > return future_state::exception; > } > } > > future_state unwrap_helper(shared_future_tag_t, shared_state_base& other) > { > if (future_state::value == other.state) { > return future_state::value; > } else { > auto copy = other.exception; > construct_error(std::move(copy)); > return future_state::exception; > } > } > > union > { > char dummy; > std::exception_ptr exception; > }; > mutable std::mutex lock; > mutable std::condition_variable cv; > future_state state = future_state::uninitialized; > }; > > template <typename T> > class shared_state : public shared_state_base<T> > { > static_assert(!std::is_reference<T>::value, "hsh::future/promise doesn't support references. If needed use std::reference_wrapper"); > public: > > > bool is_ready() const > { > std::lock_guard<std::mutex> scoped_lock{ this->lock }; > return future_state::uninitialized != this->state; > } > > bool has_value() const > { > std::lock_guard<std::mutex> scoped_lock{ this->lock }; > return future_state::value == this->state; > } > > bool has_exception() const > { > std::lock_guard<std::mutex> scoped_lock{ this->lock }; > return future_state::exception == this->state; > } > > > > > template<typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > T1 get() const & > { > wait(); > if (future_state::exception == this->state) { > std::rethrow_exception(this->exception); > } > } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > const T1& get() const & > { > wait(); > if (future_state::exception == this->state) { > std::rethrow_exception(this->exception); > } > return this->value; > } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1 get() && > { > wait(); > if (future_state::exception == this->state) { > std::rethrow_exception(this->exception); > } > return std::move(this->value); > } > > std::exception_ptr get_exception_ptr() > { > wait(); > return future_state::exception == this->state ? this->exception : std::exception_ptr{}; > } > > > void wait() const > { > std::unique_lock<std::mutex> ulock{ this->lock }; > this->cv.wait(ulock, [this]() { return future_state::uninitialized != this->state; }); > } > > template <class Rep, class Period> > std::future_status wait_for(const std::chrono::duration<Rep, Period>& timeout) const > { > std::unique_lock<std::mutex> ulock{ this->lock }; > if (this->cv.wait_for(ulock, timeout, [this]() { return future_state::uninitialized != this->state; })) { > return std::future_status::ready; > } > return std::future_status::timeout; > } > > template <class Clock, class Duration> > std::future_status wait_until(const std::chrono::time_point<Clock, Duration>& timeout) const > { > std::unique_lock<std::mutex> ulock{ this->lock }; > if (this->cv.wait_until(ulock, timeout, [this]() { return future_state::uninitialized != this->state; })) { > return std::future_status::ready; > } > return std::future_status::timeout; > } > > > > template<typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > void set_value() > { > if (future_state::uninitialized != this->state) { > throw_promise_already_satisfied(); > } > set_ready(future_state::value); > } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > void set_value(T1&& val) > { > if ( future_state::uninitialized != this->state ) { > throw_promise_already_satisfied(); > } > > this->construct_value(std::forward<T1>(val)); > set_ready(future_state::value); > } > > > template<class F, class... Args, typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > void set_with(F&& f, Args&&... args) > { > if (future_state::uninitialized != this->state) { > throw_promise_already_satisfied(); > } > > try { > hsh::invoke(std::forward<F>(f), std::forward<Args>(args)...); > set_ready(future_state::value); > } > catch (...) { > this->construct_error(std::current_exception()); > set_ready(future_state::exception); > } > } > > > template<class F, class... Args, typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > void set_with(F&& f, Args&&... args) > { > if (future_state::uninitialized != this->state) { > throw_promise_already_satisfied(); > } > > try { > this->construct_value(hsh::invoke(std::forward<F>(f), std::forward<Args>(args)...)); > set_ready(future_state::value); > } catch (...) { > this->construct_error(std::current_exception()); > set_ready(future_state::exception); > } > } > > template <typename... Args> > void emplace(Args&&... args) > { > if ( future_state::uninitialized != this->state ) { > throw_promise_already_satisfied(); > } > this->construct_value(std::forward<Args>(args)...); > set_ready(future_state::value); > } > > template <typename E> > void set_exception(const E& e) > { > if (future_state::uninitialized != this->state) { > throw_promise_already_satisfied(); > } > this->construct_error(std::make_exception_ptr(e)); > set_ready(future_state::exception); > } > > void set_exception(std::exception_ptr e) > { > if (future_state::uninitialized != this->state) { > throw_promise_already_satisfied(); > } > this->construct_error(std::move(e)); > set_ready(future_state::exception); > } > > > template <typename F> > void add_continuation(F&& f) > { > { > std::lock_guard<std::mutex> scoped_lock{ this->lock }; > if ( future_state::uninitialized == this->state ) { > continuations.emplace_back( std::forward<F>(f) ); > return; > } > } > > > hsh::invoke( std::forward<F>(f) ); > } > > void abandon_state() > { > if (future_state::uninitialized == this->state){ > set_exception(std::future_error(std::future_errc::broken_promise)); > } > } > > > bool continuation_has_value() const noexcept { return future_state::value == this->state; } > bool continuation_has_exception() const noexcept { return future_state::exception == this->state; } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > const T1& continuation_get() const & { return this->value; } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > T1 continuation_get() && { return std::move(this->value); } > > std::exception_ptr continuation_get_exception_ptr() const noexcept { return this->exception; } > > void unwrap_callback(future_tag_t tag, shared_state& other) { this->set_ready(this->unwrap_helper(tag, other)); } > > void unwrap_callback(shared_future_tag_t tag, shared_state& other) { this->set_ready(this->unwrap_helper(tag, other)); } > > private: > inline void set_ready(future_state new_state) > { > { > std::unique_lock<std::mutex> ulock{ this->lock }; > this->state = new_state; > if (!continuations.empty()) { > fire_continuations(ulock); > } > } > this->cv.notify_all(); > } > > > void fire_continuations(std::unique_lock<std::mutex>& ulock) > { > > std::vector<hsh::unique_function<void()>> tmp_continuations; > tmp_continuations.swap(continuations); > ulock.unlock(); > > for (auto &continuation : tmp_continuations) { > continuation(); > } > } > > std::vector<hsh::unique_function<void()>> continuations; > }; > > template<typename T, typename R, bool IsShared> > struct on_value > { > explicit on_value(std::shared_ptr<shared_state<T>> state) noexcept : state(std::move(state)) {} > > future<R> get_future() { return promise.get_future(); } > > > template<typename F, typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_with(std::forward<F>(f)); > } else { > promise.set_exception(state->continuation_get_exception_ptr()); > } > } > > > template<typename F, typename T1 = T, enable_if_t<!std::is_void<T1>::value && !IsShared>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_with(std::forward<F>(f), std::move(*state).continuation_get()); > } else { > promise.set_exception(state->continuation_get_exception_ptr()); > } > } > > > template<typename F, typename T1 = T, enable_if_t<!std::is_void<T1>::value && IsShared>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_with(std::forward<F>(f), state->continuation_get()); > } else { > promise.set_exception(state->continuation_get_exception_ptr()); > } > } > > private: > hsh::promise<R> promise; > std::shared_ptr<shared_state<T>> state; > }; > > template<typename T, bool IsShared> > struct on_error > { > public: > explicit on_error(std::shared_ptr<shared_state<T>> state) noexcept : state(std::move(state)) {} > > future<T> get_future() { return promise.get_future(); } > > > template<typename F, typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_value(); > } else { > promise.set_with(std::forward<F>(f), state->continuation_get_exception_ptr()); > } > } > > > template<typename F, typename T1 = T, enable_if_t<!std::is_void<T1>::value && !IsShared>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_value( std::move(*state).continuation_get() ); > } else { > promise.set_with(std::forward<F>(f), state->continuation_get_exception_ptr()); > } > } > > > template<typename F, typename T1 = T, enable_if_t<!std::is_void<T1>::value && IsShared>* = nullptr> > void operator()(F&& f) > { > if (state->continuation_has_value()) { > promise.set_value( state->continuation_get() ); > } else { > promise.set_with(std::forward<F>(f), state->continuation_get_exception_ptr()); > } > } > > private: > hsh::promise<T> promise; > std::shared_ptr<shared_state<T>> state; > }; > > template<typename T> > struct fallback_to > { > explicit fallback_to(T&& val) : val(std::forward<T>(val)) {} > > T&& operator()(std::exception_ptr e) { return std::move(val); } > > T val; > }; > > struct future_waiter > { > template<typename F> > void operator()(F&& future) { future.wait(); } > }; > > } > > template <class T> > class future > { > using shared_state_ptr = std::shared_ptr<future_details::shared_state<T>>; > public: > future() = default; > > future(future const& rhs) = delete; > future(future && other) = default; > > > explicit future(future<future<T>>&& rhs) : future(rhs.unwrap()) {} > explicit future(future<shared_future<T>>&& rhs) : future(rhs.unwrap()) {} > > ~future() = default; > > future& operator=(future const& rhs) = delete; > future& operator=(future && other) = default; > > > shared_future<T> share() noexcept { return std::move(state); } > > > template<typename T1 = T, > typename R = enable_if_t<is_future<T1>::value, future_value_type_t<T1>>> > auto unwrap() -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > auto temp_state = std::move(state); > > auto new_state = std::make_shared<future_details::shared_state<R>>(); > > temp_state->add_continuation([temp_state, new_state]() > { > > if (temp_state->continuation_has_exception()) { > new_state->set_exception(temp_state->continuation_get_exception_ptr()); > return; > } > > > auto inner_state = temp_state->continuation_get().state; > inner_state->add_continuation([inner_state, new_state]() > { > new_state->unwrap_callback(is_future<T1>::tag(), *inner_state); > }); > }); > return future<R>{ new_state }; > } > > > bool valid() const noexcept { return nullptr != state; } > explicit operator bool() const noexcept { return valid(); } > > bool is_ready() const { return valid() && state->is_ready(); } > bool has_exception() const { return valid() && state->has_exception(); } > bool has_value() const { return valid() && state->has_value(); } > > > T get() > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > return std::move(*local_state).get(); > } > > std::exception_ptr get_exception_ptr() > { > if (!state) { > return std::exception_ptr{}; > } > return state->get_exception_ptr(); > } > > > void wait() const > { > if ( !state ) { > future_details::throw_no_state(); > } > state->wait(); > } > > template <class Rep, class Period> > std::future_status wait_for(const std::chrono::duration<Rep, Period>& timeout) const > { > if (!state) { > future_details::throw_no_state(); > } > return state->wait_for(timeout); > } > > template <class Clock, class Duration> > std::future_status wait_until(const std::chrono::time_point<Clock, Duration>& timeout) const > { > if (!state) { > future_details::throw_no_state(); > } > return state->wait_until(timeout); > } > > > template<typename Ex, > typename F, > typename Result = hsh::invoke_result_t<F, future>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto then(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > packaged_task<Result()> task{ hsh::bind_front([local_state](F& f) mutable { return hsh::invoke(f, future<T>{std::move(local_state)}); }, std::forward<F>(f)) }; > R ret{ task.get_future() }; > local_state->add_continuation( hsh::bind_executor(ex, std::move(task)) ); > return ret; > } > > > template<typename Ex, > typename F, > typename R = hsh::invoke_result_t<F, future>> > auto then(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > packaged_task<R()> task{ hsh::bind_front([local_state](F& f) mutable { return hsh::invoke(f, future<T>{std::move(local_state)}); }, std::forward<F>(f)) }; > auto ret = task.get_future(); > local_state->add_continuation(hsh::bind_executor(ex, std::move(task))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<std::is_void<T1>::value>* = nullptr, > typename Result = hsh::invoke_result_t<F>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto on_value(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_value<T, Result, false> task{ local_state }; > R ret{ task.get_future() }; > local_state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<std::is_void<T1>::value>* = nullptr, > typename R = hsh::invoke_result_t<F>> > auto on_value(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_value<T, R, false> task{ local_state }; > auto ret = task.get_future(); > local_state->add_continuation( hsh::bind_executor( ex, hsh::bind_front(std::move(task), std::forward<F>(f)) ) ); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > typename Result = hsh::invoke_result_t<F, T1&&>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto on_value(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_value<T, Result, false> task{ local_state }; > R ret{ task.get_future() }; > local_state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > typename R = hsh::invoke_result_t<F, T1&&>> > auto on_value(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_value<T, R, false> task{ local_state }; > auto ret = task.get_future(); > local_state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > template<typename Ex, typename F, enable_if_t<hsh::is_invocable_r<T, F, std::exception_ptr>::value>* = nullptr> > auto on_error(Ex ex, F&& f) -> future<T> > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_error<T, false> task{ local_state }; > auto ret = task.get_future(); > local_state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > template<typename T1 = T, enable_if_t<conjunction<std::is_same<T1, T>, negation<std::is_void<T1>>>::value>* = nullptr> > auto fallback_to(T1&& fallback_val) -> future<T1> > { > if (!state) { > future_details::throw_no_state(); > } > > auto local_state = std::move(state); > future_details::on_error<T, false> task{ local_state }; > auto ret = task.get_future(); > local_state->add_continuation(hsh::bind_front(std::move(task), future_details::fallback_to<T1>(std::forward<T1>(fallback_val)))); > return ret; > } > > template<typename Ex, typename F, enable_if_t<hsh::is_invocable<F&&>::value>* = nullptr> > void add_completion_callback(Ex ex, F&& f) > { > if (!state) { > future_details::throw_no_state(); > } > state->add_continuation(hsh::bind_executor(ex, std::forward<F>(f))); > } > > void swap(future& other) noexcept { this->state.swap(other.state); } > > private: > template<class> > friend class future; > template<class> > friend class packaged_task; > template<class> > friend class shared_future; > friend class promise<T>; > > future(shared_state_ptr state) : state(std::move(state)) {} > > shared_state_ptr state; > }; > > template <typename T> > void swap(future<T>& lhs, future<T>& rhs) noexcept { lhs.swap(rhs); } > > template <class T> > class shared_future > { > using shared_state_ptr = std::shared_ptr<future_details::shared_state<T>>; > public: > shared_future() = default; > ~shared_future() = default; > > > shared_future(const shared_future& other) = default; > shared_future(shared_future&& other) = default; > shared_future(future<T>&& other) noexcept : state(std::move(other.state)) {} > > > explicit shared_future(future<shared_future<T>>&& other) : shared_future(other.unwrap()) {} > explicit shared_future(future<future<T>>&& other) : shared_future(other.unwrap()) {} > explicit shared_future(const shared_future<shared_future<T>>& other) : shared_future(other.unwrap()) {} > explicit shared_future(const shared_future<future<T>>& other) : shared_future(other.unwrap()) {} > explicit shared_future(shared_future<shared_future<T>>&& other) : shared_future(other.unwrap()) {} > explicit shared_future(shared_future<future<T>>&& other) : shared_future(other.unwrap()) {} > > > shared_future& operator=(const shared_future& other) = default; > shared_future & operator=(shared_future&& other) = default; > shared_future& operator=(future<T>&& other) noexcept > { > this->state = std::move(other.state); > return *this; > } > > > template<typename T1 = T, > typename R = enable_if_t<is_future<T1>::value, future_value_type_t<T1>>> > auto unwrap() -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > auto new_state = std::make_shared<future_details::shared_state<R>>(); > > auto temp_state = state; > temp_state->add_continuation([temp_state, new_state]() > { > > if (temp_state->continuation_has_exception()) { > new_state->set_exception(temp_state->continuation_get_exception_ptr()); > return; > } > > > auto inner_state = temp_state->continuation_get().state; > inner_state->add_continuation([inner_state, new_state]() > { > new_state->unwrap_callback(is_future<T1>::tag(), *inner_state); > } > ); > } > ); > return future<R>{ new_state }; > } > > > bool valid() const noexcept { return nullptr != state; } > explicit operator bool() const noexcept { return valid(); } > > bool is_ready() const { return valid() && state->is_ready(); } > bool has_exception() const { return valid() && state->has_exception(); } > bool has_value() const { return valid() && state->has_value(); } > > > template<typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > T1 get() const > { > if (!state) { > future_details::throw_no_state(); > } > return state->get(); > } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > const T1& get() const > { > if (!state) { > future_details::throw_no_state(); > } > return state->get(); > } > > std::exception_ptr get_exception_ptr() > { > if (!state) { > return std::exception_ptr{}; > } > return state->get_exception_ptr(); > } > > > void wait() const > { > if (!state) { > future_details::throw_no_state(); > } > state->wait(); > } > > template <class Rep, class Period> > std::future_status wait_for(const std::chrono::duration<Rep, Period>& timeout) const > { > if (!state) { > future_details::throw_no_state(); > } > return state->wait_for(timeout); > } > > template <class Clock, class Duration> > std::future_status wait_until(const std::chrono::time_point<Clock, Duration>& timeout) const > { > if (!state) { > future_details::throw_no_state(); > } > return state->wait_until(timeout); > } > > > > > template<typename Ex, typename F, > typename Result = hsh::invoke_result_t<F, shared_future>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto then(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > packaged_task<Result()> task{ hsh::bind_front([](F& f, shared_state_ptr& state) mutable { return hsh::invoke(f, shared_future{std::move(state)}); }, std::forward<F>(f), state) }; > R ret{ task.get_future() }; > state->add_continuation( hsh::bind_executor(ex, std::move(task)) ); > return ret; > } > > > template<typename Ex, > typename F, > typename R = hsh::invoke_result_t<F, shared_future>> > auto then(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > packaged_task<R()> task{ hsh::bind_front([](F& f, shared_state_ptr& state) mutable { return hsh::invoke(f, future<T>{std::move(state)}); }, std::forward<F>(f), state) }; > auto ret = task.get_future(); > state->add_continuation(hsh::bind_executor(ex, std::move(task))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<std::is_void<T1>::value>* = nullptr, > typename Result = hsh::invoke_result_t<F&&>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto on_value(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_value<T, Result, true> task{ state }; > R ret{ task.get_future() }; > state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<std::is_void<T1>::value>* = nullptr, > typename R = hsh::invoke_result_t<F&&>> > auto on_value(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_value<T, R, true> task{ state }; > auto ret = task.get_future(); > state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > typename Result = hsh::invoke_result_t<F&&, const T1&>, > typename R = conditional_t<is_future<Result>::value, Result, future<Result>>> > auto on_value(Ex ex, F&& f) -> R > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_value<T, Result, true> task{ state }; > R ret{ task.get_future() }; > state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > > template<typename Ex, > typename F, > typename T1 = T, > enable_if_t<!std::is_void<T1>::value>* = nullptr, > typename R = hsh::invoke_result_t<F&&, const T1&>> > auto on_value(no_unwrap_t, Ex ex, F&& f) -> future<R> > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_value<T, R, true> task{ state }; > auto ret = task.get_future(); > state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > template<typename Ex, typename F, enable_if_t<hsh::is_invocable_r<T, F, std::exception_ptr>::value>* = nullptr> > auto on_error(Ex ex, F&& f) -> future<T> > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_error<T, true> task{ state }; > auto ret = task.get_future(); > state->add_continuation(hsh::bind_executor(ex, hsh::bind_front(std::move(task), std::forward<F>(f)))); > return ret; > } > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > auto fallback_to(T1&& fallback_val) -> future<T1> > { > if (!state) { > future_details::throw_no_state(); > } > > future_details::on_error<T, true> task{ state }; > auto ret = task.get_future(); > state->add_continuation(hsh::bind_front(std::move(task), future_details::fallback_to<T1>(std::forward<T1>(fallback_val)))); > return ret; > } > > template<typename Ex, typename F, enable_if_t<hsh::is_invocable<F&&>::value>* = nullptr> > void add_completion_callback(Ex ex, F&& f) > { > if (!state) { > future_details::throw_no_state(); > } > state->add_continuation(hsh::bind_executor(ex, std::forward<F>(f))); > } > > void swap(shared_future& other) noexcept { this->state.swap(other.state); } > > private: > template<class> > friend class shared_future; > > template<class> > friend class future; > > shared_future(shared_state_ptr&& state) : state(state) {} > shared_state_ptr state; > }; > > template <typename T> > void swap(shared_future<T>& lhs, shared_future<T>& rhs) noexcept { lhs.swap(rhs); } > > template <typename T> > class promise > { > using shared_state = future_details::shared_state<T>; > public: > promise() : state(std::make_shared<shared_state>()) {} > > template<class Alloc> > promise(std::allocator_arg_t, const Alloc& alloc) : state(std::allocate_shared<shared_state>(alloc)) {} > > promise(const promise& rhs) = delete; > promise(promise&& rhs) = default; > > ~promise() { if (state) { state->abandon_state(); } } > > promise& operator=(const promise& rhs) = delete; > promise& operator=(promise&& rhs) noexcept > { > if (state) { state->abandon_state(); } > this->state = std::move(rhs.state); > this->has_future = rhs.has_future; > return *this; > } > > future<T> get_future() > { > if (!state) { > future_details::throw_no_state(); > } > if (!has_future) { > future_details::throw_future_already_retrieved(); > } > has_future = false; > return state; > } > > template<typename T1 = T, enable_if_t<std::is_void<T1>::value>* = nullptr> > void set_value() > { > if (!state) { > future_details::throw_no_state(); > } > return state->set_value(); > } > > > template<typename T1 = T, enable_if_t<!std::is_void<T1>::value>* = nullptr> > void set_value(T1&& val) > { > if (!state) { > future_details::throw_no_state(); > } > return state->set_value(std::forward<T1>(val)); > } > > template<typename F, typename... Args> > void set_with(F&& f, Args&&... args) > { > if (!state) { > future_details::throw_no_state(); > } > return state->set_with( std::forward<F>(f), std::forward<Args>(args)... ); > } > > template <typename... Args, typename T1 = T, enable_if_t<std::is_constructible<T1, Args...>::value>* = nullptr> > void emplace(Args&&... args) > { > if ( !state ) { > future_details::throw_no_state(); > } > state->emplace(std::forward<Args>(args)...); > } > > template <typename E> > void set_exception(const E& e) > { > if (!state) { > future_details::throw_no_state(); > } > return state->set_exception(e); > } > > void set_exception(std::exception_ptr e) > { > if ( !state ) { > future_details::throw_no_state(); > } > return state->set_exception(std::move(e)); > } > > void swap(promise& other) noexcept > { > std::swap(this->has_future, other.has_future); > this->state.swap(other.state); > } > > private: > std::shared_ptr<shared_state> state; > bool has_future = true; > }; > > template <typename T> > void swap(promise<T>& lhs, promise<T>& rhs) noexcept { lhs.swap(rhs); } > > template <class R, class... Args> > class packaged_task<R(Args...)> > { > using shared_state = future_details::shared_state<R>; > public: > packaged_task() = default; > > template <class F, enable_if_t<conjunction<negation<std::is_same<decay_t<F>, packaged_task>>, is_invocable_r<R, F&&, Args...>>::value>* = nullptr> > explicit packaged_task(F&& f) : func(hsh::forward<F>(f)), state(std::make_shared<shared_state>()) {} > > packaged_task(const packaged_task&) = delete; > packaged_task(packaged_task&&) = default; > > ~packaged_task() { if (state) { state->abandon_state(); } } > > packaged_task& operator=(const packaged_task&) = delete; > packaged_task& operator=(packaged_task&& other) noexcept > { > if (state) { state->abandon_state(); } > this->has_future = other.has_future; > this->state = std::move(other.state); > this->func = std::move(other.func); > return *this; > } > > explicit operator bool() const noexcept { return valid(); } > bool valid() const noexcept { return state && func; } > > future<R> get_future() > { > if (!state) { > future_details::throw_no_state(); > } > if (!has_future) { > future_details::throw_future_already_retrieved(); > } > has_future = false; > return future<R>{ state }; > } > > void operator()(Args... args) > { > if (!state) { > future_details::throw_no_state(); > } > state->set_with(func, std::forward<Args>(args)...); > } > > void reset() > { > if (!state) { > future_details::throw_no_state(); > } else if ( !state->is_ready() ) { > > state->set_exception(std::future_error(std::future_errc::broken_promise)); > } > state = std::make_shared<shared_state>(); > has_future = true; > } > > void swap(packaged_task& rhs) noexcept > { > std::swap(this->has_future, rhs.has_future); > this->state.swap( rhs.state ); > this->func.swap( rhs.func ); > } > > private: > std::shared_ptr<shared_state> state; > unique_function<R(Args...)> func; > bool has_future = true; > }; > > template <class R, class... Args> > void swap(packaged_task<R(Args...)>& lhs, packaged_task<R(Args...)>& rhs) noexcept { lhs.swap(rhs); } > > > inline auto make_ready_future() -> hsh::future<void> > { > hsh::promise<void> p; > p.set_value(); > return p.get_future(); > } > > template<typename T, typename T1 = decay_t<T>> > auto make_ready_future(T&& value) -> future<T1> > { > hsh::promise<T1> p; > p.set_value(std::forward<T>(value)); > return p.get_future(); > } > > template<class T, typename... Args, enable_if_t<std::is_constructible<T, Args...>::value>* = nullptr> > auto make_ready_future(Args&&... args) -> future<T> > { > hsh::promise<T> p; > p.emplace(std::forward<Args>(args)...); > return p.get_future(); > } > > > template <typename T> > auto make_exceptional_future(const std::exception_ptr& ex) -> future<T> > { > hsh::promise<T> p; > p.set_exception(ex); > return p.get_future(); > } > > template <typename T, typename E> > auto make_exceptional_future(const E& ex) -> future<T> > { > hsh::promise<T> p; > p.set_exception(ex); > return p.get_future(); > } > > template <typename T> > auto make_exceptional_future() -> future<T> > { > promise<T> p; > p.set_exception(std::current_exception()); > return p.get_future(); > } > > > template<typename Ex, > typename F, > typename... Args, > typename R = invoke_result_t<F&&, Args&&...>> > auto async(Ex ex, F&& f, Args&&... args) -> future<R> > { > packaged_task<R()> packaged_task{ hsh::bind_front(std::forward<F>(f), std::forward<Args>(args)...) }; > auto future = packaged_task.get_future(); > ex.execute(std::move(packaged_task)); > return future; > } > > > template<typename F1, typename... Fs, enable_if_t<is_future<F1>::value>* = nullptr> > void wait_for_all(F1& f1, Fs&... fs) > { > hsh::for_each_parameter_pack(future_details::future_waiter{}, f1, fs...); > } > > template<typename Iterator, enable_if_t<is_future<typename std::iterator_traits<Iterator>::value_type>::value>* = nullptr> > void wait_for_all(Iterator begin, Iterator end) > { > for (; begin != end; ++begin) { > begin->wait(); > } > } > > > namespace future_details > { > class future_any_waiter : public std::enable_shared_from_this<future_any_waiter> > { > private: > struct waiter > { > explicit waiter(unsigned index) noexcept : index(index) {} > > > waiter(waiter&& other) : index(index), ready_flag(other.is_ready()) {} > > bool is_ready() const noexcept { return ready_flag; } > > void set_ready() noexcept { ready_flag = true; } > > unsigned index; > bool ready_flag = false; > }; > > public: > explicit future_any_waiter(size_t num_waiters) { waiters.reserve(num_waiters); } > > template <typename F> > void add(F& f) > { > auto current_index = static_cast<unsigned>(waiters.size()); > waiters.emplace_back(current_index); > f.add_completion_callback(hsh::inline_executor{}, hsh::bind_front(&future_any_waiter::notify, shared_from_this(), std::ref(waiters.back())) ); > } > > template <typename F1, typename ... Fs> > void add(F1& f1, Fs&... fs) > { > add(f1); > add(fs...); > } > > unsigned wait() > { > std::unique_lock<std::mutex> ulock{ lock }; > while (true) > { > for (auto& waiter : waiters) > { > if (waiter.is_ready()) { > return waiter.index; > } > } > cv.wait(ulock); > } > } > > void notify(waiter& waiter) > { > { > std::unique_lock<std::mutex> ulock{ lock }; > waiter.set_ready(); > } > cv.notify_one(); > } > > private: > std::mutex lock; > std::condition_variable cv; > std::vector<waiter> waiters; > }; > } > > template<typename F1, typename... Fs, enable_if_t<is_future<F1>::value>* = nullptr> > unsigned wait_for_any(F1& f1, Fs&... fs) > { > auto waiter = std::make_shared<future_details::future_any_waiter>(sizeof...(Fs) + 1); > waiter->add( f1, fs... ); > return waiter->wait(); > } > > template<typename Iterator, enable_if_t<is_future<typename std::iterator_traits<Iterator>::value_type>::value>* = nullptr> > Iterator wait_for_any(Iterator begin, Iterator end) > { > if (begin == end) { > return end; > } > > auto waiter = std::make_shared<future_details::future_any_waiter>(static_cast<unsigned>(std::distance(begin, end))); > for ( auto current = begin; current != end; ++current ) { > if ( current->is_ready() ) { > return current; > } else { > waiter->add( *current ); > } > } > return std::next( begin, waiter->wait() ); > } > > namespace future_details > { > template<typename FutureType> > class future_when_all_iterator : public std::enable_shared_from_this<future_when_all_iterator<FutureType>> > { > public: > template<typename Iterator, enable_if_t<std::is_same<future_tag_t, typename is_future<typename std::iterator_traits<Iterator>::value_type>::tag>::value>* = nullptr> > future_when_all_iterator(Iterator begin, Iterator end) : futures(std::make_move_iterator(begin), std::make_move_iterator(end)) {} > > template<typename Iterator, enable_if_t<std::is_same<shared_future_tag_t, typename is_future<typename std::iterator_traits<Iterator>::value_type>::tag>::value>* = nullptr> > future_when_all_iterator(Iterator begin, Iterator end) : futures(begin, end) {} > > ~future_when_all_iterator(){ > > promise.set_value(std::move(futures)); > } > > > hsh::future<std::vector<FutureType>> run() > { > for (auto& future : futures) { > future.add_completion_callback( hsh::inline_executor{}, hsh::bind_front(&future_when_all_iterator::empty_func, this->shared_from_this()) ); > } > return promise.get_future(); > } > > private: > void empty_func() {} > > hsh::promise<std::vector<FutureType>> promise; > std::vector<FutureType> futures; > }; > > template<typename... Fs> > class future_when_all_variadic : public std::enable_shared_from_this<future_when_all_variadic<Fs...>> > { > using TUPLE_TYPE = std::tuple<decay_t<Fs>...>; > public: > future_when_all_variadic(Fs&&... fs) : futures(std::forward<Fs>(fs)...) {} > > ~future_when_all_variadic() { > > promise.set_value(std::move(futures)); > } > > hsh::future<TUPLE_TYPE> run() > { > > hsh::for_each_in_tuple(continuation_helper{ this->shared_from_this() }, futures); > return promise.get_future(); > } > > private: > struct continuation_helper > { > explicit continuation_helper(std::shared_ptr<future_when_all_variadic>&& ptr) : ptr(std::move(ptr)){} > > template<typename F> > void operator()(F&& future){ > future.add_completion_callback(hsh::inline_executor{}, hsh::bind_front(&future_when_all_variadic::empty_func, ptr)); > } > > std::shared_ptr<future_when_all_variadic> ptr; > }; > > void empty_func() {} > > hsh::promise<TUPLE_TYPE> promise; > TUPLE_TYPE futures; > }; > > > template<typename FutureType> > class future_when_any_iterator : public std::enable_shared_from_this<future_when_any_iterator<FutureType>> > { > public: > > template<typename Iterator, enable_if_t<std::is_same<future_tag_t, typename is_future<typename std::iterator_traits<Iterator>::value_type>::tag>::value>* = nullptr> > future_when_any_iterator(Iterator begin, Iterator end) : futures(std::make_move_iterator(begin), std::make_move_iterator(end)) {} > > > template<typename Iterator, enable_if_t<std::is_same<shared_future_tag_t, typename is_future<typename std::iterator_traits<Iterator>::value_type>::tag>::value>* = nullptr> > future_when_any_iterator(Iterator begin, Iterator end) : futures(begin, end) {} > > hsh::future<std::vector<FutureType>> run() > { > for (auto& future : futures) { > future.add_completion_callback(hsh::inline_executor{}, hsh::bind_front(&future_when_any_iterator::notify, this->shared_from_this())); > } > > mark_ready(); > return promise.get_future(); > } > > void notify() > { > std::lock_guard<std::mutex> scoped_lock{ lock }; > if (ready_flag && !completion_flag) { > promise.set_value(std::move(futures)); > } > completion_flag = true; > } > > void mark_ready() > { > std::lock_guard<std::mutex> scoped_lock{ lock }; > if (completion_flag) { > promise.set_value(std::move(futures)); > } > ready_flag = true; > } > > private: > hsh::promise<std::vector<FutureType>> promise; > std::vector<FutureType> futures; > std::mutex lock; > bool completion_flag = false; > bool ready_flag = false; > }; > > template<typename... Fs> > class future_when_any_variadic : public std::enable_shared_from_this<future_when_any_variadic<Fs...>> > { > using TUPLE_TYPE = std::tuple<decay_t<Fs>...>; > public: > future_when_any_variadic(Fs&&... fs) : futures(std::forward<Fs>(fs)...) {} > > hsh::future<TUPLE_TYPE> run() > { > > hsh::for_each_in_tuple(continuation_helper{ this->shared_from_this() }, futures); > > mark_ready(); > return promise.get_future(); > } > > void notify() > { > std::lock_guard<std::mutex> scoped_lock{ lock }; > if (ready_flag && !completion_flag) { > promise.set_value(std::move(futures)); > } > completion_flag = true; > } > > void mark_ready() > { > std::lock_guard<std::mutex> scoped_lock{ lock }; > if (completion_flag) { > promise.set_value(std::move(futures)); > } > ready_flag = true; > } > > private: > struct continuation_helper > { > explicit continuation_helper(std::shared_ptr<future_when_any_variadic>&& ptr) : ptr(std::move(ptr)) {} > > template<typename F> > void operator()(F&& future) > { > future.add_completion_callback(hsh::inline_executor{}, hsh::bind_front(¬ify, ptr)); > } > > std::shared_ptr<future_when_any_variadic> ptr; > }; > > hsh::promise<TUPLE_TYPE> promise; > TUPLE_TYPE futures; > std::mutex lock; > bool completion_flag = false; > bool ready_flag = false; > }; > > } > > > template<typename Iterator, > typename F_TYPE = typename std::iterator_traits<Iterator>::value_type, enable_if_t<is_future<F_TYPE>::value>* = nullptr> > future<std::vector<F_TYPE>> when_all(Iterator begin, Iterator end) > { > if (begin == end) { > return make_ready_future<std::vector<F_TYPE>>(); > } > auto when_all_helper = std::make_shared<future_details::future_when_all_iterator<F_TYPE>>(begin, end); > return when_all_helper->run(); > } > > template<typename... Fs> > future<std::tuple<decay_t<Fs>...>> when_all(Fs&&... fs) > { > if (0 == sizeof...(fs)) { > > return make_ready_future<std::tuple<decay_t<Fs>...>>(); > } > > auto when_all_helper = std::make_shared<future_details::future_when_all_variadic<Fs...>>(std::forward<Fs>(fs)...); > return when_all_helper->run(); > } > > > > template<typename Iterator, > typename F_TYPE = typename std::iterator_traits<Iterator>::value_type, enable_if_t<is_future<F_TYPE>::value>* = nullptr> > future<std::vector<F_TYPE>> when_any(Iterator begin, Iterator end) > { > if (begin == end) { > return make_ready_future<std::vector<F_TYPE>>(); > } > auto when_any_helper = std::make_shared<future_details::future_when_any_iterator<F_TYPE>>(begin, end); > return when_any_helper->run(); > } > > template<typename... Fs> > future<std::tuple<decay_t<Fs>...>> when_any(Fs&&... fs) > { > if ( 0 == sizeof...(fs) ) { > > return make_ready_future<std::tuple<decay_t<Fs>...>>(); > } > > auto when_any_helper = std::make_shared<future_details::future_when_any_variadic<Fs...>>(std::forward<Fs>(fs)...); > return when_any_helper->run(); > } > >} ># 14 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/HistorianInterface/IDataProviders.h" 2 > > >namespace query >{ > > enum class error > { > not_initialized = 0, > invalid_argument = 1, > operation_not_supported = 2, > operation_canceled = 3, > database_error = 4 > }; > > template<typename T> > using Result = hsh::result<std::vector<T>, error>; > > template <typename T> > class PagedResult > { > public: > virtual ~PagedResult() = default; > > > virtual hsh::optional<hsh::future<Result<T>>> next() = 0; > }; > > > template<typename T> > class PagedResultError : public PagedResult<T> > { > public: > explicit PagedResultError(error err) noexcept : err(err) {} > > virtual hsh::optional<hsh::future<Result<T>>> next() override > { > if (hsh::exchange(more_pages, false)) { > return hsh::make_ready_future<Result<T>>(err); > } > return hsh::nullopt; > } > > private: > error err; > bool more_pages = true; > }; > > > template<typename T> > using PagedResultPtr = std::unique_ptr<PagedResult<T>>; > > class IStreamDataProvider > { > public: > virtual ~IStreamDataProvider() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual hsh::future<Result<StreamValue>> query( > const std::shared_ptr<const Stream>& stream, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_ready_future<Result<StreamValue>>(error::operation_not_supported); > } > > virtual PagedResultPtr<StreamValue> query_paged( > const std::shared_ptr<const Stream>& stream, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_unique<PagedResultError<StreamValue>>(error::operation_not_supported); > } > }; > > class IRawStreamDataProvider > { > public: > virtual ~IRawStreamDataProvider() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual hsh::future<Result<StreamValue>> query( > const std::shared_ptr<const Stream>& stream, > hsh::time_span query_range, > hsh::microseconds interval = {}) > { > return hsh::make_ready_future<Result<StreamValue>>(error::operation_not_supported); > } > > virtual PagedResultPtr<StreamValue> query_paged( > const std::shared_ptr<const Stream>& stream, > hsh::time_span query_range, > hsh::microseconds interval = {}) > { > return hsh::make_unique<PagedResultError<StreamValue>>(error::operation_not_supported); > } > }; > > > class IStreamGroupDataProvider > { > public: > virtual ~IStreamGroupDataProvider() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual hsh::future<Result<StreamGroupSlice>> query_group( > std::shared_ptr<const StreamGroup>& group, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_ready_future<Result<StreamGroupSlice>>(error::operation_not_supported); > } > > virtual PagedResultPtr<StreamGroupSlice> query_group_paged( > const std::shared_ptr<const StreamGroup>& group, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_unique<PagedResultError<StreamGroupSlice>>(error::operation_not_supported); > } > > virtual hsh::future<Result<StreamGroupSliceEntry>> query_grouped_stream( > const std::shared_ptr<const GroupedStream>& grouped_stream, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_ready_future<Result<StreamGroupSliceEntry>>(error::operation_not_supported); > } > > virtual PagedResultPtr<StreamGroupSliceEntry> query_grouped_stream_paged( > const std::shared_ptr<const GroupedStream>& grouped_stream, > hsh::time_span query_range, > hsh::microseconds interval = {}, > bool include_updates = true) > { > return hsh::make_unique<PagedResultError<StreamGroupSliceEntry>>(error::operation_not_supported); > } > }; > > class ILogDataProvider > { > public: > virtual ~ILogDataProvider() = default; > > virtual bool is_supported() const noexcept { return false; } > > struct QueryOptions > { > hsh::optional<hsh::flat_set<std::string>> columns; > hsh::unique_function<bool(const LogValue&)> filter; > }; > > virtual hsh::future<Result<LogValue>> query(const std::shared_ptr<const LogStream>& log, hsh::time_span query_range, QueryOptions&& query_options = {}) > { > return hsh::make_ready_future<Result<LogValue>>(error::operation_not_supported); > } > > virtual PagedResultPtr<LogValue> query_paged(const std::shared_ptr<const LogStream>& log, hsh::time_span query_range, QueryOptions&& query_options = {}) > { > return hsh::make_unique<PagedResultError<LogValue>>(error::operation_not_supported); > } > }; > > class IAuditDataProvider > { > public: > virtual ~IAuditDataProvider() = default; > > virtual bool is_supported() const noexcept { return false; } > > virtual hsh::future<Result<StreamAuditEntry>> query_stream_audits(hsh::time_span query_range) > { > return hsh::make_ready_future<Result<StreamAuditEntry>>(error::operation_not_supported); > } > > virtual PagedResultPtr<StreamAuditEntry> query_stream_audits_paged(hsh::time_span query_range) > { > return hsh::make_unique<PagedResultError<StreamAuditEntry>>(error::operation_not_supported); > } > > virtual hsh::future<Result<GroupAuditEntry>> query_group_audits(hsh::time_span query_range) > { > return hsh::make_ready_future<Result<GroupAuditEntry>>(error::operation_not_supported); > } > > virtual PagedResultPtr<GroupAuditEntry> query_group_audits_paged(hsh::time_span query_range) > { > return hsh::make_unique<PagedResultError<GroupAuditEntry>>(error::operation_not_supported); > } > }; >} ># 6 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_HistorianQueryConnection.h" 2 > > > > > >class HistorianQueryConnection { >public: > > virtual query::IStreamCache* stream_cache() noexcept = 0; > virtual query::IStreamCache* raw_stream_cache() noexcept = 0; > virtual query::IGroupCache* group_cache() noexcept = 0; > virtual query::ILogCache* log_cache() noexcept = 0; > virtual query::IEnumCache* enum_cache() noexcept = 0; > > virtual query::ILogDataProvider* log_data_provider() noexcept { static query::ILogDataProvider log_provider; return &log_provider; } > > class IGenericStreamValue { > public: > virtual ~IGenericStreamValue() {} > > virtual const IGenericValue *get_value() const = 0; > virtual CHRONUS_QUALITY get_cquality() const = 0; > virtual OSII_INT64 get_system_time_us() const = 0; > virtual StreamType get_stream_type() const = 0; > > > virtual CHRONUS_TIME_QUALITY get_time_quality() const = 0; > > > virtual OSII_INT64 get_source_time_us() const = 0; > > > virtual OSII_INT64 get_sample_time_us() const = 0; > }; > virtual OSII_RETCODE query_point_stream( > IHeartbeater *heartbeater, > OSII_UINT32 cpid, > OSII_INT64 start_time_in_us, > OSII_INT64 end_time_in_us, > OSII_BOOL generate_nodatas, > std::vector<const IGenericStreamValue *> &query_results) = 0; > virtual OSII_RETCODE query_raw_point_stream( > IHeartbeater *heartbeater, > OSII_UINT32 cpid, > OSII_INT64 start_time_in_us, > OSII_INT64 end_time_in_us, > std::vector<const IGenericStreamValue *> &query_results) = 0; > virtual void destroy_query_result(const IGenericStreamValue *value) = 0; > > class IStreamGroupSlice { > public: > class IStreamGroupSliceEntry { > public: > virtual OSII_UINT32 get_cpid() const = 0; > virtual const IGenericValue *get_value() const = 0; > virtual CHRONUS_QUALITY get_cquality() const = 0; > virtual StreamType get_stream_type() const = 0; > virtual OSII_INT64 get_source_time_us() const = 0; > }; > > virtual void destroy() = 0; > virtual ~IStreamGroupSlice() {} > > virtual OSII_INT64 get_slice_time_us() const = 0; > virtual const std::vector<IStreamGroupSliceEntry *> &get_cell_values() const = 0; > virtual const IStreamGroupSliceEntry *get_cell_value(OSII_UINT32 cpid) const = 0; > virtual StreamType get_group_stream_type() const = 0; > > > virtual OSII_INT64 get_sample_time_us() const = 0; > > > virtual CHRONUS_TIME_QUALITY get_time_quality() const = 0; > }; > virtual OSII_RETCODE query_stream_group( > IHeartbeater *heartbeater, > OSII_UINT32 cpid, > OSII_INT64 start_time_in_us, > OSII_INT64 end_time_in_us, > OSII_BOOL generate_nodatas, > std::vector<const IStreamGroupSlice *> &query_results) = 0; > virtual void destroy_query_stream_group_result(const IStreamGroupSlice *slice) = 0; > > > class ILogValue { > public: > virtual ~ILogValue() {} > > virtual const std::string &get_source_id() const = 0; > virtual const std::string &get_ceid() const = 0; > virtual const IAORManager::SecurityGroups &get_security_groups() const = 0; > virtual OSII_INT64 get_collection_time_us() const = 0; > virtual OSII_INT64 get_source_time_us() const = 0; > virtual const std::map<std::string, IGenericValue*> &get_data() const = 0; > }; > virtual OSII_RETCODE query_log( > const std::string &source_id, > OSII_INT64 start_time_in_us, > OSII_INT64 end_time_in_us, > std::vector<const ILogValue *> &query_results, > const std::set<std::string> &column_names) = 0; > virtual OSII_RETCODE query_log( > const std::string &source_id, > OSII_INT64 start_time_in_us, > OSII_INT64 end_time_in_us, > std::vector<const ILogValue *> &query_results) = 0; > virtual void destroy_query_result(const ILogValue *value) = 0; > > > > class IHistorianStreamSubscription { > public: > class Listener { > public: > virtual void handle_recieved_historian_values(OSII_UINT32 cpid, OSII_BOOL is_raw, const std::vector<const IGenericStreamValue *> &values) = 0; > }; > }; > virtual IHistorianStreamSubscription *create_stream_subscription(OSII_UINT32 cpid, OSII_BOOL is_raw, IHistorianStreamSubscription::Listener *stream_value_listener) = 0; > virtual void destroy_stream_subscription(IHistorianStreamSubscription *subscription) = 0; > > class IHistorianStreamGroupSubscription { > public: > class Listener { > public: > virtual void handle_recieved_historian_value(OSII_UINT32 cpid, const std::vector<const HistorianQueryConnection::IStreamGroupSlice *> &value_slices) = 0; > }; > }; > virtual IHistorianStreamGroupSubscription *create_stream_group_subscription(OSII_UINT32 cpid, IHistorianStreamGroupSubscription::Listener *stream_group_slice_listener) = 0; > virtual void destroy_stream_group_subscription(IHistorianStreamGroupSubscription *subscription) = 0; > > > > class IHistorianAudit > { > public: > virtual ~IHistorianAudit() {} > virtual OSII_INT64 get_start_time_us() const = 0; > virtual OSII_INT64 get_end_time_us() const = 0; > virtual OSII_BOOL get_old_value_has_meaning() const = 0; > virtual const IGenericValue *get_old_value() const = 0; > virtual const IGenericValue *get_new_value() const = 0; > virtual OSII_UINT32 get_cpid() const = 0; > virtual const std::string &get_ceid() const = 0; > virtual OSII_INT64 get_timestamp_us() const = 0; > virtual const std::string &get_user_name() const = 0; > virtual const std::string &get_result() const = 0; > }; > virtual OSII_RETCODE query_audits(OSII_INT64 start_time_in_us, OSII_INT64 end_time_in_us, std::vector<const IHistorianAudit *> &query_results) = 0; > virtual void destroy_audit_result(const IHistorianAudit *value) = 0; > > class IHistorianGroupAudit > { > public: > virtual ~IHistorianGroupAudit() {} > virtual OSII_INT64 get_start_time_us() const = 0; > virtual OSII_INT64 get_end_time_us() const = 0; > virtual OSII_BOOL get_old_value_has_meaning() const = 0; > virtual const std::map<OSII_UINT32, IGenericValue*> &get_old_values() const = 0; > virtual const std::map<OSII_UINT32, IGenericValue*> &get_new_values() const = 0; > virtual OSII_UINT32 get_cpid() const = 0; > virtual const std::string &get_ceid() const = 0; > virtual OSII_INT64 get_timestamp_us() const = 0; > virtual const std::string &get_user_name() const = 0; > virtual const std::string &get_result() const = 0; > }; > virtual OSII_RETCODE query_group_audits(OSII_INT64 start_time_in_us, OSII_INT64 end_time_in_us, std::vector<const IHistorianGroupAudit *> &query_results) = 0; > virtual void destroy_group_audit_result(const IHistorianGroupAudit *value) = 0; > > > > > class IHistorianQueryConnectionUser { > public: > virtual SarcConnectionCache* get_conn_cache() = 0; > }; > > >public: > virtual ~HistorianQueryConnection(){} > > > virtual OSII_BOOL is_initialized() const = 0; > virtual OSII_BOOL is_viable() const = 0; > virtual OSII_BOOL is_connected() const = 0; > > virtual OSII_BOOL get_feature_support(CServerFeatureSupport feature) const = 0; >}; > > >extern "C" { > > > >HistorianQueryConnection *create_historian_query_instance(HistorianQueryConnection::IHistorianQueryConnectionUser *user_data, THREAD_MON thread_mon, IAlarmGenerator *alarm_generator, > IHSHMetricManager *metric_manager, const ClusterConfig *cluster_config, const ClusterConfig::CDSSettings *cds_config, const ClusterConfig::CDSQueryServerSettings *server_config, > OSII_UINT32 debug_level, OSII_INT32 num_server_arguments, OSII_CHAR **server_argument_array); > > >void destroy_historian_query_instance(HistorianQueryConnection *historian_connection); >} ># 3 "LogDataProvider.h" 2 > ># 1 "../include/ChronusUtil.h" 1 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h" 1 > ># 13 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h" >enum CASS_CONSISTENCY_LEVEL { > CONSISTENCY_ALL, > CONSISTENCY_EACH_QUORUM, > CONSISTENCY_QUORUM, > CONSISTENCY_LOCAL_QUORUM, > CONSISTENCY_ONE, > CONSISTENCY_TWO, > CONSISTENCY_THREE, > CONSISTENCY_LOCAL_ONE, > CONSISTENCY_ANY, > CONSISTENCY_SERIAL, > CONSISTENCY_LOCAL_SERIAL, >}; > >const std::string HSH_CASSANDRA_DATACENTER_PLUGIN_TYPE = "CASS"; > >class ICassandraFuture >{ >private: > >public: > virtual ~ICassandraFuture() {} > > > virtual OSII_BOOL is_ready() = 0; > > > virtual void wait() = 0; > > > virtual OSII_BOOL wait_timed(OSII_INT64 wait_time_ms) = 0; > > > virtual void release() = 0; >}; > > >class ICassandraQueryStatement { >private: > ICassandraQueryStatement(const ICassandraQueryStatement&) = delete; ICassandraQueryStatement& operator=(const ICassandraQueryStatement&) = delete; ICassandraQueryStatement(ICassandraQueryStatement&&) = delete; > >protected: > ICassandraQueryStatement() {} > >public: > virtual ~ICassandraQueryStatement(){} > > virtual OSII_RETCODE bind_bytes(OSII_UINT8 index, const OSII_BYTE *bytes, OSII_UINT32 size) = 0; > virtual OSII_RETCODE bind_int64(OSII_UINT8 index, OSII_UINT64 val) = 0; > virtual OSII_RETCODE bind_double(OSII_UINT8 index, OSII_DOUBLE val) = 0; > virtual OSII_RETCODE bind_float(OSII_UINT8 index, OSII_FLOAT val) = 0; > virtual OSII_RETCODE bind_varint(OSII_UINT8 index, OSII_INT64 val) = 0; > virtual OSII_RETCODE bind_string(OSII_UINT8 index, const std::string &str) = 0; > virtual OSII_RETCODE bind_uuid(OSII_UINT8 index, const std::string &uuid) = 0; > virtual OSII_RETCODE bind_null(OSII_UINT8 index) = 0; > virtual OSII_RETCODE bind_dictionary(OSII_UINT8 index, const std::map<std::string, std::string> &map) = 0; > virtual OSII_RETCODE bind_dictionary(OSII_UINT8 index, const std::map<OSII_INT32, std::string> &map) = 0; > virtual OSII_RETCODE bind_list(OSII_UINT8 index, const std::vector<std::string> &list) = 0; > virtual OSII_RETCODE bind_blob(OSII_UINT32 index, const OSII_BYTE *bytes, size_t num_bytes) = 0; > virtual OSII_RETCODE bind_blob(size_t index, hsh::span<const uint8_t> bytes) = 0; > > > virtual void set_query_paging_size(OSII_INT32 size) = 0; > virtual void set_query_timeout(hsh::milliseconds ms) = 0; >}; > > >class cassandra_row_invalid_column : public std::logic_error >{ >public: > cassandra_row_invalid_column() : std::logic_error("Unknown Column") {} >}; > > >class cassandra_row_invalid_type : public std::logic_error >{ >public: > cassandra_row_invalid_type() : std::logic_error("Invalid Column type") {} >}; > > >class ICassRow { >private: > ICassRow(const ICassRow&) = delete; ICassRow& operator=(const ICassRow&) = delete; ICassRow(ICassRow&&) = delete; > >protected: > ICassRow() {} > >public: > virtual ~ICassRow() {} > > > virtual OSII_BOOL is_cell_value_null(size_t index) const = 0; > virtual OSII_BOOL is_cell_value_null(const std::string &col_name) const = 0; > > > virtual OSII_INT64 decode_cell_varint(size_t index) const = 0; > virtual OSII_INT64 decode_cell_int64(size_t index) const = 0; > virtual OSII_DOUBLE decode_cell_double(size_t index) const = 0; > virtual hsh::string_view decode_string(size_t index) const = 0; > virtual std::string decode_cell_string(size_t index) const = 0; > virtual std::string decode_cell_uuid(size_t index) const = 0; > virtual OSII_FLOAT decode_cell_float(size_t index) const = 0; > virtual void decode_cell_bytes(size_t index, std::vector<OSII_BYTE> &bytes) const = 0; > virtual hsh::span<const uint8_t> decode_bytes(size_t index) const = 0; > > > virtual OSII_INT64 decode_cell_varint(const std::string &col_name) const = 0; > virtual OSII_INT64 decode_cell_int64(const std::string &col_name) const = 0; > virtual OSII_DOUBLE decode_cell_double(const std::string &col_name) const = 0; > virtual std::string decode_cell_string(const std::string &col_name) const = 0; > virtual std::string decode_cell_uuid(const std::string &col_name) const = 0; > virtual OSII_FLOAT decode_cell_float(const std::string &col_name) const = 0; > > > virtual OSII_INT64 decode_cell_varint(const std::string &col_name, OSII_BOOL &has_entry) const = 0; > virtual OSII_INT64 decode_cell_int64(const std::string &col_name, OSII_BOOL &has_entry) const = 0; > virtual OSII_DOUBLE decode_cell_double(const std::string &col_name, OSII_BOOL &has_entry) const = 0; > virtual std::string decode_cell_string(const std::string &col_name, OSII_BOOL &has_entry) const = 0; > virtual OSII_FLOAT decode_cell_float(const std::string &col_name, OSII_BOOL &has_entry) const = 0; > > > virtual OSII_RETCODE decode_cell_map(const std::string &col_name, std::map<OSII_INT32, std::string> &collection) const = 0; > virtual OSII_RETCODE decode_cell_map(const std::string &col_name, std::map<std::string, std::string> &collection) const = 0; > virtual OSII_RETCODE decode_cell_list(const std::string &col_name, std::vector<std::string> &list) const = 0; > virtual OSII_RETCODE decode_cell_list(const std::string &col_name, std::vector<OSII_UINT32> &list) const = 0; > virtual OSII_RETCODE decode_cell_bytes(const std::string &col_name, std::vector<OSII_BYTE> &bytes) const = 0; > virtual OSII_RETCODE decode_cell_bytes(const std::string &col_name, OSII_BYTE *data, OSII_INT32 max_size) const = 0; >}; > > > >class IQueryResults { >private: > IQueryResults(const IQueryResults&) = delete; IQueryResults& operator=(const IQueryResults&) = delete; IQueryResults(IQueryResults&&) = delete; > >protected: > IQueryResults() {} > >public: > virtual ~IQueryResults() {} > > virtual OSII_INT32 get_num_results() const = 0; > virtual OSII_RETCODE get_retcode() const = 0; > virtual ICassRow * get_next_row() = 0; > virtual void destroy_row( ICassRow * row) = 0; > > > virtual OSII_BOOL has_more_pages() const = 0; > virtual void update_statement_state(ICassandraQueryStatement *statement) const = 0; >}; > >class ICassandraConnection; > >class ICassandraBatchFuture : public ICassandraFuture >{ >public: > virtual ~ICassandraBatchFuture() {} > > > virtual OSII_RETCODE get_retcode() = 0; > > > virtual OSII_INT32 get_num_entries_in_batch() const = 0; >}; > >class ICassandraQueryFuture : public ICassandraFuture >{ >public: > virtual ~ICassandraQueryFuture() {} > > > virtual IQueryResults *get_query_results() = 0; > > > virtual void destroy_query_results(IQueryResults *results) = 0; > > > virtual void set_callback(hsh::unique_function<void(ICassandraQueryFuture*)>&& callback) = 0; >}; > > > >class ICassandraBatchAction { >private: > ICassandraBatchAction(const ICassandraBatchAction&) = delete; ICassandraBatchAction& operator=(const ICassandraBatchAction&) = delete; ICassandraBatchAction(ICassandraBatchAction&&) = delete; > >protected: > ICassandraBatchAction() {} > >public: > virtual ~ICassandraBatchAction() {} > > virtual OSII_RETCODE add_statement(ICassandraQueryStatement *statement) = 0; > virtual OSII_INT32 get_curr_size() const = 0; > virtual OSII_INT32 get_max_size() const = 0; > > virtual OSII_RETCODE flush(ICassandraConnection *conn, OSII_INT32 &num_entries_written) = 0; > virtual OSII_RETCODE flush(ICassandraConnection *conn) = 0; > > virtual ICassandraBatchFuture *flush_non_blocking(ICassandraConnection *conn) = 0; > > virtual OSII_RETCODE clear() = 0; >}; > >class ICassandraSchemaInformation >{ >public: > virtual ~ICassandraSchemaInformation() = default; > > virtual uint32_t schema_snapshot_version() const noexcept = 0; > > virtual std::vector<std::string> keyspaces() const = 0; > > virtual hsh::optional<std::vector<std::string>> tables(const std::string& ks_name) = 0; >}; > > >class ICassandraConnection { >public: > >private: > ICassandraConnection(const ICassandraConnection&) = delete; ICassandraConnection& operator=(const ICassandraConnection&) = delete; ICassandraConnection(ICassandraConnection&&) = delete; > >protected: > ICassandraConnection() {} > >public: > virtual ~ICassandraConnection(void) {} > > static ICassandraConnection *create_connection(const ClusterConfig::DatacenterSettings *primary_datacenter_settings, const std::vector<const ClusterConfig::DatacenterSettings *> &secondary_datacenter_settings); > static void destroy_connection(ICassandraConnection *conn); > > virtual OSII_RETCODE create_statement(const std::string &query, ICassandraQueryStatement *&statement) = 0; > virtual OSII_RETCODE create_statement(const std::string &query, CASS_CONSISTENCY_LEVEL cons_level, ICassandraQueryStatement *&statement) = 0; > virtual void destroy_statement(ICassandraQueryStatement *statement) = 0; > > virtual ICassandraBatchAction *create_batch_query(OSII_INT32 max_size) = 0; > virtual void destroy_batch_query(ICassandraBatchAction *query) = 0; > > > > > virtual std::unique_ptr<ICassandraSchemaInformation> schema_information() const = 0; > > virtual OSII_BOOL does_keyspace_exist(const std::string &keyspace) = 0; > virtual hsh::optional<uint32_t> schema_snapshot_version() const = 0; > virtual OSII_RETCODE list_keyspaces( std::vector<std::string> & result ) = 0; > virtual OSII_RETCODE list_tables( const std::string & keyspace, std::vector<std::string> & result ) = 0; > virtual OSII_RETCODE get_schema( const std::string & keyspace, const std::string & table, std::string & result ) = 0; > virtual OSII_RETCODE get_table_guid ( const std::string & keyspace, const std::string & table, std::string & result ) = 0; > > > virtual IQueryResults *perform_query(ICassandraQueryStatement *statement) = 0; > virtual ICassandraQueryFuture *perform_async_query(ICassandraQueryStatement *statement) = 0; > virtual void destroy_query_results(IQueryResults *results) = 0; > > virtual OSII_BOOL is_connected() const = 0; > > > virtual OSII_BOOL connect() = 0; >}; > > >template <class T> >class CassandraPagingQuery { >private: > CassandraPagingQuery(const CassandraPagingQuery&) = delete; CassandraPagingQuery& operator=(const CassandraPagingQuery&) = delete; CassandraPagingQuery(CassandraPagingQuery&&) = delete; > > ICassandraQueryStatement *statement; > ICassandraConnection *connection; > > void *user_data; > OSII_RETCODE (*parse_item)(void *, const ICassRow *cass_result, T *&value); > void (*destroy_item)(void *user_data, T *results); > >public: > CassandraPagingQuery(ICassandraConnection *connection, ICassandraQueryStatement *statement, OSII_INT32 page_size, void *user_data, > OSII_RETCODE (*item_parser_func)(void *user_data, const ICassRow *cass_result, T *&value), > void (*item_destroyer_func)(void *user_data, T *value)) > { > this->connection = connection; > this->statement = statement; > this->parse_item = item_parser_func; > this->destroy_item = item_destroyer_func; > this->user_data = user_data; > > statement->set_query_paging_size(page_size ); > } > > ~CassandraPagingQuery(){ > if(statement != __null) { > connection->destroy_statement(statement); > } > } > > OSII_RETCODE get_results(std::vector<T*> *results, OSII_BOOL &is_more){ > IQueryResults *query_result = connection->perform_query(statement); > if (query_result == __null || query_result->get_retcode() != (( OSII_RETCODE )1)) { > OSII_RETCODE ret_val = (( OSII_RETCODE )0); > HSHLogger::LOG("Failed to perform paging query", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h", 313 ); > if (query_result != __null) { > ret_val = query_result->get_retcode(); > connection->destroy_query_results(query_result); > } > return ret_val; > } > > ICassRow * row; > while( __null != ( row = query_result->get_next_row() ) ){ > T *value = __null; > > if ((( OSII_RETCODE )1) != parse_item(user_data, row, value)) { > > if (destroy_item != __null) { > for (auto free_itr : *results) { > destroy_item(user_data, free_itr); > } > } > > HSHLogger::LOG("Failed to parse results", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h", 333 ); > query_result->destroy_row( row ); > row = __null; > connection->destroy_query_results(query_result); > query_result = __null; > return (( OSII_RETCODE )0); > } > results->push_back(value); > query_result->destroy_row( row ); > row = __null; > } > > > is_more = query_result->has_more_pages(); > if (is_more) { > > query_result->update_statement_state(statement); > } > > connection->destroy_query_results(query_result); > query_result = __null; > return (( OSII_RETCODE )1); > } >}; > > >template <class T> >class CassandraNonpagingQuery { >private: > CassandraNonpagingQuery(const CassandraNonpagingQuery&) = delete; CassandraNonpagingQuery& operator=(const CassandraNonpagingQuery&) = delete; CassandraNonpagingQuery(CassandraNonpagingQuery&&) = delete; > > ICassandraQueryStatement *statement; > ICassandraConnection *connection; > > void *user_data; > OSII_RETCODE (*parse_item)(void *, const ICassRow *cass_result, T *&value); > void (*destroy_item)(void *user_data, T *results); > >public: > CassandraNonpagingQuery(ICassandraConnection *connection, ICassandraQueryStatement *statement, void *user_data, > OSII_RETCODE (*item_parser_func)(void *user_data, const ICassRow *row, T *&value), void (*item_free_func)(void *user_data, T* value)) > { > this->connection = connection; > this->statement = statement; > this->parse_item = item_parser_func; > this->destroy_item = item_free_func; > this->user_data = user_data; > } > > ~CassandraNonpagingQuery() { > if (statement != __null) { > connection->destroy_statement(statement); > } > } > > OSII_RETCODE get_results(std::vector<T*> *results){ > IQueryResults *query_results = connection->perform_query(statement); > if (query_results == __null || (( OSII_RETCODE )1) != query_results->get_retcode()) { > OSII_RETCODE ret_val = (( OSII_RETCODE )0); > HSHLogger::LOG("failed to perform query for non-paging query", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h", 392 ); > if (results != __null) { > ret_val = query_results->get_retcode(); > connection->destroy_query_results(query_results); > query_results = __null; > } > return ret_val; > } > > results->reserve(query_results->get_num_results()); > > ICassRow * row; > while( __null != ( row = query_results->get_next_row() ) ){ > T *value = __null; > > if ((( OSII_RETCODE )1) != parse_item(user_data, row, value)) { > > if (destroy_item != __null) { > for (typename std::vector<T *>::iterator free_itr = results->begin() ; free_itr != results->end() ; ++free_itr) { > destroy_item(user_data, *free_itr); > } > } > results->clear(); > > HSHLogger::LOG("Failed to parse results", "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h", 416 ); > query_results->destroy_row(row); > row = __null; > connection->destroy_query_results(query_results); > query_results = __null; > return (( OSII_RETCODE )0); > } > > results->push_back(value); > query_results->destroy_row(row); > row = __null; > } > > connection->destroy_query_results(query_results); > query_results = __null; > > return (( OSII_RETCODE )1); > } >}; > >class IHSHCassandraNode >{ > public: > class SSTable { > public: > class DiskAccessInfo { > public: > OSII_BOOL is_valid; > OSII_BOOL repaired; > std::map<std::string, OSII_UINT64> partition_row_counts; > }; > size_t size_in_bytes; > OSII_BOOL incremental; > OSII_UINT32 generation; > std::string table; > std::string format; > std::string keyspace; > std::string snapshot_name; > std::string root_location; > DiskAccessInfo * disk_access_info; > std::vector<std::string> components; > }; > > public: > static IHSHCassandraNode * create( const ClusterConfig * config, const ClusterConfig::DatacenterSettings dc_config, const ClusterConfig::DatacenterNodeSettings local_node, ICassandraConnection * conn); > void destroy(IHSHCassandraNode * & instance); > > > static OSII_RETCODE get_missing_components( const SSTable & generation, std::vector<std::string> & result ); > > > virtual const std::vector<std::string> get_data_dirs() = 0; > static const std::vector<std::string> get_data_dirs(const ClusterConfig * cluster_config, const ClusterConfig::DatacenterNodeSettings node_config); > > > virtual OSII_RETCODE list_snapshots( const std::string & keyspace, const std::string & table, const std::string & guid, std::vector<std::string> & results ) = 0; > virtual OSII_RETCODE get_table_paths( const std::string & keyspace, const std::string & table, const std::string & guid, OSII_BOOL incremental_dir, const std::string & snapshot_name, std::vector<std::string> & results ) = 0; > virtual OSII_RETCODE list_sstables( const std::string & table_path, const std::string & keyspace, const std::string & table, std::vector<SSTable> & results ) = 0; > virtual OSII_RETCODE get_keyspace_size(const std::string & keyspace, OSII_BOOL include_backup, OSII_BOOL include_snapshot, OSII_BOOL include_unloaded_data, OSII_UINT64 & result_bytes ) = 0; > > > virtual OSII_RETCODE start_local() = 0; > virtual OSII_RETCODE stop_local() = 0; > virtual OSII_RETCODE restart_local( IHeartbeater * heartbeater ) = 0; > > > > > > virtual OSII_RETCODE check_jmx_connection( OSII_BOOL & conn_succeeded ) = 0; > virtual OSII_RETCODE is_gossip_running( OSII_BOOL & running ) = 0; > virtual OSII_RETCODE create_snapshot( const std::string & keyspace, const std::vector<std::string> & tables, const std::string & tagname ) = 0; > virtual OSII_RETCODE remove_snapshot(const std::string & keyspace, const std::string & tagname) = 0; > virtual OSII_RETCODE status_backup_local( OSII_BOOL & enabled ) = 0; > virtual OSII_RETCODE set_backup_local( OSII_BOOL enabled ) = 0; > virtual OSII_RETCODE flush_all_local_keyspaces() = 0; > virtual OSII_RETCODE flush_local_keyspaces( const std::vector< std::string > & keyspaces ) = 0; > virtual OSII_RETCODE refresh_table( const std::string & keyspace, const std::string & table ) = 0; > virtual OSII_RETCODE refresh_keyspace( const std::string & keyspace ) = 0; > virtual OSII_RETCODE get_cluster_schema_versions( std::map<std::string, std::vector<std::string>> & versions ) = 0; > virtual OSII_RETCODE get_unreachable_nodes( std::vector<std::string> & unreachable_nodes ) = 0; ># 507 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_cassandra/include/hsh_cassandra.h" >}; ># 3 "../include/ChronusUtil.h" 2 ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_mongo/include/hsh_mongo.h" 1 > > > > >class IMongoDocument >{ >public: > struct MongoTimestamp > { > uint32_t time_sec; > uint32_t increment; > }; > > virtual ~IMongoDocument(){} > > static IMongoDocument *new_document(); > static IMongoDocument *new_document_from_json(const OSII_UINT8 *data, size_t length); > static IMongoDocument *new_document_from_binary(const OSII_UINT8 *data, size_t length); > static IMongoDocument *create_fast_copy(const IMongoDocument *document); > static void destroy_document(const IMongoDocument *document); > > virtual OSII_RETCODE add_int32(const std::string &key, OSII_INT32 value) = 0; > virtual OSII_RETCODE add_uint32(const std::string &key, OSII_UINT32 value) = 0; > virtual OSII_RETCODE add_int64(const std::string &key, OSII_INT64 value) = 0; > virtual OSII_RETCODE add_uint64(const std::string &key, OSII_UINT64 value) = 0; > virtual OSII_RETCODE add_double(const std::string &key, OSII_DOUBLE value) = 0; > virtual OSII_RETCODE add_bool(const std::string &key, OSII_BOOL value) = 0; > virtual OSII_RETCODE add_string(const std::string &key, const std::string &value) = 0; > virtual OSII_RETCODE add_object_id(const std::string &key, const std::string &value) = 0; > virtual OSII_RETCODE add_date_time(const std::string& key, OSII_INT64 timestamp_ms) = 0; > virtual OSII_RETCODE add_timestamp(const std::string& key, const MongoTimestamp& timestamp) = 0; > virtual OSII_RETCODE add_document(const std::string &key, const IMongoDocument *value) = 0; > virtual OSII_RETCODE add_int32_list(const std::string &key, const std::vector<OSII_INT32> &value) = 0; > virtual OSII_RETCODE add_string_list(const std::string &key, const std::vector<std::string> &values) = 0; > virtual OSII_RETCODE add_document_list(const std::string &key, const std::vector<IMongoDocument *> &values) = 0; > virtual OSII_RETCODE add_dictionary(const std::string &key, const std::map<OSII_INT32, std::string> &value) = 0; > virtual OSII_RETCODE add_dictionary(const std::string &key, const std::map<std::string, std::string> &value) = 0; > virtual OSII_RETCODE add_dictionary(const std::string &key, const std::map<std::string, OSII_UINT32> &value) = 0; > virtual OSII_RETCODE add_dictionary(const std::string &key, const std::map<std::string, IGenericValue *> &value) = 0; > virtual OSII_RETCODE add_document_dictionary(const std::string &key, const std::map<std::string, IMongoDocument *> &value) = 0; > virtual OSII_RETCODE add_data(const std::string &key, const OSII_BYTE *data, size_t num_bytes) = 0; > virtual OSII_RETCODE remove_fields(const std::vector<std::string> &values) = 0; > > > > virtual OSII_RETCODE fetch_int32(const std::string &key, OSII_INT32 &value) const = 0; > virtual OSII_RETCODE fetch_uint32(const std::string &key, OSII_UINT32 &value) const = 0; > virtual OSII_RETCODE fetch_int64(const std::string &key, OSII_INT64 &value) const = 0; > virtual OSII_RETCODE fetch_uint64(const std::string &key, OSII_UINT64 &value) const = 0; > virtual OSII_RETCODE fetch_double(const std::string &key, OSII_DOUBLE &value) const = 0; > virtual OSII_RETCODE fetch_bool(const std::string &key, OSII_BOOL &value) const = 0; > virtual OSII_RETCODE fetch_string(const std::string &key, std::string &value) const = 0; > virtual OSII_RETCODE fetch_object_id(const std::string &key, std::string &value) const = 0; > virtual OSII_RETCODE fetch_date_time(const std::string &key, OSII_INT64 ×tamp_ms) const = 0; > virtual OSII_RETCODE fetch_timestamp(const std::string& key, MongoTimestamp& timestamp) const = 0; > > > virtual OSII_RETCODE fetch_int32_list(const std::string &key, std::vector<OSII_INT32> &value) const = 0; > virtual OSII_RETCODE fetch_uint32_list(const std::string &key, std::vector<OSII_UINT32> &value) const = 0; > virtual OSII_RETCODE fetch_string_list(const std::string &key, std::vector<std::string> &values) const = 0; > virtual OSII_RETCODE fetch_document_list(const std::string &key, std::vector<IMongoDocument *> &values) const = 0; > > > virtual OSII_RETCODE fetch_dictionary(const std::string &key, std::map<OSII_INT32, std::string> &values) const = 0; > virtual OSII_RETCODE fetch_dictionary(const std::string &key, std::map<std::string, std::string> &values) const = 0; > virtual OSII_RETCODE fetch_dictionary(const std::string &key, std::map<std::string, OSII_UINT32> &value) const = 0; > virtual OSII_RETCODE fetch_dictionary(const std::string &key, std::map<std::string, OSII_INT64> &value) const = 0; > virtual OSII_RETCODE fetch_dictionary(const std::string &key, std::map<std::string, IGenericValue *> &value) const = 0; > virtual OSII_RETCODE fetch_document_dictionary(const std::string &key, std::map<std::string, IMongoDocument *> &values) const = 0; > virtual OSII_RETCODE fetch_document_dictionary(const std::string &key, std::map<OSII_UINT32, IMongoDocument *> &values) const = 0; > > > virtual OSII_RETCODE fetch_document(const std::string &key, IMongoDocument *&value) const = 0; > virtual OSII_RETCODE fetch_data(const std::string &key, OSII_BYTE *data, size_t max_bytes) const = 0; > > virtual void destroy_retrieved_document(IMongoDocument *document) const = 0; > virtual void destroy_retrieved_document_list(std::vector<IMongoDocument *> &documents) const = 0; > virtual void destroy_retrieved_document_dictionary(std::map<std::string, IMongoDocument *> &documents) const = 0; > > virtual void print_json() const = 0; > virtual std::string to_json() const = 0; > > virtual const OSII_UINT8 *get_bson_data() const = 0; > virtual size_t get_bson_data_length() const = 0; > >}; > >class IMongoMutate >{ >public: > virtual ~IMongoMutate(){} > > static IMongoMutate *new_mutate(const std::string &database_name, const std::string &collection_name); > static void destroy_mutation(IMongoMutate *mutate); > > virtual OSII_RETCODE add_insert(const IMongoDocument *document) = 0; > virtual OSII_RETCODE add_update(const IMongoDocument *changes, const IMongoDocument *filter, OSII_BOOL replace_whole_document = 0, OSII_BOOL upsert = 0) = 0; > virtual OSII_RETCODE add_update(const IMongoDocument *changes, OSII_INT32 uid, OSII_BOOL replace_whole_document, OSII_BOOL upsert = 0) = 0; > virtual OSII_RETCODE add_update(const IMongoDocument *changes, OSII_UINT32 uid, OSII_BOOL replace_whole_document, OSII_BOOL upsert = 0) = 0; > virtual OSII_RETCODE add_update(const IMongoDocument *changes, OSII_INT64 uid, OSII_BOOL replace_whole_document, OSII_BOOL upsert = 0) = 0; > virtual OSII_RETCODE add_update(const IMongoDocument *changes, const std::string &uid, OSII_BOOL replace_whole_document, OSII_BOOL upsert = 0) = 0; > virtual OSII_RETCODE add_object_id_update(const IMongoDocument *changes, const std::string &oid, OSII_BOOL replace_whole_document) = 0; > virtual OSII_RETCODE add_delete(OSII_INT32 uid) = 0; > virtual OSII_RETCODE add_delete(OSII_UINT32 uid) = 0; > virtual OSII_RETCODE add_delete(OSII_INT64 uid) = 0; > virtual OSII_RETCODE add_delete(const std::string &uid) = 0; > virtual OSII_RETCODE add_delete(IMongoDocument *selection_doc) = 0; > virtual OSII_RETCODE add_unset(const IMongoDocument *changes, OSII_INT32 uid) = 0; > virtual OSII_RETCODE add_unset(const IMongoDocument *changes, OSII_UINT32 uid) = 0; > virtual OSII_RETCODE add_unset(const IMongoDocument *changes, OSII_INT64 uid) = 0; > virtual OSII_RETCODE add_unset(const IMongoDocument *changes, const std::string &uid) = 0; > virtual OSII_RETCODE add_unset(const IMongoDocument *changes, IMongoDocument *selection_doc) = 0; > > virtual size_t get_num_actions() const = 0; > virtual void reset() = 0; >}; > > >class IMongoChangeStream >{ >public: > > > > > > struct ChangeStreamOptions > { > ChangeStreamOptions() = default; > ~ChangeStreamOptions() = default; > > ChangeStreamOptions& set_max_wait(std::chrono::milliseconds max_wait) noexcept { _max_wait = max_wait; return *this; } > ChangeStreamOptions& set_full_document(bool fetch_full_document) noexcept { _full_document = fetch_full_document; return *this; } > > > std::chrono::milliseconds max_wait() const noexcept { return _max_wait; } > bool full_document() const noexcept { return _full_document; } > > private: > std::chrono::milliseconds _max_wait{ 1000 }; > bool _full_document = true; > }; > > > virtual ~IMongoChangeStream() = default; > > > virtual IMongoDocument *next_result(OSII_RETCODE &ret) = 0; >}; > > >class IMongoQueryResult >{ >public: > virtual ~IMongoQueryResult(){} > > > virtual IMongoDocument *next_result(OSII_RETCODE &ret) = 0; >}; > >class IMongoDB >{ >public: > static IMongoDB *new_mongo_interface(const ClusterConfig::DatacenterSettings *datacenter_settings); > static void destroy_mongo_interface(IMongoDB *mongodb); > > virtual ~IMongoDB(){} > > virtual OSII_BOOL is_connected() const = 0; > > virtual std::unique_ptr<IMongoChangeStream> create_change_stream(const std::string &db, > const std::string& collection, const IMongoChangeStream::ChangeStreamOptions& options = {}) = 0; > > > virtual OSII_RETCODE send_mutation(const IMongoMutate *mutate) = 0; > virtual OSII_RETCODE aggregation_query(const std::string &database_name, const std::string &collection_name, IMongoDocument *aggregation_expr, IMongoQueryResult *&result) = 0; > virtual OSII_RETCODE query(const std::string &database_name, const std::string &collection_name, const IMongoDocument *filter, const std::set<std::string> &fields, IMongoQueryResult *&result) = 0; > virtual OSII_RETCODE query(const std::string &database_name, const std::string &collection_name, const IMongoDocument *filter, IMongoQueryResult *&result) = 0; > virtual OSII_RETCODE query(const std::string &database_name, const std::string &collection_name, const std::set<std::string> &fields, IMongoQueryResult *&result) = 0; > virtual OSII_RETCODE query(const std::string &database_name, const std::string &collection_name, IMongoQueryResult *&result) = 0; > virtual OSII_RETCODE count(const std::string &database_name, const std::string &collection_name, OSII_INT32 &count) = 0; > virtual OSII_RETCODE drop(const std::string &database_name, const std::string &collection_name) = 0; > > virtual void destroy_query_result(IMongoQueryResult *result) = 0; > > virtual OSII_UINT32 get_mutation_timeout_ms() = 0; > > > virtual OSII_UINT32 get_query_page_timeout_ms() = 0; >}; ># 4 "../include/ChronusUtil.h" 2 ># 1 "../include/ChronusMongoSchema.h" 1 > > > >namespace ChronusGlobalsSchema >{ > const std::string COLLECTION_NAME = "globals"; > const std::string UNIQUE_FIELD = "_id"; > const std::string UID_RENAME_STATE = "uid_state"; > > enum UIDRenameGlobalState { > OPEN, > PREPARING, > READY, > COMMITTING, > }; >}; > >namespace ChronusVersionsSchema >{ > const std::string COLLECTION_NAME = "versions"; > > const std::string SCHEMA_VERSION = "_id"; > const std::string SCHEMA_TIMESTAMP = "schema_timestamp_ms"; >}; > >namespace ChronusEnumSchema >{ > const std::string COLLECTION_NAME = "enums"; > > const std::string COLS_ENUM_TABLE_NAME = "_id"; > const std::string COLS_ENUM_VALUE = "values"; > const std::string COLS_ENUM_UPDATE_TIME_US = "last_update_time_us"; >}; > >namespace ChronusLogSchema >{ > const std::string COLLECTION_NAME = "log_columns"; > > const std::string COLS_TABLE_NAME = "_id"; > const std::string COLS_COLUMNS = "columns"; > > const std::string COLS_COLUMN_NAME = "column_name"; > const std::string COLS_VALUE_TYPE = "value_type"; > > enum LogColumnValueType > { > LOG_VALUE_TYPE_INT = 1, > LOG_VALUE_TYPE_DOUBLE = 2, > LOG_VALUE_TYPE_STRING = 3, > LOG_VALUE_TYPE_TIME = 4, > LOG_VALUE_TYPE_FLOAT = 5, > LOG_VALUE_TYPE_UINT = 6, > }; > > const std::string HSH_4_INTERNAL_ALARMS_LOG_NAME = "ALARMS"; > const std::string HSH_4_INTERNAL_EVENTS_LOG_NAME = "EVENTS"; > const std::string HSH_4_INTERNAL_SOES_LOG_NAME = "SOES"; > > const std::string HSH_4_INTERNAL_COL_ALARM_KEY = "osi_key"; > const std::string HSH_4_INTERNAL_COL_ALARM_ORIGIN = "origin"; > const std::string HSH_4_INTERNAL_COL_ALARM_EVENT_TIMESTAMP = "event_time"; > const std::string HSH_4_INTERNAL_COL_ALARM_MESSAGE = "message"; > const std::string HSH_4_INTERNAL_COL_ALARM_SEVERITY = "severity"; > const std::string HSH_4_INTERNAL_COL_ALARM_ALARM_ID = "alarm_id"; > const std::string HSH_4_INTERNAL_COL_ALARM_ALARM_TYPE = "alarm_type"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR = "area"; > const std::string HSH_4_INTERNAL_COL_ALARM_ATTACHMENT = "attachment"; > const std::string HSH_4_INTERNAL_COL_ALARM_POINT_NAME = "point_name"; > const std::string HSH_4_INTERNAL_COL_ALARM_STATIONID = "station"; > const std::string HSH_4_INTERNAL_COL_ALARM_FLAG = "flag"; > const std::string HSH_4_INTERNAL_COL_ALARM_CLASS = "class"; > const std::string HSH_4_INTERNAL_COL_ALARM_SITEID = "SiteID"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR_MASK1 = "aor_mask1"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR_MASK2 = "aor_mask2"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR_MASK3 = "aor_mask3"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR_MASK4 = "aor_mask4"; > const std::string HSH_4_INTERNAL_COL_ALARM_AOR_GROUP = "aor_group"; > const std::string HSH_4_INTERNAL_COL_ALARM_EQUIPMENT_TYPE = "equipment_type"; > const std::string HSH_4_INTERNAL_COL_ALARM_P_EQUIPMENT_TYPE = "p_equipment_type"; > const std::string HSH_4_INTERNAL_COL_ALARM_STRING_VALUE = "value"; > const std::string HSH_4_INTERNAL_COL_ALARM_VALUE = "nvalue"; > > const std::string HSH_4_INTERNAL_COL_EVENT_KEY = "osi_key"; > const std::string HSH_4_INTERNAL_COL_EVENT_ORIGIN = "origin"; > const std::string HSH_4_INTERNAL_COL_EVENT_EVENT_TIMESTAMP = "event_time"; > const std::string HSH_4_INTERNAL_COL_EVENT_MESSAGE = "message"; > const std::string HSH_4_INTERNAL_COL_EVENT_SEVERITY = "severity"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR = "area"; > const std::string HSH_4_INTERNAL_COL_EVENT_ATTACHMENT = "attachment"; > const std::string HSH_4_INTERNAL_COL_EVENT_POINT_NAME = "point_name"; > const std::string HSH_4_INTERNAL_COL_EVENT_STATIONID = "station"; > const std::string HSH_4_INTERNAL_COL_EVENT_CLASS = "class"; > const std::string HSH_4_INTERNAL_COL_EVENT_SITEID = "SiteID"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR_MASK1 = "aor_mask1"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR_MASK2 = "aor_mask2"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR_MASK3 = "aor_mask3"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR_MASK4 = "aor_mask4"; > const std::string HSH_4_INTERNAL_COL_EVENT_AOR_GROUP = "aor_group"; > const std::string HSH_4_INTERNAL_COL_EVENT_EQUIPMENT_TYPE = "equipment_type"; > const std::string HSH_4_INTERNAL_COL_EVENT_P_EQUIPMENT_TYPE = "p_equipment_type"; > const std::string HSH_4_INTERNAL_COL_EVENT_STRING_VALUE = "value"; > const std::string HSH_4_INTERNAL_COL_EVENT_VALUE = "nvalue"; > > const std::string HSH_4_INTERNAL_COL_SOE_KEY = "osi_key"; > const std::string HSH_4_INTERNAL_COL_SOE_STATION_NAME = "station_name"; > const std::string HSH_4_INTERNAL_COL_SOE_RX_TIME = "rx_time"; > const std::string HSH_4_INTERNAL_COL_SOE_POINT_NAME = "point_name"; > const std::string HSH_4_INTERNAL_COL_SOE_SITEID = "SiteID"; > const std::string HSH_4_INTERNAL_COL_SOE_TIME_QUALITY = "timequality"; > const std::string HSH_4_INTERNAL_COL_SOE_SCAN_QUALITY = "scanquality"; > const std::string HSH_4_INTERNAL_COL_SOE_VALUE = "state_text"; >}; > > >namespace ChronusStreamSchema >{ > const std::string COLLECTION_NAME = "streams"; > > const std::string CPID = "_id"; > const std::string UPGRADE_CPID = "upgrade_cpid"; > const std::string UID = "uid"; > const std::string DESIRED_UID = "desired_uid"; > const std::string COMMENT = "comment"; > const std::string DESIRED_COMMENT = "desired_comment"; > const std::string CURRENT_STATE = "current_state"; > const std::string STREAM_TYPE = "stream_type"; > const std::string VALUE_TYPE = "value_type"; > const std::string RECORDING_ID = "recording_id"; > const std::string STREAM_SET_ID = "stream_set_id"; > const std::string ENUM_TABLE_ID = "enum_table_id"; > const std::string SECURITY_GROUPS = "security_groups"; > const std::string SUPPORTING_DATA = "supporting_data"; > const std::string LAST_CHANGE = "last_change"; > const std::string STEP = "step"; > const std::string PURGED = "purged"; > > const std::string INTEGRITY_TIME = "integrity_time"; > > const std::string PERIOD = "period"; > const std::string METRIC = "metric"; > const std::string HOST = "host"; > const std::string PROCESS_NAME = "process_name"; >}; > >namespace ChronusGroupSchema >{ > const std::string COLLECTION_NAME = "groups"; > > const std::string CPID = "_id"; > const std::string UPGRADE_CPID = "upgrade_cpid"; > const std::string UID = "uid"; > const std::string RECORDING_ID = "recording_id"; > const std::string DESIRED_UID = "desired_uid"; > const std::string COMMENT = "comment"; > const std::string DESIRED_COMMENT = "desired_comment"; > const std::string CURRENT_STATE = "current_state"; > const std::string GROUP_TYPE = "group_type"; > const std::string GROUP_SET_ID = "group_set_id"; > const std::string LAST_CHANGE = "last_change"; > const std::string STEP = "step"; > const std::string PURGED = "purged"; > const std::string PURGED_CPIDS = "purged_cpids"; > > const std::string INTEGRITY_TIME = "integrity_time"; > > const std::string PERIOD = "period"; > > const std::string VALUE_TYPE = "value_type"; > const std::string GROUPED_UID = "uid"; > const std::string GROUPED_RECORDING_ID = "recording_id"; > const std::string STREAM_SET_ID = "stream_set_id"; > const std::string ENUM_TABLE_ID = "enum_table_id"; > const std::string SECURITY_GROUPS = "security_groups"; > const std::string SUPPORTING_DATA = "supporting_data"; > const std::string MEMBERS = "members"; >}; ># 5 "../include/ChronusUtil.h" 2 > > >static const std::string CASSANDRA_NETWORK_TOPOLOGY_STRATEGY_CLASSPATH = "org.apache.cassandra.locator.NetworkTopologyStrategy"; >static const std::string CASSANDRA_NETWORK_TOPOLOGY_STRATEGY_CLASS = "NetworkTopologyStrategy"; > >class ChronusUtil >{ >public: > struct AOR_transition_data { > OSII_INT64 aor_start; > OSII_INT64 aor_end; > }; > >private: > class ReplicationFactor { > private: > static MempoolClassAllocatorNoDeepCopy<ReplicationFactor> allocator; > ReplicationFactor(const ReplicationFactor&) = delete; ReplicationFactor& operator=(const ReplicationFactor&) = delete; ReplicationFactor(ReplicationFactor&&) = delete;; > explicit ReplicationFactor(const std::map<std::string, std::string> &replication) : replication(replication) {} > > std::map<std::string, std::string> replication; > > public: > static ReplicationFactor *create(const std::map<std::string, std::string> &replication) { > { void *ret_val = (allocator).create_no_construct(); if (__null == ret_val) {return __null;} try {return new (ret_val) ReplicationFactor(replication);} catch (std::exception &e) { HSHLogger::LOG("CreationError: %s", "../include/ChronusUtil.h", 29, e.what() ); (allocator).destroy_no_destruct((ReplicationFactor *)ret_val); return __null; } }; > } > static void destroy(ReplicationFactor *val) { > allocator.destroy(val); > } > > const std::map<std::string, std::string> &get_replication() const { return replication; } > }; > > static OSII_RETCODE keyspace_replication_parser(void * user_data, const ICassRow * cass_row, ReplicationFactor *&rep_factor) > { > try { > std::map<std::string, std::string> rep_map; > cass_row->decode_cell_map("replication", rep_map); > rep_factor = ReplicationFactor::create(rep_map); > } > catch (HSHException &ex) { > HSHLogger::LOG("Failed to create a ReplicationFactor: %s", "../include/ChronusUtil.h", 46, ex.what() ); > return (( OSII_RETCODE )0); > } > catch (std::bad_alloc &ex) { > HSHLogger::LOG("Alloc Error: failed to allocate a ReplicationFactor: %s", "../include/ChronusUtil.h", 50, ex.what() ); > return (( OSII_RETCODE )0); > } > > return (( OSII_RETCODE )1); > } > > static void destroy_keyspace_replication(void * user_data, ReplicationFactor * rep_factor) > { > if (__null != rep_factor) { > ReplicationFactor::destroy(rep_factor); > } > } > >public: > static OSII_RETCODE get_keyspace_rf(ICassandraConnection *cass, const std::string &keyspace, const std::string &dc, OSII_INT64 &rf_result) > { > OSII_RETCODE ret; > const std::string query = "SELECT replication from system_schema.keyspaces WHERE keyspace_name = '" + keyspace + "';"; > > ICassandraQueryStatement * statement = __null; > if ((( OSII_RETCODE )1) != (ret = cass->create_statement(query, statement))) { > HSHLogger::LOG("Failed to create an ICassandraQueryStatement", "../include/ChronusUtil.h", 72 ); > return ret; > } > > std::vector<ReplicationFactor *> results; > std::map<std::string, std::string> replication; > CassandraNonpagingQuery<ReplicationFactor> rep_query(cass, statement, __null, keyspace_replication_parser, destroy_keyspace_replication); > statement = __null; > if ((( OSII_RETCODE )1) != (ret = rep_query.get_results(&results))) { > HSHLogger::LOG("Replication Factor query failed", "../include/ChronusUtil.h", 81 ); > return ret; > } > > for (auto &rep_itr : results) { > replication.insert(rep_itr->get_replication().begin(), rep_itr->get_replication().end()); > destroy_keyspace_replication(__null, rep_itr); > } > > auto class_itr = replication.find("class"); > auto dc_itr = replication.find(dc); > if (replication.end() == class_itr || > (class_itr->second != CASSANDRA_NETWORK_TOPOLOGY_STRATEGY_CLASSPATH && class_itr->second != CASSANDRA_NETWORK_TOPOLOGY_STRATEGY_CLASS) || > replication.end() == dc_itr || > dc_itr->second.find_first_not_of("0123456789") != std::string::npos) > { > HSHLogger::LOG("Failed to get replication data for keyspace %s", "../include/ChronusUtil.h", 97, keyspace.c_str() ); > return (( OSII_RETCODE )0); > } > rf_result = atoi(dc_itr->second.c_str()); > return (( OSII_RETCODE )1); > } > > static OSII_RETCODE set_keyspace_rf(ICassandraConnection *cass, const std::string &keyspace, const std::string &dc, OSII_INT64 rf_target) > { > OSII_RETCODE ret; > std::string query = "SELECT replication from system_schema.keyspaces WHERE keyspace_name = '" + keyspace + "';"; > > ICassandraQueryStatement * statement = __null; > if ((( OSII_RETCODE )1) != (ret = cass->create_statement(query, statement))) { > HSHLogger::LOG("Failed to create an ICassandraQueryStatement", "../include/ChronusUtil.h", 111 ); > return ret; > } > > std::map<std::string, std::string> replication; > > std::vector<ReplicationFactor *> results; > CassandraNonpagingQuery<ReplicationFactor> rep_query(cass, statement, __null, keyspace_replication_parser, destroy_keyspace_replication); > statement = __null; > if ((( OSII_RETCODE )1) != (ret = rep_query.get_results(&results))) { > HSHLogger::LOG("Keyspace query failed", "../include/ChronusUtil.h", 121 ); > return ret; > } > > for (std::vector<ReplicationFactor *>::iterator rep_itr = results.begin(); rep_itr != results.end(); ++rep_itr) { > replication.insert((*rep_itr)->get_replication().begin(), (*rep_itr)->get_replication().end()); > destroy_keyspace_replication(__null, *rep_itr); > } > > if ((replication.find("class") == replication.end()) || > (replication["class"] != "org.apache.cassandra.locator.NetworkTopologyStrategy") || > (replication.find(dc) == replication.end()) || > (replication[dc].find_first_not_of(" 0123456789") != std::string::npos)) > { > HSHLogger::LOG("Error...", "../include/ChronusUtil.h", 135 ); > return (( OSII_RETCODE )0); > } > else { > replication[dc] = std::to_string(rf_target); > } > > query.assign("ALTER KEYSPACE \"" + keyspace + "\" WITH replication = { "); > bool first = true; > for (std::map<std::string, std::string>::iterator iter = replication.begin(); iter != replication.end(); ++iter) { > if (!first) { > query.append(", "); > } > else { > first = false; > } > query.append("'" + iter->first + "': '" + iter->second + "' "); > } > query.append("};"); > > ICassandraQueryStatement * alter_statement = __null; > if ((( OSII_RETCODE )1) != (ret = cass->create_statement(query, alter_statement))) { > HSHLogger::LOG("Failed to create statement", "../include/ChronusUtil.h", 157 ); > return ret; > } > > IQueryResults * result = cass->perform_query(alter_statement); > cass->destroy_statement(alter_statement); > alter_statement = __null; > > if (__null == result) { > HSHLogger::LOG("Alter keyspace replication failed", "../include/ChronusUtil.h", 166 ); > return (( OSII_RETCODE )0); > } > > if ((( OSII_RETCODE )1) != result->get_retcode()) { > HSHLogger::LOG("Alter keyspace replication failed", "../include/ChronusUtil.h", 171 ); > cass->destroy_query_results(result); > return (( OSII_RETCODE )0); > } > cass->destroy_query_results(result); > result = __null; > > return (( OSII_RETCODE )1); > } > >private: > ChronusUtil() = delete; > ChronusUtil(const ChronusUtil&) = delete; ChronusUtil& operator=(const ChronusUtil&) = delete; ChronusUtil(ChronusUtil&&) = delete; > > static ChronusMutex transition_times_mutex; > static ChronusMutex metrics_epoch_mutex; > static ChronusMutex aor_mutex; > static std::map<std::string, OSII_BOOL> hsh_3_keyspaces; > static std::map<std::string, OSII_INT64> timeseries_2_transition_times_sec; > static std::map<std::string, OSII_INT64> YYYYMM_transition_times_sec; > static std::map<std::string, std::string> metrics_epoch_keyspace_prefixes; > static std::map<std::string, struct ChronusUtil::AOR_transition_data> aor_transition_data; > >private: > static const char (&GET_HEX_VALUES())[16] > { > static const char hex_values[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' }; > return hex_values; > } > >public: > static const OSII_INT64 HOURLY_BUCKET_SIZE_SEC = 3600; > static const OSII_INT64 DAILY_BUCKET_SIZE_SEC = 86400; > static const OSII_INT64 REF_WRITE_FREQUENCY_SEC = 3600; > static const OSII_INT64 REFERENCE_WRITE_GRACE_PERIOD_SEC = 120; > > const static OSII_INT64 CURRENT_CDS_SCHEMA_VERSION = 0x04040200; > const static OSII_INT64 CURRENT_MONTHLY_SCHEMA_VERSION = 0x04080100; > > > const static OSII_INT64 METRICS_STANDALONE_KEYSPACE_CDS_VERSION = 6; > > const static OSII_INT64 YYYYMM_TRANSITION_VERSION = 0x03000000; > const static OSII_INT64 AOR_MASK_TRANSITION_VERSION = 0x03000b00; > const static OSII_INT64 AOR_MASK_MIN_VERSION = 0x03000000; > > const static OSII_INT64 LAST_HSH3_CDS_SCHEMA_VERSION = 0x03000b00; > const static OSII_INT64 LAST_HSH3_MONTHLY_SCHEMA_VERSION = 0x03010000; > > static __attribute__((always_inline)) int split_factor(OSII_INT64 cpid) { return (int)((cpid % 9) + 1); } > > static std::string get_mongo_db_name(const std::string &cds_name) { return "CDS_DATA_" + cds_name; } > > static OSII_INT64 get_time_sec_from_year_and_month(OSII_INT32 year, OSII_INT32 month) { > struct tm tm_data = { 0 }; > tm_data.tm_mday = 1; > tm_data.tm_mon = month - 1; > tm_data.tm_year = year - 1900; > return osii_mkgmtime(&tm_data); > } > > static OSII_RETCODE get_time_sec_from_month_year(OSII_INT32 month, OSII_INT32 year, OSII_INT64 &time_sec) { > struct tm time_str = { 0 }; > time_str.tm_mday = 1; > time_str.tm_mon = month - 1; > time_str.tm_year = year - 1900; > time_sec = osii_mkgmtime(&time_str); > return (( OSII_RETCODE )1); > } > > static std::string get_YYYYMM_str_from_sec(time_t time_s, OSII_INT32 month_offset) { > > struct tm time_str = { 0 }; > time_t time_sec = (time_t)time_s; > ( gmtime_r( ( &time_sec ), ( &time_str ) ) == __null ? 1 : 0 ); > > OSII_INT32 month = time_str.tm_mon + 1; > OSII_INT32 year = time_str.tm_year + 1900; > month += month_offset; > while (month > 12) { > month -= 12; > year++; > } > while (month < 1) { > month += 12; > year--; > } > > OSII_CHAR buffer[7]; > osii_snprintf(buffer, 7, "%04d%02d", year, month); > return buffer; > } > > static OSII_RETCODE get_time_sec_from_YYYYMM(const std::string &YYYYMM_str, OSII_INT64 &time_sec) { > OSII_INT32 month = 0; > OSII_INT32 year = 0; > if (YYYYMM_str.size() != 6 || 0 == (month = atoi(YYYYMM_str.substr(4, 2).c_str())) || 0 == (year = atoi(YYYYMM_str.substr(0, 4).c_str()))) { > HSHLogger::TRACE("Invalid date format %s", YYYYMM_str.c_str() ); > return (( OSII_RETCODE )0); > } > > return get_time_sec_from_month_year(month, year, time_sec); > } > > static OSII_INT64 get_offset_time_sec_from_time_sec(OSII_INT64 initial_time_sec, OSII_INT32 month_offset) { > OSII_INT64 ret_time_sec; > get_time_sec_from_YYYYMM(get_YYYYMM_str_from_sec(initial_time_sec, month_offset), ret_time_sec); > return ret_time_sec; > } > > > static OSII_INT64 get_utc_bucket_sec_from_sec(OSII_INT64 time_sec, OSII_INT64 bucket_size_sec) { return time_sec - (time_sec % bucket_size_sec); } > > static OSII_INT64 get_next_utc_bucket_sec_from_sec(OSII_INT64 time_sec, OSII_INT64 bucket_size_sec) { return time_sec - (time_sec % bucket_size_sec) + bucket_size_sec; } > > static OSII_INT64 get_previous_utc_bucket_sec_from_sec(OSII_INT64 time_sec, OSII_INT64 bucket_size_sec) { return time_sec - (time_sec % bucket_size_sec) - bucket_size_sec; } > > static OSII_INT64 get_top_of_month_sec(time_t time_s, OSII_INT32 month_offset) { > struct tm time_str = { 0 }; > time_t time_sec = (time_t)time_s; > ( gmtime_r( ( &time_sec ), ( &time_str ) ) == __null ? 1 : 0 ); > > OSII_INT32 month = time_str.tm_mon + 1; > OSII_INT32 year = time_str.tm_year + 1900; > month += month_offset; > while (month > 12) { > month -= 12; > year++; > } > while (month < 1) { > month += 12; > year--; > } > > OSII_INT64 ret_time; > get_time_sec_from_month_year(month, year, ret_time); > return ret_time; > } > > > > static std::string get_monthly_keyspace_name_from_time_sec(const std::string &cds, OSII_INT64 time_sec, OSII_INT64 YYYYMM_transition_time_sec) { > return (time_sec >= YYYYMM_transition_time_sec ? get_monthly_keyspace_name_YYYYMM_from_sec(cds, time_sec) : get_monthly_point_keyspace_name_epoch_from_time_sec(cds, time_sec)); > } > > static std::string get_monthly_metric_keyspace_name_epoch_from_time_sec(const std::string &cds, OSII_INT64 start_time_sec, const std::string &keyspace_prefix) { > OSII_CHAR buffer[256]; > osii_snprintf(buffer, sizeof(buffer), "%s_%s_%lld", keyspace_prefix.c_str(), cds.c_str(), top_of_month_sec(start_time_sec)); > return buffer; > } > > static std::string get_monthly_keyspace_name_YYYYMM_from_sec(const std::string &cds, OSII_INT64 time_sec) { > OSII_CHAR buffer[256]; > osii_snprintf(buffer, sizeof(buffer), "CHRONUS_%s_%s", cds.c_str(), ChronusUtil::get_YYYYMM_str_from_sec(time_sec, 0).c_str()); > return buffer; > } > > static OSII_INT64 top_of_month_sec(OSII_INT64 time_sec) > { > time_t t = (time_t)time_sec; > struct tm dayTm; > > if (0 != ( gmtime_r( ( &t ), ( &dayTm ) ) == __null ? 1 : 0 )) { > return 0; > } > > dayTm.tm_hour = 0; > dayTm.tm_min = 0; > dayTm.tm_sec = 0; > dayTm.tm_mday = 1; > > return osii_mkgmtime(&dayTm); > } > > static std::string get_monthly_point_keyspace_name_epoch_from_time_sec(const std::string &cds, OSII_INT64 time_sec) { > OSII_CHAR buffer[256]; > osii_snprintf(buffer, sizeof(buffer), "CHRONUS_%s_%lld", cds.c_str(), top_of_month_sec(time_sec)); > return buffer; > } > > static OSII_BOOL is_cds_keyspace_name(const std::string &keyspace_name, std::string &keyspace_cds) { > if (0 != keyspace_name.compare(0, 8, "CHRONUS_")) { > return 0; > } > > if (keyspace_name.find("_", 8) != std::string::npos) { > return 0; > } > keyspace_cds = keyspace_name.substr(8, keyspace_name.size() - 8); > > return 1; > } > > static OSII_BOOL is_monthly_point_keyspace_name_sec(const std::string &keyspace_name, std::string &keyspace_cds, OSII_BOOL &is_YYYYMM, OSII_INT64 &time_sec) { > if (0 != keyspace_name.compare(0, 8, "CHRONUS_")) { > return 0; > } > OSII_INT32 second_underscore_index = 8 + (OSII_INT32)keyspace_name.substr(8).find_last_of("_"); > if (second_underscore_index == std::string::npos) { > return 0; > } > keyspace_cds = keyspace_name.substr(8, second_underscore_index - 8); > > OSII_INT32 num_digits = (OSII_INT32)(keyspace_name.size() - second_underscore_index - 1); > if (num_digits == 6) { > is_YYYYMM = 1; > time_sec = get_time_sec_from_year_and_month(atoi(keyspace_name.substr(second_underscore_index + 1, 4).c_str()), atoi(keyspace_name.substr(second_underscore_index + 5, 2).c_str())); > return 1; > } > if (num_digits == 13) { > is_YYYYMM = 0; > time_sec = atoll(keyspace_name.substr(second_underscore_index + 1, 13).c_str()) / 1000; > return 1; > } > return 0; > } > > static OSII_BOOL is_monthly_metric_keyspace_name_sec(const std::string &keyspace_name, std::string &keyspace_cds, OSII_BOOL &is_YYYYMM, OSII_INT64 &time_sec) { > if (0 != keyspace_name.compare(0, 7, "METRIC_")) { > return 0; > } > OSII_INT32 second_underscore_index = 7 + (OSII_INT32)keyspace_name.substr(7).find_last_of("_"); > if (second_underscore_index == std::string::npos) { > return 0; > } > keyspace_cds = keyspace_name.substr(7, second_underscore_index - 7); > > OSII_INT32 num_digits = (OSII_INT32)(keyspace_name.size() - second_underscore_index - 1); > if (num_digits == 6) { > is_YYYYMM = 1; > time_sec = get_time_sec_from_year_and_month(atoi(keyspace_name.substr(second_underscore_index + 1, 4).c_str()), atoi(keyspace_name.substr(second_underscore_index + 5, 2).c_str())); > return 1; > } > if (num_digits == 13) { > is_YYYYMM = 0; > time_sec = atoll(keyspace_name.substr(second_underscore_index + 1, 13).c_str()) / 1000; > return 1; > } > return 0; > } > > static OSII_RETCODE is_hsh_3_monthly_keyspace(const std::string &keyspace, OSII_BOOL &is_hsh_3_keyspace, ICassandraConnection *connection) { > transition_times_mutex.wait(); > auto keyspace_itr = hsh_3_keyspaces.find(keyspace); > if (keyspace_itr != hsh_3_keyspaces.end()) { > is_hsh_3_keyspace = keyspace_itr->second; > transition_times_mutex.notify(); > return (( OSII_RETCODE )1); > } > transition_times_mutex.notify(); > > if (!connection->does_keyspace_exist(keyspace)) { > HSHLogger::LOG("Unknown keyspace %s", "../include/ChronusUtil.h", 423, keyspace.c_str() ); > return (( OSII_RETCODE )0); > } > > > OSII_CHAR query[256]; > osii_snprintf(query, sizeof(query), "SELECT schema_timestamp, version from \"%s\".schema_version", keyspace.c_str()); > > ICassandraQueryStatement * query_s = __null; > if ((( OSII_RETCODE )1) != connection->create_statement(query, query_s)) { > HSHLogger::LOG("Failed to create an ICassandraQueryStatement", "../include/ChronusUtil.h", 433 ); > return (( OSII_RETCODE )0); > } > > > IQueryResults * result = connection->perform_query(query_s); > connection->destroy_statement(query_s); > query_s = __null; > if (__null == result) { > HSHLogger::LOG("Cassandra Query Failed.", "../include/ChronusUtil.h", 442 ); > return (( OSII_RETCODE )0); > } > > if ((( OSII_RETCODE )1) != result->get_retcode()) { > HSHLogger::LOG("select columns query failed - %d", "../include/ChronusUtil.h", 447, result->get_retcode() ); > return (( OSII_RETCODE )0); > } > > > is_hsh_3_keyspace = 0; > ICassRow * row = __null; > while (__null != (row = result->get_next_row())) { > if (row->decode_cell_varint("version") <= LAST_HSH3_MONTHLY_SCHEMA_VERSION) { > is_hsh_3_keyspace = 1; > break; > } > } > connection->destroy_query_results(result); > > transition_times_mutex.wait(); > hsh_3_keyspaces[keyspace] = is_hsh_3_keyspace; > transition_times_mutex.notify(); > return (( OSII_RETCODE )1); > } > > static OSII_INT64 get_monthly_schema_version(const std::string &keyspace, ICassandraConnection *connection) { > if ( !connection->does_keyspace_exist(keyspace) ) { > > return -1; > } > > > OSII_CHAR query[256]; > osii_snprintf(query, sizeof(query), "SELECT schema_timestamp, version from \"%s\".schema_version", keyspace.c_str()); > > ICassandraQueryStatement * query_s = __null; > if ((( OSII_RETCODE )1) != connection->create_statement(query, query_s)) { > HSHLogger::LOG("Failed to create an ICassandraQueryStatement", "../include/ChronusUtil.h", 480 ); > return -1; > } > > > IQueryResults * result = connection->perform_query(query_s); > connection->destroy_statement(query_s); > query_s = __null; > if (__null == result) { > HSHLogger::LOG("Cassandra Query Failed.", "../include/ChronusUtil.h", 489 ); > return -1; > } > > if ((( OSII_RETCODE )1) != result->get_retcode()) { > HSHLogger::LOG("select columns query failed - %d", "../include/ChronusUtil.h", 494, result->get_retcode() ); > return -1; > } > > > OSII_INT64 version = -1; > OSII_INT64 timestamp = -1; > ICassRow * row = __null; > while (__null != (row = result->get_next_row())) { > OSII_INT64 row_version = row->decode_cell_varint("version"); > if (row_version > version) { > timestamp = row->decode_cell_int64("schema_timestamp"); > version = row_version; > } > } > connection->destroy_query_results(result); > > return version; > } > > static OSII_RETCODE get_YYYYMM_transition_time_sec(const std::string &cds_name, OSII_INT64 &YYYYMM_transition_time_sec, IMongoDB *mongo_db) > { > transition_times_mutex.wait(); > std::map<std::string, OSII_INT64>::iterator cds_itr = YYYYMM_transition_times_sec.find(cds_name); > if (cds_itr != YYYYMM_transition_times_sec.end()) { > YYYYMM_transition_time_sec = cds_itr->second; > transition_times_mutex.notify(); > return (( OSII_RETCODE )1); > } > transition_times_mutex.notify(); > > YYYYMM_transition_time_sec = 0; > > IMongoQueryResult* result; > OSII_RETCODE query_ret = mongo_db->query(get_mongo_db_name(cds_name), ChronusVersionsSchema::COLLECTION_NAME, result); > if (((OSII_RETCODE)0xEFFF0010) == query_ret) { > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 530 ); > return query_ret; > } > > OSII_INT64 lowest_recorded_YYYYMM_version = -1; > OSII_INT64 lowest_recorded_YYYYMM_version_time_sec = 0; > IMongoDocument* doc; > while (__null != (doc = result->next_result(query_ret))) { > OSII_INT64 row_version; > OSII_INT64 schema_timestamp; > > if ((( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_VERSION, row_version) > || (( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_TIMESTAMP, schema_timestamp)) > { > mongo_db->destroy_query_result(result); > IMongoDocument::destroy_document(doc); > doc = __null; > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 547 ); > return (( OSII_RETCODE )0); > } > > if (row_version >= YYYYMM_TRANSITION_VERSION && row_version <= LAST_HSH3_CDS_SCHEMA_VERSION && (row_version < lowest_recorded_YYYYMM_version || lowest_recorded_YYYYMM_version == -1)) { > > lowest_recorded_YYYYMM_version = row_version; > lowest_recorded_YYYYMM_version_time_sec = schema_timestamp / 1000; > } > > IMongoDocument::destroy_document(doc); > doc = __null; > } > > mongo_db->destroy_query_result(result); > result = __null; > > > > > > > > if (lowest_recorded_YYYYMM_version == -1) { > YYYYMM_transition_time_sec = 0; > } > else { > YYYYMM_transition_time_sec = get_offset_time_sec_from_time_sec( > lowest_recorded_YYYYMM_version_time_sec, > (lowest_recorded_YYYYMM_version_time_sec == top_of_month_sec(lowest_recorded_YYYYMM_version_time_sec) ? 0 : 1) > ); > } > > transition_times_mutex.wait(); > YYYYMM_transition_times_sec[cds_name] = YYYYMM_transition_time_sec; > transition_times_mutex.notify(); > > return (( OSII_RETCODE )1); > } > > static OSII_RETCODE get_timeseries2_transition_time_sec(const std::string &cds, OSII_INT64 ×eries_2_transition_time_sec, IMongoDB *mongo_db) { > transition_times_mutex.wait(); > std::map<std::string, OSII_INT64>::iterator cds_itr = timeseries_2_transition_times_sec.find(cds); > if (cds_itr != timeseries_2_transition_times_sec.end()) { > timeseries_2_transition_time_sec = cds_itr->second; > transition_times_mutex.notify(); > return (( OSII_RETCODE )1); > } > transition_times_mutex.notify(); > > IMongoQueryResult* result; > OSII_RETCODE query_ret = mongo_db->query(get_mongo_db_name(cds), ChronusVersionsSchema::COLLECTION_NAME, result); > if (((OSII_RETCODE)0xEFFF0010) == query_ret) { > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 600 ); > return query_ret; > } > > OSII_INT64 lowest_recorded_version = -1; > OSII_INT64 lowest_recorded_version_time_sec = 0; > IMongoDocument* doc; > while (__null != (doc = result->next_result(query_ret))) { > OSII_INT64 row_version; > OSII_INT64 schema_timestamp; > > if ((( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_VERSION, row_version) > || (( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_TIMESTAMP, schema_timestamp)) > { > mongo_db->destroy_query_result(result); > IMongoDocument::destroy_document(doc); > doc = __null; > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 617 ); > return (( OSII_RETCODE )0); > } > > if (row_version < lowest_recorded_version || lowest_recorded_version == -1) { > lowest_recorded_version = row_version; > lowest_recorded_version_time_sec = schema_timestamp / 1000; > } > > IMongoDocument::destroy_document(doc); > doc = __null; > } > > mongo_db->destroy_query_result(result); > result = __null; > > > > > > > if (lowest_recorded_version == -1) { > timeseries_2_transition_time_sec = 0; > } > else { > timeseries_2_transition_time_sec = get_utc_bucket_sec_from_sec(lowest_recorded_version_time_sec, ChronusUtil::DAILY_BUCKET_SIZE_SEC); > } > > transition_times_mutex.wait(); > timeseries_2_transition_times_sec[cds] = timeseries_2_transition_time_sec; > transition_times_mutex.notify(); > > return (( OSII_RETCODE )1); > } > > static OSII_RETCODE get_metrics_epoch_prefix(const std::string &cds, std::string &metrics_prefix, IMongoDB *mongo_db) { > metrics_epoch_mutex.wait(); > std::map<std::string, std::string>::iterator cds_itr = metrics_epoch_keyspace_prefixes.find(cds); > if (cds_itr != metrics_epoch_keyspace_prefixes.end()) { > metrics_prefix.assign(cds_itr->second); > metrics_epoch_mutex.notify(); > return (( OSII_RETCODE )1); > } > metrics_epoch_mutex.notify(); > > IMongoQueryResult* result; > OSII_RETCODE query_ret = mongo_db->query(get_mongo_db_name(cds), ChronusVersionsSchema::COLLECTION_NAME, result); > if (((OSII_RETCODE)0xEFFF0010) == query_ret) { > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 665 ); > return query_ret; > } > > OSII_BOOL found_metrics_prefix_version = 0; > IMongoDocument* doc; > while (__null != (doc = result->next_result(query_ret))) { > OSII_INT64 row_version; > OSII_INT64 schema_timestamp; > > if ((( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_VERSION, row_version) > || (( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_TIMESTAMP, schema_timestamp)) > { > mongo_db->destroy_query_result(result); > IMongoDocument::destroy_document(doc); > doc = __null; > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 681 ); > return (( OSII_RETCODE )0); > } > > if (row_version == METRICS_STANDALONE_KEYSPACE_CDS_VERSION) { > found_metrics_prefix_version = 1; > IMongoDocument::destroy_document(doc); > doc = __null; > break; > } > > IMongoDocument::destroy_document(doc); > doc = __null; > } > > mongo_db->destroy_query_result(result); > result = __null; > > metrics_epoch_mutex.wait(); > metrics_prefix = metrics_epoch_keyspace_prefixes[cds] = found_metrics_prefix_version ? "METRICS" : "CHRONUS"; > metrics_epoch_mutex.notify(); > > return (( OSII_RETCODE )1); > } > > static OSII_RETCODE get_aor_transition_time_ms(const std::string &cds_name, struct ChronusUtil::AOR_transition_data &aor_data, IMongoDB *mongo_db) { > aor_mutex.wait(); > std::map<std::string, struct AOR_transition_data>::iterator cds_itr = aor_transition_data.find(cds_name); > if (cds_itr != aor_transition_data.end()) { > aor_data.aor_start = cds_itr->second.aor_start; > aor_data.aor_end = cds_itr->second.aor_end; > aor_mutex.notify(); > return (( OSII_RETCODE )1); > } > aor_mutex.notify(); > > aor_data.aor_start = 0; > aor_data.aor_end = 0; > > IMongoQueryResult* result; > OSII_RETCODE query_ret = mongo_db->query(get_mongo_db_name(cds_name), ChronusVersionsSchema::COLLECTION_NAME, result); > if (((OSII_RETCODE)0xEFFF0010) == query_ret) { > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 723 ); > return query_ret; > } > > OSII_INT64 lowest_recorded_AOR_version = -1; > OSII_INT64 highest_recorded_AOR_version = -1; > IMongoDocument* doc; > while (__null != (doc = result->next_result(query_ret))) { > OSII_INT64 row_version; > OSII_INT64 schema_timestamp; > > if ((( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_VERSION, row_version) > || (( OSII_RETCODE )1) != doc->fetch_int64(ChronusVersionsSchema::SCHEMA_TIMESTAMP, schema_timestamp)) > { > mongo_db->destroy_query_result(result); > IMongoDocument::destroy_document(doc); > doc = __null; > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 740 ); > return (( OSII_RETCODE )0); > } > > if (row_version >= AOR_MASK_MIN_VERSION && (row_version < lowest_recorded_AOR_version || lowest_recorded_AOR_version == -1)) { > > lowest_recorded_AOR_version = row_version; > aor_data.aor_start = schema_timestamp; > > } > if (row_version >= AOR_MASK_TRANSITION_VERSION && (row_version < highest_recorded_AOR_version || highest_recorded_AOR_version == -1)) { > > highest_recorded_AOR_version = row_version; > aor_data.aor_end = schema_timestamp; > } > > IMongoDocument::destroy_document(doc); > doc = __null; > } > > mongo_db->destroy_query_result(result); > result = __null; > > > if (lowest_recorded_AOR_version == -1 || highest_recorded_AOR_version == -1) { > HSHLogger::LOG("Failed to load schema version from mongo", "../include/ChronusUtil.h", 765 ); > return (( OSII_RETCODE )0); > } > > aor_mutex.wait(); > aor_transition_data.insert(std::pair<std::string, AOR_transition_data>(cds_name, aor_data)); > aor_mutex.notify(); > > return (( OSII_RETCODE )1); > } > > static void switch_aors_if_needed(time_t timestamp, AOR_transition_data data, OSII_INT32 aorMasks[], OSII_INT32 mask_count) { > if ((timestamp > data.aor_start) && (timestamp < data.aor_end)) { > for (int i = 0; i < mask_count; i++) { > aorMasks[i] = switch_aors(aorMasks[i]); > } > } > } > > static OSII_INT32 switch_aors(OSI_INT32 aorMask) { > return (((aorMask >> 24) & 0xFF) | > ((aorMask >> 8) & 0xFF00) | > ((aorMask << 8) & 0xFF0000) | > ((aorMask << 24) & 0xFF000000)); > } > > static std::string legacy_UUID_from_binary(hsh::string_view binary) > { > if (16 != binary.size()) { > return ""; > } > > std::string ret_val; > ret_val.reserve(40); > OSII_INT32 index; > for (index = 0; index < 4; index++) { > ret_val += GET_HEX_VALUES()[(binary[index] >> 4) & 0xF]; > ret_val += GET_HEX_VALUES()[binary[index] & 0xF]; > } > ret_val += "-"; > for (; index < 6; index++) { > ret_val += GET_HEX_VALUES()[(binary[index] >> 4) & 0xF]; > ret_val += GET_HEX_VALUES()[binary[index] & 0xF]; > } > ret_val += "-"; > for (; index < 8; index++) { > ret_val += GET_HEX_VALUES()[(binary[index] >> 4) & 0xF]; > ret_val += GET_HEX_VALUES()[binary[index] & 0xF]; > } > ret_val += "-"; > for (; index < 10; index++) { > ret_val += GET_HEX_VALUES()[(binary[index] >> 4) & 0xF]; > ret_val += GET_HEX_VALUES()[binary[index] & 0xF]; > } > ret_val += "-"; > for (; index < 16; index++) { > ret_val += GET_HEX_VALUES()[(binary[index] >> 4) & 0xF]; > ret_val += GET_HEX_VALUES()[binary[index] & 0xF]; > } > return ret_val; > } >}; ># 5 "LogDataProvider.h" 2 ># 1 "BlobHelpers.h" 1 > > > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/variant.h" 1 > > > > > > > >namespace hsh >{ > class bad_variant_access : public std::logic_error > { > public: > bad_variant_access() : std::logic_error("hsh::bad_variant_access exception") {} > }; > inline void throw_bad_variant_access() { throw bad_variant_access{}; } > > template <class... Types> > class variant; > > template <class T> > struct variant_size; > > template <class T> > struct variant_size<const T> : std::integral_constant<size_t, variant_size<T>::value> {}; > > template <class T> > struct variant_size<volatile T> : std::integral_constant<size_t, variant_size<T>::value> {}; > > template <class T> > struct variant_size<const volatile T> : std::integral_constant<size_t, variant_size<T>::value> {}; > > template <class... Types> > struct variant_size<variant<Types...>> : std::integral_constant<size_t, sizeof...(Types)> {}; > > template <size_t I, class T> > struct variant_alternative; > > template <size_t I, class... Types> > struct variant_alternative<I, variant<Types...>> > { > static_assert(I < sizeof...(Types), "Index is out of range"); > using type = typename std::tuple_element<I, std::tuple<Types...>>::type; > }; > > template <size_t I, class T> > struct variant_alternative<I, const T> : add_const_t<variant_alternative<I, T>> {}; > > template <size_t I, class T> > struct variant_alternative<I, volatile T> : add_volatile_t<variant_alternative<I, T>>{}; > > template <size_t I, class T> > struct variant_alternative<I, const volatile T> : add_cv_t<variant_alternative<I,T>>{}; > > template <size_t I, class T> > using variant_alternative_t = typename variant_alternative<I, T>::type; > > constexpr size_t variant_npos = static_cast<size_t>(-1); > > > template <std::size_t I, typename... Ts> > inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept; > > template <typename T, typename... Ts> > inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept; > > namespace variant_detail > { > inline namespace type_traits > { > template <typename T> > struct is_in_place_index : std::false_type {}; > > template <std::size_t I> > struct is_in_place_index<in_place_index_t<I>> : std::true_type {}; > > template <typename T> > struct is_in_place_type : std::false_type {}; > > template <typename T> > struct is_in_place_type<in_place_type_t<T>> : std::true_type {}; > > > template <typename... Types> > struct implicit_convertible_operators; > > template <> > struct implicit_convertible_operators<> > { > void operator()() const; > }; > > template <typename T, typename... Types> > struct implicit_convertible_operators<T, Types...> : implicit_convertible_operators<Types...> > { > using implicit_convertible_operators<Types...>::operator(); > type_identity<T> operator()(T) const; > }; > > > template <class T, class... Types> > using best_alternative_t = typename invoke_result_t<implicit_convertible_operators<Types...>, T>::type; > > > template <typename T> > struct remove_all_static_array_extents : type_identity<T> {}; > > template <typename T, std::size_t N> > struct remove_all_static_array_extents<static_array<T, N>> : remove_all_static_array_extents<T> {}; > > template <typename T> > using remove_all_static_array_extents_t = typename remove_all_static_array_extents<T>::type; > > > template <typename Is, std::size_t J> > struct push_back; > > template <std::size_t... Is, std::size_t J> > struct push_back<index_sequence<Is...>, J> { > using type = index_sequence<Is..., J>; > }; > > template <typename Is, std::size_t J> > using push_back_t = typename push_back<Is, J>::type; > } > > > inline namespace find_index > { > constexpr std::size_t not_found = static_cast<std::size_t>(-1); > constexpr std::size_t ambiguous = static_cast<std::size_t>(-2); > > > inline constexpr std::size_t find_index_impl(std::size_t result, std::size_t) { return result; } > > > > > > > > template <typename... Bools> > inline constexpr std::size_t find_index_impl(std::size_t result, std::size_t index, bool type_match, Bools... bools) > { > return type_match ? (result != not_found ? ambiguous : find_index_impl(index, index + 1, bools...)) : find_index_impl(result, index + 1, bools...); > } > > > template <typename T, typename... Types> > inline constexpr std::size_t find_index() { return find_index_impl(not_found, 0, std::is_same<T, Types>::value...); } > > template <std::size_t I> > using find_index_sfinae_impl = enable_if_t<I != not_found && I != ambiguous, size_constant<I>>; > > template <typename T, typename... Ts> > using find_index_sfinae = find_index_sfinae_impl<find_index<T, Ts...>()>; > > template <std::size_t I> > struct find_index_checked_impl : size_constant<I> > { > static_assert(I != not_found, "the specified type is not found."); > static_assert(I != ambiguous, "the specified type is ambiguous."); > }; > > template <typename T, typename... Ts> > using find_index_checked = find_index_checked_impl<find_index<T, Ts...>()>; > > } > > inline namespace access > { > template <std::size_t I> > struct get_alt_impl > { > template <typename V> > inline constexpr auto operator()(V &&v) const -> decltype(get_alt_impl<I - 1>{}(hsh::forward<V>(v).tail)) > { > return get_alt_impl<I - 1>{}(hsh::forward<V>(v).tail); > } > }; > > template<> > struct get_alt_impl<0> > { > template <typename V> > inline constexpr auto operator()(V &&v) const -> decltype((hsh::forward<V>(v).head)) > { > return hsh::forward<V>(v).head; > } > }; > > struct variant_getter > { > template <size_t I, typename V> > static constexpr auto get_alt(V&& v) -> decltype(get_alt_impl<I>{}(storage(hsh::forward<V>(v).impl))) > { > return get_alt_impl<I>{}(storage(hsh::forward<V>(v).impl)); > } > }; > > template <std::size_t I, typename V> > struct generic_get_impl > { > constexpr generic_get_impl(int) noexcept {} > > constexpr auto operator()(V &&v) const -> decltype(variant_getter::get_alt<I>(hsh::forward<V>(v))) > { > return variant_getter::get_alt<I>(hsh::forward<V>(v)); > } > }; > > template <std::size_t I, typename V> > inline constexpr auto generic_get(V &&v) > -> decltype(generic_get_impl<I, V>(holds_alternative<I>(v) ? 0 : (throw_bad_variant_access(), 0))(hsh::forward<V>(v))) > { > return generic_get_impl<I, V>(holds_alternative<I>(v) ? 0 : (throw_bad_variant_access(), 0))(hsh::forward<V>(v)); > } > } > > inline namespace vistitation > { > > template <typename T> > inline static constexpr const T& at(const T &elem) noexcept { return elem; } > > template <typename T, std::size_t N, typename... Is> > inline static constexpr const remove_all_static_array_extents_t<T>& at(const static_array<T, N> &elems, std::size_t i, Is... is) noexcept { return at(elems[i], is...); } > > > template <typename F, typename... Fs> > inline static constexpr static_array<decay_t<F>, sizeof...(Fs) + 1> make_farray(F &&f, Fs &&... fs) { return { {hsh::forward<F>(f), hsh::forward<Fs>(fs)...} }; } > > > template <typename Visitor, typename... Vs> > using dispatch_result_t = decltype(hsh::invoke(std::declval<Visitor>(), get_alt_impl<0>{}(storage(std::declval<Vs>()))...)); > > template <typename F, typename... Vs> > struct make_fmatrix_impl > { > > template <std::size_t... Is> > inline static constexpr dispatch_result_t<F, Vs...> dispatch(F &&f, Vs &&... vs) > { > > static_assert(is_invocable<F&&, decltype(get_alt_impl<Is>{}(storage(hsh::forward<Vs>(vs))))... > ::value, > "All Variant values must be invocable by the visitor"); > static_assert(std::is_same<dispatch_result_t<F, Vs...>, > decltype(hsh::invoke(hsh::forward<F>(f), get_alt_impl<Is>{}(storage(hsh::forward<Vs>(vs)))...)) > ::value, > "All Vistor functions need to have the same return type"); > return hsh::invoke(hsh::forward<F>(f), get_alt_impl<Is>{}(storage(hsh::forward<Vs>(vs)))...); > } > > template <typename...> > struct impl; > > template <std::size_t... Is> > struct impl<index_sequence<Is...>> > { > inline constexpr auto operator()() const -> decltype(&dispatch<Is...>) > { > return &dispatch<Is...>; > } > }; > > template <typename Is, std::size_t... Js, typename... Ls> > struct impl<Is, index_sequence<Js...>, Ls...> > { > inline constexpr auto operator()() const -> decltype(make_farray(impl<push_back_t<Is, Js>, Ls...>{}()...)) > { > return make_farray(impl<push_back_t<Is, Js>, Ls...>{}()...); > } > }; > }; > > > template <typename F, typename... Vs> > inline static constexpr auto make_fmatrix() -> > decltype(typename make_fmatrix_impl<F, Vs...>::template impl<index_sequence<>, make_index_sequence<decay_t<Vs>::size()>...>{}()) > { > return typename make_fmatrix_impl<F, Vs...>::template impl<index_sequence<>, make_index_sequence<decay_t<Vs>::size()>...>{}(); > } > > template <typename F, typename... Vs> > struct make_fdiagonal_impl > { > template <std::size_t I> > inline static constexpr dispatch_result_t<F, Vs...> dispatch(F &&f, Vs &&... vs) > { > static_assert(is_invocable < F&&, decltype(get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs))))... > ::value, > "All Variant values must be invocable by the visitor"); > static_assert(std::is_same < dispatch_result_t<F, Vs...>, > decltype(hsh::invoke(hsh::forward<F>(f), get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs)))...)) > ::value, > "All Vistor functions need to have the same return type"); > return hsh::invoke(hsh::forward<F>(f), get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs)))...); > } > > > template <std::size_t... Is> > inline static constexpr auto impl(index_sequence<Is...>) -> decltype(make_farray(&dispatch<Is>...)) > { > return make_farray(&dispatch<Is>...); > } > }; > > template <typename F, typename... Vs> > struct make_indexed_fdiagonal_impl > { > template <std::size_t I> > inline static constexpr auto indexed_dispatch(F &&f, Vs &&... vs) -> decltype(hsh::invoke(hsh::forward<F>(f), size_constant<I>{}, get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs)))...)) > { > static_assert(is_invocable < F&&, size_constant<I>, decltype(get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs))))... > ::value, > "All Variant values must be invocable by the visitor"); > > > > return hsh::invoke(hsh::forward<F>(f), size_constant<I>{}, get_alt_impl<I>{}(storage(hsh::forward<Vs>(vs)))...); > } > > template <std::size_t... Is> > inline static constexpr auto impl(index_sequence<Is...>) -> decltype(make_farray(&indexed_dispatch<Is>...)) > { > return make_farray(&indexed_dispatch<Is>...); > } > }; > > template <typename F, typename V, typename... Vs> > inline static constexpr auto make_fdiagonal() > -> decltype(make_fdiagonal_impl<F, V, Vs...>::impl(make_index_sequence<decay_t<V>::size()>{})) > { > static_assert(static_conjunction(decay_t<V>::size() == decay_t<Vs>::size()...), > "all of the variants must be the same size."); > return make_fdiagonal_impl<F, V, Vs...>::impl(make_index_sequence<decay_t<V>::size()>{}); > } > > template <typename F, typename V, typename... Vs> > inline static constexpr auto make_indexed_fdiagonal() > -> decltype(make_indexed_fdiagonal_impl<F, V, Vs...>::impl(make_index_sequence<decay_t<V>::size()>{})) > { > static_assert(static_conjunction(decay_t<V>::size() == decay_t<Vs>::size()...), > "all of the variants must be the same size."); > return make_indexed_fdiagonal_impl<F, V, Vs...>::impl(make_index_sequence<decay_t<V>::size()>{}); > } > > template <typename Visitor, typename... Vs> > inline constexpr auto visit_base(Visitor&& visitor, Vs&&... vs) > -> decltype(at(make_fmatrix<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), vs.index()...)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...)) > { > return at(make_fmatrix<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), vs.index()...)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...); > } > > template <typename Visitor, typename... Vs> > inline constexpr auto visit_at_base(size_t index, Visitor&& visitor, Vs&&... vs) > -> decltype(at(make_fdiagonal<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), index)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...)) > { > return at(make_fdiagonal<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), index)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...); > } > > template <typename Visitor, typename... Vs> > inline constexpr auto visit_at_indexed(size_t index, Visitor&& visitor, Vs&&... vs) > -> decltype(at(make_indexed_fdiagonal<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), index)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...)) > { > return at(make_indexed_fdiagonal<Visitor&&, decltype(hsh::forward<Vs>(vs))...>(), index)(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...); > } > > struct variant_visitor > { > template <typename Visitor, typename... Vs> > constexpr static auto visit(Visitor&& visitor, Vs&&... vs) > -> decltype(visit_base(hsh::forward<Visitor>(visitor), as_base(hsh::forward<Vs>(vs).impl)...)) > { > return visit_base(hsh::forward<Visitor>(visitor), as_base(hsh::forward<Vs>(vs).impl)...); > } > > template <typename Visitor, typename... Vs> > constexpr static auto visit_at(size_t index, Visitor&& visitor, Vs&&... vs) > -> decltype(visit_at_base(index, hsh::forward<Visitor>(visitor), as_base(hsh::forward<Vs>(vs).impl)...)) > { > return visit_at_base(index, hsh::forward<Visitor>(visitor), as_base(hsh::forward<Vs>(vs).impl)...); > } > }; > } > > inline namespace visitor_comparators > { > struct less_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) < hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) < hsh::forward<RHS>(rhs); > } > }; > > struct less_equal_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) <= hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) <= hsh::forward<RHS>(rhs); > } > }; > > struct greater_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) > hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) > hsh::forward<RHS>(rhs); > } > }; > > struct greater_equal_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) >= hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) >= hsh::forward<RHS>(rhs); > } > }; > > struct equal_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) == hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) == hsh::forward<RHS>(rhs); > } > }; > > struct not_equal_visitor > { > template <typename LHS, typename RHS> > inline constexpr bool operator()(LHS &&lhs, RHS &&rhs) const noexcept(noexcept(hsh::forward<LHS>(lhs) != hsh::forward<RHS>(rhs))) > { > return hsh::forward<LHS>(lhs) != hsh::forward<RHS>(rhs); > } > }; > } > > inline namespace variant_data > { > struct valueless_t {}; > > template <bool TrivialDestructable, size_t Index, class... Types> > class variant_storage {}; > > template <class... Types> > using variant_storage_t = variant_storage<conjunction<is_trivially_destructible<Types>...>::value, 0, Types...>; > > > template <size_t Index, class T, class... Ts> > class variant_storage<true, Index, T, Ts...> > { > public: > explicit constexpr variant_storage(valueless_t tag) noexcept : valueless{} {} > > template <class... Args> > explicit constexpr variant_storage(in_place_index_t<0>, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : head(hsh::forward<Args>(args)...) {} > > template <size_t I, class... Args> > explicit constexpr variant_storage(in_place_index_t<I>, Args&&... args) > : tail{ in_place_index_t<I - 1>{}, hsh::forward<Args>(args)... } {} > > variant_storage(const variant_storage&) = default; > variant_storage(variant_storage&&) = default; > > ~variant_storage() noexcept = default; > > variant_storage& operator=(const variant_storage&) = default; > variant_storage& operator=(variant_storage&&) = default; > > union > { > T head; > variant_storage<true, Index + 1, Ts...> tail; > char valueless; > }; > }; > > > template <size_t Index, class T, class... Ts> > class variant_storage<false, Index, T, Ts...> > { > public: > explicit constexpr variant_storage(valueless_t tag) noexcept : valueless{} {} > > template <class... Args> > constexpr explicit variant_storage(in_place_index_t<0>, Args&&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : head(hsh::forward<Args>(args)...) {} > > template <size_t I, class... Args, enable_if_t<(I > 0), int> = 0> > constexpr explicit variant_storage(in_place_index_t<I>, Args&&... args) > noexcept(std::is_nothrow_constructible<variant_storage_t<Ts...>, std::integral_constant<size_t, I - 1>, Args...>::value) > : tail(in_place_index<I - 1>, hsh::forward<Args>(args)...) {} > > variant_storage(variant_storage&&) = default; > variant_storage(const variant_storage&) = default; > > > ~variant_storage() noexcept { } > > variant_storage& operator=(variant_storage&&) = default; > variant_storage& operator=(const variant_storage&) = default; > > union > { > T head; > variant_storage<false, Index + 1, Ts...> tail; > char valueless; > }; > }; > > > template <class... Types> > class variant_impl_base > { > using storage_t = variant_storage_t<Types...>; > public: > explicit constexpr variant_impl_base(valueless_t valueless_tag) noexcept : data(valueless_tag), _index(invalid_index) {} > > template <size_t I, class... Args, enable_if_t<std::is_constructible<variant_alternative_t<I, variant<Types...>>, Args...>::value, int> = 0> > constexpr explicit variant_impl_base(in_place_index_t<I>, Args&&... args) noexcept(std::is_nothrow_constructible<variant_alternative_t<I, variant<Types...>>, Args...>::value) > : data(in_place_index<I>, hsh::forward<Args>(args)...), _index{ static_cast<uint8_t>(I) } {} > > constexpr bool valueless_by_exception() const noexcept { return invalid_index == _index; } > > constexpr size_t index() const noexcept { return valueless_by_exception() ? variant_npos : _index; } > > void set_index(const size_t index) noexcept { _index = static_cast<uint8_t>(index); } > > static constexpr size_t size() { return num_alternatives; } > > static constexpr size_t num_alternatives = sizeof...(Types); > static constexpr uint8_t invalid_index = static_cast<uint8_t>(-1); > > friend inline constexpr storage_t& storage(variant_impl_base& base) { return base.data; } > friend inline constexpr const storage_t& storage(const variant_impl_base& base) { return base.data; } > friend inline constexpr storage_t&& storage(variant_impl_base&& base) { return hsh::move(base).data; } > friend inline constexpr const storage_t&& storage(const variant_impl_base&& base) { return hsh::move(base).data; } > > friend inline constexpr variant_impl_base& as_base(variant_impl_base& base) { return base; } > friend inline constexpr const variant_impl_base& as_base(const variant_impl_base& base) { return base; } > friend inline constexpr variant_impl_base&& as_base(variant_impl_base&& base) { return hsh::move(base); } > friend inline constexpr const variant_impl_base&& as_base(const variant_impl_base&& base) { return hsh::move(base); } > > storage_t data; > uint8_t _index = invalid_index; > }; > > > template <bool IsTrivallyDestructible, class... Types> > class variant_impl_destructor : public variant_impl_base<Types...> > { > using super = variant_impl_base<Types...>; > public: > using super::super; > variant_impl_destructor(variant_impl_destructor&&) = default; > variant_impl_destructor(const variant_impl_destructor&) = default; > > ~variant_impl_destructor() = default; > > using super::operator=; > variant_impl_destructor& operator=(variant_impl_destructor&&) = default; > variant_impl_destructor& operator=(const variant_impl_destructor&) = default; > > void destroy() { this->_index = super::invalid_index; } > }; > > template <class... Types> > class variant_impl_destructor<false, Types...> : public variant_impl_base<Types...> > { > using super = variant_impl_base<Types...>; > public: > using super::super; > variant_impl_destructor(variant_impl_destructor&&) = default; > variant_impl_destructor(const variant_impl_destructor&) = default; > > ~variant_impl_destructor() { destroy(); } > > using super::operator=; > variant_impl_destructor& operator=(variant_impl_destructor&&) = default; > variant_impl_destructor& operator=(const variant_impl_destructor&) = default; > > void destroy() > { > if ( !this->valueless_by_exception() ) > { > visit_base(destructor_visitor{}, *this); > } > this->_index = super::invalid_index; > } > > private: > > struct destructor_visitor > { > template <typename T> > inline void operator()(T &t) const noexcept { t.~T(); } > }; > }; > > template <class... Types> > class variant_impl_constructor : public variant_impl_destructor<conjunction<is_trivially_destructible<Types>...>::value, Types...> > { > using super = variant_impl_destructor<conjunction<is_trivially_destructible<Types>...>::value, Types...>; > public: > using super::super; > using super::operator=; > > protected: > template <class T, class... Args> > static T& construct_alt(T& alt, Args&&... args) > { > return *new((void*)&alt)T{ hsh::forward<Args>(args)...}; > } > > template <class Rhs> > static void generic_construct(variant_impl_constructor& lhs, Rhs&& rhs) > { > lhs.destroy(); > if (!rhs.valueless_by_exception()) > { > > visit_at_base(rhs.index(), construct_visitor{}, lhs, hsh::forward<Rhs>(rhs)); > lhs._index = rhs._index; > } > } > > private: > > struct construct_visitor > { > template <typename T, typename U> > inline void operator()(T &lhs, U &&rhs) const > { > variant_impl_constructor::construct_alt(lhs, hsh::forward<U>(rhs)); > } > }; > }; > > > template <operation_support_trait, class... Types> > class variant_impl_copy_constructor : public variant_impl_constructor<Types...> > { > using super = variant_impl_constructor<Types...>; > public: > using super::super; > variant_impl_copy_constructor(const variant_impl_copy_constructor&) = default; > variant_impl_copy_constructor(variant_impl_copy_constructor&&) = default; > > ~variant_impl_copy_constructor() = default; > > using super::operator=; > variant_impl_copy_constructor& operator=(variant_impl_copy_constructor&&) = default; > variant_impl_copy_constructor& operator=(const variant_impl_copy_constructor&) = default; > }; > > > template <class... Types> > class variant_impl_copy_constructor<operation_support_trait::available, Types...> : public variant_impl_constructor<Types...> > { > using super = variant_impl_constructor<Types...>; > public: > using super::super; > > variant_impl_copy_constructor(const variant_impl_copy_constructor& other) noexcept(conjunction<std::is_nothrow_copy_constructible<Types>...>::value) > : variant_impl_copy_constructor(valueless_t{}) > { > this->generic_construct(*this, other); > } > > variant_impl_copy_constructor(variant_impl_copy_constructor&&) = default; > > ~variant_impl_copy_constructor() = default; > > using super::operator=; > variant_impl_copy_constructor& operator=(variant_impl_copy_constructor&&) = default; > variant_impl_copy_constructor& operator=(const variant_impl_copy_constructor&) = default; > }; > > > template <class... Types> > class variant_impl_copy_constructor<operation_support_trait::unavailable, Types...> : public variant_impl_constructor<Types...> > { > using super = variant_impl_constructor<Types...>; > public: > using super::super; > variant_impl_copy_constructor(const variant_impl_copy_constructor&) = delete; > variant_impl_copy_constructor(variant_impl_copy_constructor&&) = default; > > ~variant_impl_copy_constructor() = default; > > using super::operator=; > variant_impl_copy_constructor& operator=(variant_impl_copy_constructor&&) = default; > variant_impl_copy_constructor& operator=(const variant_impl_copy_constructor&) = default; > }; > > > template <operation_support_trait, class... Types> > class variant_impl_move_constructor : public variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_constructor(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor(variant_impl_move_constructor&&) = default; > > ~variant_impl_move_constructor() = default; > > using super::operator=; > variant_impl_move_constructor& operator=(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor& operator=(variant_impl_move_constructor&&) = default; > }; > > > template <class... Types> > class variant_impl_move_constructor<operation_support_trait::available, Types...> : public variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_constructor(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor(variant_impl_move_constructor&& other) noexcept(conjunction<std::is_nothrow_move_constructible<Types>...>::value) > : variant_impl_move_constructor(valueless_t{}) > { > this->generic_construct(*this, hsh::move(other)); > } > > ~variant_impl_move_constructor() = default; > > using super::operator=; > variant_impl_move_constructor& operator=(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor& operator=(variant_impl_move_constructor&&) = default; > }; > > > template <class... Types> > class variant_impl_move_constructor<operation_support_trait::unavailable, Types...> : public variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_constructor<copy_constructor_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_constructor(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor(variant_impl_move_constructor&&) = delete; > > ~variant_impl_move_constructor() = default; > > using super::operator=; > variant_impl_move_constructor& operator=(const variant_impl_move_constructor&) = default; > variant_impl_move_constructor& operator=(variant_impl_move_constructor&&) = default; > }; > > template <class... Types> > class variant_impl_assignment : public variant_impl_move_constructor<move_constructor_traits<Types...>::traits, Types...> > { > using super = variant_impl_move_constructor<move_constructor_traits<Types...>::traits, Types...>; > public: > using super::super; > using super::operator=; > > template <size_t I, class... Args> > auto emplace(Args&&... args) -> decltype(this->construct_alt(get_alt_impl<I>{}(storage(*this)), std::forward<Args>(args)...)) > { > this->destroy(); > auto& result_alternative = this->construct_alt(get_alt_impl<I>{}(storage(*this)), std::forward<Args>(args)...); > this->_index = I; > return result_alternative; > } > > protected: > template <size_t I, class T, class Arg> > void assign_alt(size_constant<I>, T& alt, Arg&& arg) > { > > > if ( this->index() == I ) > { > alt = hsh::forward<Arg>(arg); > } > else > { > emplace_alt<I, T>(hsh::forward<Arg>(arg)); > } > } > > template <size_t I, class T, class Arg, enable_if_t<disjunction<std::is_nothrow_constructible<T, Arg>, negation<std::is_nothrow_move_constructible<T>>>::value>* = nullptr> > void emplace_alt(Arg&& arg) > { > this->emplace<I>(hsh::forward<Arg>(arg)); > } > > template <size_t I, class T, class Arg, enable_if_t<negation<disjunction<std::is_nothrow_constructible<T, Arg>, negation<std::is_nothrow_move_constructible<T>>>>::value>* = nullptr> > void emplace_alt(Arg&& arg) > { > this->emplace<I>(T(hsh::forward<Arg>(arg))); > } > > template <typename OtherVariant> > inline void generic_assign(OtherVariant &&other) > { > if (this->valueless_by_exception() && other.valueless_by_exception()) > { > > } > else if (other.valueless_by_exception()) > { > this->destroy(); > } > else > { > visit_at_indexed(other.index(), assign_visitor<OtherVariant>{this}, *this, hsh::forward<OtherVariant>(other)); > } > } > > private: > > template <typename That> > struct assign_visitor > { > template <size_t I, typename T, typename U> > inline void operator()(size_constant<I>, T &this_alt, U &&other) const > { > self->assign_alt(size_constant<I>{}, this_alt, hsh::forward<U>(other)); > } > variant_impl_assignment *self; > }; > }; > > > template <operation_support_trait, class... Types> > class variant_impl_copy_assignment : public variant_impl_assignment<Types...> > { > using super = variant_impl_assignment<Types...>; > public: > using super::super; > variant_impl_copy_assignment(const variant_impl_copy_assignment&) = default; > variant_impl_copy_assignment(variant_impl_copy_assignment&&) = default; > > ~variant_impl_copy_assignment() = default; > > using super::operator=; > variant_impl_copy_assignment& operator=(const variant_impl_copy_assignment&) = default; > variant_impl_copy_assignment& operator=(variant_impl_copy_assignment&&) = default; > }; > > > template <class... Types> > class variant_impl_copy_assignment<operation_support_trait::available, Types...> : public variant_impl_assignment<Types...> > { > using super = variant_impl_assignment<Types...>; > public: > using super::super; > variant_impl_copy_assignment(const variant_impl_copy_assignment&) = default; > variant_impl_copy_assignment(variant_impl_copy_assignment&&) = default; > > ~variant_impl_copy_assignment() = default; > > using super::operator=; > variant_impl_copy_assignment& operator=(const variant_impl_copy_assignment& rhs) noexcept(conjunction<conjunction<std::is_nothrow_copy_assignable<Types>,std::is_nothrow_copy_constructible<Types>>...>::value) > { > this->generic_assign(rhs); > return *this; > } > variant_impl_copy_assignment& operator=(variant_impl_copy_assignment&&) = default; > }; > > > template <class... Types> > class variant_impl_copy_assignment<operation_support_trait::unavailable, Types...> : public variant_impl_assignment<Types...> > { > using super = variant_impl_assignment<Types...>; > public: > using super::super; > variant_impl_copy_assignment(const variant_impl_copy_assignment&) = default; > variant_impl_copy_assignment(variant_impl_copy_assignment&&) = default; > > ~variant_impl_copy_assignment() = default; > > using super::operator=; > variant_impl_copy_assignment& operator=(const variant_impl_copy_assignment&) = delete; > variant_impl_copy_assignment& operator=(variant_impl_copy_assignment&&) = default; > }; > > > template <operation_support_trait, class... Types> > class variant_impl_move_assignment : public variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_assignment(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment(variant_impl_move_assignment&&) = default; > > ~variant_impl_move_assignment() = default; > > using super::operator=; > variant_impl_move_assignment& operator=(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment& operator=(variant_impl_move_assignment&&) = default; > }; > > > template <class... Types> > class variant_impl_move_assignment<operation_support_trait::available, Types...> : public variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_assignment(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment(variant_impl_move_assignment&&) = default; > > ~variant_impl_move_assignment() = default; > > using super::operator=; > variant_impl_move_assignment& operator=(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment& operator=(variant_impl_move_assignment&& rhs) noexcept(conjunction<conjunction<std::is_nothrow_move_assignable<Types>, std::is_nothrow_move_constructible<Types>>...>::value) > { > this->generic_assign( hsh::move(rhs) ); > return *this; > } > }; > > > template <class... Types> > class variant_impl_move_assignment<operation_support_trait::unavailable, Types...> : public variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...> > { > using super = variant_impl_copy_assignment<copy_assignment_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl_move_assignment(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment(variant_impl_move_assignment&&) = default; > > ~variant_impl_move_assignment() = default; > > using super::operator=; > variant_impl_move_assignment& operator=(const variant_impl_move_assignment&) = default; > variant_impl_move_assignment& operator=(variant_impl_move_assignment&&) = delete; > }; > > template <class... Types> > class variant_impl : public variant_impl_move_assignment<move_assignment_traits<Types...>::traits, Types...> > { > using super = variant_impl_move_assignment<move_assignment_traits<Types...>::traits, Types...>; > public: > using super::super; > variant_impl(const variant_impl&) = default; > variant_impl(variant_impl&&) = default; > > ~variant_impl() = default; > > using super::operator=; > variant_impl &operator=(const variant_impl &) = default; > variant_impl &operator=(variant_impl &&) = default; > > template <std::size_t I, typename Arg> > inline void assign(Arg &&arg) > { > this->assign_alt(size_constant<I>{}, get_alt_impl<I>{}(storage(*this)), hsh::forward<Arg>(arg)); > } > > inline constexpr bool move_nothrow() const > { > return this->valueless_by_exception() || > static_array<bool, sizeof...(Types)>{{std::is_nothrow_move_constructible<Types>::value...}}[this->index()]; > } > > inline void swap(variant_impl& other) > { > if (this->valueless_by_exception() && other.valueless_by_exception()) { > > } > else if (this->index() == other.index()) > { > > visit_at_base(this->index(), swap_visitor{}, *this, other); > } > else > { > variant_impl *lhs = this; > variant_impl *rhs = hsh::addressof(other); > > > if (lhs->move_nothrow() && !rhs->move_nothrow()) > { > > std::swap(lhs, rhs); > } > > variant_impl tmp(hsh::move(*rhs)); > try > { > > this->generic_construct(*rhs, hsh::move(*lhs)); > } > catch (...) > { > if (tmp.move_nothrow()) { > this->generic_construct(*rhs, hsh::move(tmp)); > } > throw; > } > > this->generic_construct(*lhs, hsh::move(tmp)); > } > } > > private: > struct swap_visitor > { > template <typename ThisAlt, typename ThatAlt> > inline void operator()(ThisAlt &this_alt, ThatAlt &that_alt) const { > using std::swap; > swap(this_alt, that_alt); > } > }; > }; > > > } > > > } > > template <class... Types> > class variant > { > static_assert( sizeof...(Types) < std::numeric_limits<uint8_t>::max(), "Too many alternatives"); > static_assert( sizeof...(Types) > 0, "variant cannot be empty"); > static_assert( negation<disjunction<std::is_void<Types>...>>::value, "variant does not allow void"); > static_assert( negation<disjunction<std::is_reference<Types>...>>::value, "variant does not allow references"); > static_assert( negation<disjunction<std::is_array<Types>...>>::value, "variant does not allow arrays"); > > public: > > template <typename Front = variant_alternative_t<0, variant<Types...>>, enable_if_t<std::is_default_constructible<Front>::value, int> = 0> > constexpr variant() noexcept(std::is_nothrow_default_constructible<Front>::value) > : impl(in_place_index<0>) {} > > > template < > typename Arg, > typename Decayed = decay_t<Arg>, > enable_if_t<!std::is_same<Decayed, variant>::value, int> = 0, > enable_if_t<!variant_detail::is_in_place_index<Decayed>::value, int> = 0, > enable_if_t<!variant_detail::is_in_place_type<Decayed>::value, int> = 0, > typename T = variant_detail::best_alternative_t<Arg, Types...>, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<std::is_constructible<T, Arg>::value, int> = 0> > constexpr variant(Arg &&arg) noexcept(std::is_nothrow_constructible<T, Arg>::value) > : impl(in_place_index<I>, hsh::forward<Arg>(arg)) {} > > > template < > std::size_t I, > typename... Args, > typename T = variant_alternative_t<I, variant<Types...>>, > enable_if_t<std::is_constructible<T, Args...>::value, int> = 0> > explicit constexpr variant(in_place_index_t<I>, Args &&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : impl(in_place_index_t<I>{}, hsh::forward<Args>(args)...) {} > > > template < > std::size_t I, > typename U, > typename... Args, > typename T = variant_alternative_t<I, variant<Types...>>, > enable_if_t<std::is_constructible<T, std::initializer_list<U> &, Args...>::value, int> = 0> > inline explicit constexpr variant(in_place_index_t<I>, std::initializer_list<U> il, Args &&... args) > noexcept(std::is_nothrow_constructible<T, std::initializer_list<U> &, Args...>::value) > : impl(in_place_index_t<I>{}, il, hsh::forward<Args>(args)...) {} > > > template < > typename T, > typename... Args, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<std::is_constructible<T, Args...>::value, int> = 0> > inline explicit constexpr variant(in_place_type_t<T>, Args &&... args) noexcept(std::is_nothrow_constructible<T, Args...>::value) > : impl(in_place_index_t<I>{}, hsh::forward<Args>(args)...) {} > > > template < > typename T, > typename U, > typename... Args, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<std::is_constructible<T, std::initializer_list<U> &, Args...>::value, int> = 0> > inline explicit constexpr variant(in_place_type_t<T>, std::initializer_list<U> il, Args &&... args) > noexcept(std::is_nothrow_constructible<T, std::initializer_list<U>&, Args...>::value) > : impl(in_place_index_t<I>{}, il, hsh::forward<Args>(args)...) {} > > > variant(const variant &) = default; > variant(variant &&) = default; > > ~variant() = default; > > > variant &operator=(const variant &) = default; > variant &operator=(variant &&) = default; > > template <typename Arg, > enable_if_t<!std::is_same<decay_t<Arg>, variant>::value, int> = 0, > typename T = variant_detail::best_alternative_t<Arg, Types...>, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<(std::is_assignable<T &, Arg>::value && std::is_constructible<T, Arg>::value), int> = 0> > inline variant &operator=(Arg &&arg) noexcept(conjunction<std::is_nothrow_assignable<T&, Arg>, std::is_nothrow_constructible<T, Arg>>::value) > { > impl.template assign<I>(hsh::forward<Arg>(arg)); > return *this; > } > > template <std::size_t I, > typename... Args, > typename T = variant_alternative_t<I, variant<Types...>>, > enable_if_t<std::is_constructible<T, Args...>::value, int> = 0> > inline T &emplace(Args&&... args) { > return impl.template emplace<I>(hsh::forward<Args>(args)...); > } > > template < > std::size_t I, > typename U, > typename... Args, > typename T = variant_alternative_t<I, variant<Types...>>, > enable_if_t<std::is_constructible<T, std::initializer_list<U>&, Args...>::value, int> = 0> > inline T &emplace(std::initializer_list<U> il, Args &&... args) { > return impl.template emplace<I>(il, hsh::forward<Args>(args)...); > } > > template < > typename T, > typename... Args, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<std::is_constructible<T, Args...>::value, int> = 0> > inline T &emplace(Args &&... args) { > return impl.template emplace<I>(hsh::forward<Args>(args)...); > } > > template < > typename T, > typename U, > typename... Args, > std::size_t I = variant_detail::find_index_sfinae<T, Types...>::value, > enable_if_t<std::is_constructible<T, std::initializer_list<U>&, Args...>::value, int> = 0> > inline T &emplace(std::initializer_list<U> il, Args &&... args) > { > return impl.template emplace<I>(il, hsh::forward<Args>(args)...); > } > > constexpr size_t index() const noexcept { return impl.index(); } > > constexpr bool valueless_by_exception() const noexcept { return impl.valueless_by_exception(); } > > template <bool Placeholder = true, > enable_if_t<conjunction<bool_constant<Placeholder && is_swappable<Types>::value && std::is_move_constructible<Types>::value>...>::value, bool> = false> > inline void swap(variant &that) noexcept(conjunction<conjunction<is_nothrow_swappable<Types>, std::is_nothrow_move_constructible<Types>>...>::value) > { > impl.swap(that.impl); > } > > private: > friend variant_detail::variant_getter; > friend variant_detail::variant_visitor; > variant_detail::variant_impl<Types...> impl; > }; > > template <class... Types> > void swap(variant<Types...>& lhs, variant<Types...>& rhs) noexcept(noexcept(lhs.swap(rhs))) > { > lhs.swap(rhs); > } > > > template <typename... Ts> > inline constexpr bool operator==(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > return lhs.index() == rhs.index() && > (lhs.valueless_by_exception() || > variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::equal_visitor{}, lhs, rhs)); > } > > template <typename... Ts> > inline constexpr bool operator!=(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > return lhs.index() != rhs.index() || > (!lhs.valueless_by_exception() && > variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::not_equal_visitor{}, lhs, rhs)); > } > > template <typename... Ts> > inline constexpr bool operator<(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > return !rhs.valueless_by_exception() && > (lhs.valueless_by_exception() || lhs.index() < rhs.index() || > (lhs.index() == rhs.index() && variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::less_visitor{}, lhs, rhs))); > } > > template <typename... Ts> > inline constexpr bool operator<=(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > return lhs.valueless_by_exception() || (!rhs.valueless_by_exception() && > (lhs.index() < rhs.index() || (lhs.index() == rhs.index() && > variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::less_equal_visitor{}, lhs, rhs)))); > } > > template <typename... Ts> > inline constexpr bool operator>(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > > return !lhs.valueless_by_exception() && > (rhs.valueless_by_exception() || lhs.index() > rhs.index() || > (lhs.index() == rhs.index() && variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::greater_visitor{}, lhs, rhs))); > } > > template <typename... Ts> > inline constexpr bool operator>=(const variant<Ts...> &lhs, const variant<Ts...> &rhs) > { > return rhs.valueless_by_exception() || > (!lhs.valueless_by_exception() && > (lhs.index() > rhs.index() || > (lhs.index() == rhs.index() && > variant_detail::variant_visitor::visit_at(lhs.index(), variant_detail::greater_equal_visitor{}, lhs, rhs)))); > } > > template <std::size_t I, typename... Ts> > inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept { return v.index() == I; } > > template <typename T, typename... Ts> > inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept { > return holds_alternative<variant_detail::find_index_checked<T, Ts...>::value>(v); > } > > template <std::size_t I, typename... Ts> > inline constexpr variant_alternative_t<I, variant<Ts...>>& get(variant<Ts...> &v) > { > return variant_detail::generic_get<I>(v); > } > > template <std::size_t I, typename... Ts> > inline constexpr variant_alternative_t<I, variant<Ts...>>&& get(variant<Ts...> &&v) > { > return variant_detail::generic_get<I>(hsh::move(v)); > } > > template <std::size_t I, typename... Ts> > inline constexpr const variant_alternative_t<I, variant<Ts...>>& get(const variant<Ts...> &v) > { > return variant_detail::generic_get<I>(v); > } > > template <std::size_t I, typename... Ts> > inline constexpr const variant_alternative_t<I, variant<Ts...>> &&get(const variant<Ts...> &&v) > { > return variant_detail::generic_get<I>(hsh::move(v)); > } > > template <typename T, typename... Ts> > inline constexpr T &get(variant<Ts...> &v) > { > return hsh::get<variant_detail::find_index_checked<T, Ts...>::value>(v); > } > > template <typename T, typename... Ts> > inline constexpr T &&get(variant<Ts...> &&v) > { > return hsh::get<variant_detail::find_index_checked<T, Ts...>::value>(hsh::move(v)); > } > > template <typename T, typename... Ts> > inline constexpr const T &get(const variant<Ts...> &v) > { > return hsh::get<variant_detail::find_index_checked<T, Ts...>::value>(v); > } > > template <typename T, typename... Ts> > inline constexpr const T &&get(const variant<Ts...> &&v) > { > return hsh::get<variant_detail::find_index_checked<T, Ts...>::value>(hsh::move(v)); > } > > template <std::size_t I, typename... Ts> > inline constexpr add_pointer_t<variant_alternative_t<I, variant<Ts...>>> get_if(variant<Ts...> *v) noexcept > { > return v && hsh::holds_alternative<I>(*v) ? hsh::addressof(hsh::get<I>(*v)) : nullptr; > } > > template <std::size_t I, typename... Ts> > inline constexpr add_pointer_t<const variant_alternative_t<I, variant<Ts...>>> get_if(const variant<Ts...> *v) noexcept > { > return v && hsh::holds_alternative<I>(*v) ? hsh::addressof(hsh::get<I>(*v)) : nullptr; > } > > template <typename T, typename... Ts> > inline constexpr add_pointer_t<T> get_if(variant<Ts...> *v) noexcept > { > return hsh::get_if<variant_detail::find_index_checked<T, Ts...>::value>(v); > } > > template <typename T, typename... Ts> > inline constexpr add_pointer_t<const T> get_if(const variant<Ts...> *v) noexcept > { > return hsh::get_if<variant_detail::find_index_checked<T, Ts...>::value>(v); > } > > template <typename Visitor, typename... Vs> > inline constexpr auto visit(Visitor&& visitor, Vs&&... vs) > -> decltype(variant_detail::variant_visitor::visit(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...)) > { > return (static_conjunction(!vs.valueless_by_exception()...) ? (void)0 : throw_bad_variant_access()), > variant_detail::variant_visitor::visit(hsh::forward<Visitor>(visitor), hsh::forward<Vs>(vs)...); > } > >} ># 8 "BlobHelpers.h" 2 > >class ByteStreamWriter >{ >private: > ByteStreamWriter(const ByteStreamWriter&) = delete; ByteStreamWriter& operator=(const ByteStreamWriter&) = delete; ByteStreamWriter(ByteStreamWriter&&) = delete; > std::vector<OSII_BYTE> byte_stream; > >public: > ByteStreamWriter() = default; > > explicit ByteStreamWriter(size_t size); > ~ByteStreamWriter() = default; > > void clear_stream() { byte_stream.clear(); } > const OSII_BYTE * get_data() const { return byte_stream.data(); } > size_t get_size() const { return byte_stream.size(); } > > OSII_RETCODE writes_bytes(hsh::span<OSII_BYTE> bytes); > > OSII_RETCODE write_byte( OSII_BYTE data ); > OSII_RETCODE write_uint32( OSII_UINT32 data ); > > > OSII_RETCODE write_varint(OSII_INT64 data); > OSII_RETCODE write_varint(OSII_UINT64 data); > > OSII_RETCODE write_int64(OSII_INT64 data); > > OSII_RETCODE write_float(OSII_FLOAT data); > OSII_RETCODE write_double( OSII_DOUBLE data ); > > > OSII_RETCODE write_source_time_us(OSII_INT64 source_time_us); > > > OSII_RETCODE write_string( const std::string &string_value); > > OSII_RETCODE write_value_header(CHRONUS_QUALITY cquality, OSII_BOOL has_source_time, IGenericValue::ValueType value_type ); > > > OSII_RETCODE write_generic_value( const IGenericValue *value); >}; > >class ByteStreamReader >{ >private: > ByteStreamReader(const ByteStreamReader&) = delete; ByteStreamReader& operator=(const ByteStreamReader&) = delete; ByteStreamReader(ByteStreamReader&&) = delete;; > std::vector<OSII_BYTE> byte_buffer; > const OSII_BYTE *last_byte_ptr; > const OSII_BYTE *curr_byte_ptr; > >public: > > > explicit ByteStreamReader(std::vector<OSII_BYTE> &&bytes); > ~ByteStreamReader() = default; > > const OSII_BYTE *get_current_byte_ptr() const { return curr_byte_ptr; } > size_t get_number_of_bytes_remaining() const { return last_byte_ptr - curr_byte_ptr; } > > > OSII_RETCODE read_byte( OSII_BYTE &data ); > OSII_RETCODE read_uint32( OSII_UINT32 &data ); > OSII_RETCODE read_double( OSII_DOUBLE &data ); > OSII_RETCODE read_float(OSII_FLOAT &data); > OSII_RETCODE read_int64( OSII_INT64 &data ); > OSII_RETCODE read_string( std::string &data ); > OSII_RETCODE read_generic_value( IGenericValue *&data ); > OSII_RETCODE read_generic_value(IGenericValue::ValueType value_type, IGenericValue *&data); > > OSII_RETCODE read_value_header(CHRONUS_QUALITY &cquality, OSII_BOOL &has_source_time, IGenericValue::ValueType &value_type); > > > OSII_RETCODE read_source_time_us(OSII_INT64 &source_time_us); > > OSII_RETCODE read_varint(OSII_UINT32 &data); > OSII_RETCODE read_varint(OSII_INT64 &data); > OSII_RETCODE read_varint(OSII_UINT64 &data); >}; > >class blob_stream_reader >{ >public: > struct value_header > { > explicit value_header(uint8_t header_byte) noexcept; > CHRONUS_QUALITY cquallity; > bool has_source_time; > hsh::ValueType value_type; > }; > > > using borrowed_generic_value = hsh::variant<int64_t, uint64_t, double, float, hsh::string_view>; > >public: > explicit blob_stream_reader(hsh::span<const uint8_t> data) noexcept : data(data) {} > > hsh::span<const uint8_t> remaining_buffer() const noexcept { return data; } > size_t bytes_remaining() const noexcept { return data.size(); } > > > uint8_t read_byte(); > double read_double(); > float read_float(); > uint32_t read_u32(); > int64_t read_i64(); > int64_t read_varint(); > uint64_t read_uvarint(); > hsh::string_view read_string(); > hsh::primitive_value read_generic_value(); > hsh::primitive_value read_generic_value(hsh::ValueType value_type); > borrowed_generic_value read_borrowed_generic_value(); > borrowed_generic_value read_borrowed_generic_value(hsh::ValueType value_type); > value_header read_value_header(); > int64_t read_source_time(); > > > hsh::optional<uint8_t> try_read_byte() noexcept; > hsh::optional<double> try_read_double() noexcept; > hsh::optional<float> try_read_float() noexcept; > hsh::optional<uint32_t> try_read_u32() noexcept; > hsh::optional<int64_t> try_read_i64() noexcept; > hsh::optional<int64_t> try_read_varint() noexcept; > hsh::optional<uint64_t> try_read_uvarint() noexcept; > hsh::optional<hsh::string_view> try_read_string() noexcept; > hsh::optional<hsh::primitive_value> try_read_generic_value(); > hsh::optional<hsh::primitive_value> try_read_generic_value(hsh::ValueType value_type); > hsh::optional<borrowed_generic_value> try_read_borrowed_generic_value() noexcept; > hsh::optional<borrowed_generic_value> try_read_borrowed_generic_value(hsh::ValueType value_type) noexcept; > hsh::optional<value_header> try_read_value_header() noexcept; > hsh::optional<int64_t> try_read_source_time() noexcept; > >private: > hsh::optional<hsh::ValueType> convert_to_value_type(char value_type_char) noexcept; > hsh::span<const uint8_t> data; >}; ># 6 "LogDataProvider.h" 2 ># 1 "QueryUtilities.h" 1 > > > > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_date.h" 1 > ># 29 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/hsh_date.h" >namespace hsh >{ > > class day > { > public: > explicit constexpr day(unsigned d) noexcept : _day((uint8_t)d) {} > constexpr unsigned count() const noexcept { return _day; } > constexpr bool ok() const noexcept { return 1 <= _day && _day <= 31; } > > private: > uint8_t _day; > }; > > > constexpr bool operator==(const day& x, const day& y) noexcept { return x.count() == y.count(); } > constexpr bool operator!=(const day& x, const day& y) noexcept { return x.count() != y.count(); } > constexpr bool operator< (const day& x, const day& y) noexcept { return x.count() < y.count(); } > constexpr bool operator> (const day& x, const day& y) noexcept { return x.count() > y.count(); } > constexpr bool operator<=(const day& x, const day& y) noexcept { return x.count() <= y.count(); } > constexpr bool operator>=(const day& x, const day& y) noexcept { return x.count() >= y.count(); } > > > > class month > { > public: > explicit constexpr month(unsigned m) noexcept : _month((uint8_t)m) {} > constexpr unsigned count() const noexcept { return _month; } > constexpr bool ok() const noexcept { return 1 <= _month && _month <= 12; } > > private: > uint8_t _month; > }; > > > constexpr month January{ 1 }; > constexpr month February{ 2 }; > constexpr month March{ 3 }; > constexpr month April{ 4 }; > constexpr month May{ 5 }; > constexpr month June{ 6 }; > constexpr month July{ 7 }; > constexpr month August{ 8 }; > constexpr month September{ 9 }; > constexpr month October{ 10 }; > constexpr month November{ 11 }; > constexpr month December{ 12 }; > > > constexpr bool operator==(const month& x, const month& y) noexcept { return x.count() == y.count(); } > constexpr bool operator!=(const month& x, const month& y) noexcept { return x.count() != y.count(); } > constexpr bool operator< (const month& x, const month& y) noexcept { return x.count() < y.count(); } > constexpr bool operator> (const month& x, const month& y) noexcept { return x.count() > y.count(); } > constexpr bool operator<=(const month& x, const month& y) noexcept { return x.count() <= y.count(); } > constexpr bool operator>=(const month& x, const month& y) noexcept { return x.count() >= y.count(); } > > > > > > > class year > { > public: > explicit constexpr year(int y) noexcept : _year((int16_t)y) {} > > constexpr bool is_leap() const noexcept { > return _year % 4 == 0 && (_year % 100 != 0 || _year % 400 == 0); > } > > constexpr int count() const noexcept { return _year; } > constexpr bool ok() const noexcept { > return _year != std::numeric_limits<int16_t>::min(); > } > > static constexpr year min() noexcept { return year{ -32767 }; } > static constexpr year max() noexcept { return year{ 32767 }; } > > private: > int16_t _year; > }; > > constexpr bool operator==(const year& x, const year& y) noexcept { return x.count() == y.count(); } > constexpr bool operator!=(const year& x, const year& y) noexcept { return x.count() != y.count(); } > constexpr bool operator< (const year& x, const year& y) noexcept { return x.count() < y.count(); } > constexpr bool operator> (const year& x, const year& y) noexcept { return x.count() > y.count(); } > constexpr bool operator<=(const year& x, const year& y) noexcept { return x.count() <= y.count(); } > constexpr bool operator>=(const year& x, const year& y) noexcept { return x.count() >= y.count(); } > > constexpr year operator+(const year& x, const years& y) noexcept { return year{ x.count() + y.count() }; } > constexpr year operator+(const years& x, year& y) noexcept { return y + x;} > constexpr year operator-(const year& x, const years& y) noexcept{ return year{ x.count() - y.count() }; } > constexpr years operator-(const year& x, const year& y) noexcept { return years{x.count() - y.count()}; } > > inline day last_day_of_month(year y, month m) noexcept > { > constexpr const day d[] = > { > day(31), day(28), day(31), > day(30), day(31), day(30), > day(31), day(31), day(30), > day(31), day(30), day(31) > }; > return ((m != February || !y.is_leap()) && m.ok()) ? d[m.count() - 1] : day{ 29 }; > } > > class year_month > { > public: > constexpr year_month(const hsh::year& y, const hsh::month& m) noexcept : _year(y), _month(m) {} > > constexpr hsh::year year() const noexcept { return _year; } > constexpr hsh::month month() const noexcept { return _month; } > > year_month& operator+=(const months& dm) noexcept; > year_month& operator-=(const months& dm) noexcept; > year_month& operator+=(const years& dy) noexcept; > year_month& operator-=(const years& dy) noexcept; > > day last_day_of_month() const noexcept { return hsh::last_day_of_month(_year, _month); } > > constexpr bool ok() const noexcept { return _year.ok() && _month.ok(); } > > private: > hsh::year _year; > hsh::month _month; > }; > > constexpr inline bool operator==(const year_month& x, const year_month& y) noexcept { return x.year() == y.year() && x.month() == y.month(); } > constexpr inline bool operator!=(const year_month& x, const year_month& y) noexcept { return !(x == y); } > constexpr inline bool operator< (const year_month& x, const year_month& y) noexcept { > return x.year() < y.year() ? true : (x.year() > y.year() ? false : (x.month() < y.month())); > } > constexpr inline bool operator> (const year_month& x, const year_month& y) noexcept { return y < x; } > constexpr inline bool operator<=(const year_month& x, const year_month& y) noexcept { return !(y < x); } > constexpr inline bool operator>=(const year_month& x, const year_month& y) noexcept { return !(x < y); } > > inline year_month operator+(const year_month& ym, const months& dm) noexcept > { > auto dmi = static_cast<int>(ym.month().count()) - 1 + dm.count(); > auto dy = (dmi >= 0 ? dmi : dmi - 11) / 12; > dmi = dmi - dy * 12 + 1; > return year_month(ym.year() + years(dy), month(static_cast<unsigned>(dmi))); > } > > inline year_month operator+(const months& dm, const year_month& ym) noexcept { return ym + dm; } > > inline year_month operator-(const year_month& ym, const months& dm) noexcept { return ym + -dm; } > > constexpr inline months operator-(const year_month& x, const year_month& y) noexcept > { > return (x.year() - y.year()) + months(x.month().count() - y.month().count()); > } > constexpr inline year_month operator+(const year_month& ym, const years& dy) noexcept > { > return year_month((ym.year() + dy), ym.month()); > } > constexpr inline year_month operator+(const years& dy, const year_month& ym) noexcept { return ym + dy; } > constexpr inline year_month operator-(const year_month& ym, const years& dy) noexcept { return ym + -dy; } > > inline year_month& year_month::operator+=(const months& dm) noexcept > { > *this = *this + dm; > return *this; > } > > inline year_month& year_month::operator-=(const months& dm) noexcept > { > *this = *this - dm; > return *this; > } > > inline year_month& year_month::operator+=(const years& dy) noexcept > { > *this = *this + dy; > return *this; > } > > inline year_month& year_month::operator-=(const years& dy) noexcept > { > *this = *this - dy; > return *this; > } > > class date > { > public: > > date() noexcept : date(hsh::time::floor<days>(hsh::time::now())) {} > > > constexpr date(const hsh::year& y, const hsh::month& m) noexcept : date(y, m, hsh::day(1)) {} > > > constexpr date(const hsh::year& y, const hsh::month& m, const hsh::day& d) noexcept > : _year(y), _month(m), _day(d) {} > > > date(sys_days dp) noexcept : date(from_days(dp.time_since_epoch())) {} > > > date(time_point tp) noexcept : date(hsh::time::floor<days>(tp)) {} > > > date& operator+=(const months& m) noexcept; > date& operator-=(const months& m) noexcept; > > date& operator+=(const years& y) noexcept; > date& operator-=(const years& y) noexcept; > > constexpr hsh::year year() const noexcept { return _year; } > constexpr hsh::month month() const noexcept { return _month; } > constexpr hsh::day day() const noexcept { return _day; } > > constexpr hsh::year_month to_year_month() const noexcept { return hsh::year_month{ _year, _month }; } > > hsh::sys_days to_sys_days() const noexcept { return hsh::sys_days(to_days()); } > > bool ok() const noexcept; > > > private: > static date from_days(days dp) noexcept; > days to_days() const noexcept; > > hsh::year _year; > hsh::month _month; > hsh::day _day; > }; > > inline bool date::ok() const noexcept > { > return _year.ok() && _month.ok() && hsh::day(1u) <= _day && _day <= last_day_of_month(_year, _month); > } > > > inline date date::from_days(days dp) noexcept > { > auto const z = dp.count() + 719468; > auto const era = (z >= 0 ? z : z - 146096) / 146097; > auto const doe = static_cast<unsigned>(z - era * 146097); > auto const yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; > auto const y = static_cast<days::rep>(yoe) + era * 400; > auto const doy = doe - (365 * yoe + yoe / 4 - yoe / 100); > auto const mp = (5 * doy + 2) / 153; > auto const d = doy - (153 * mp + 2) / 5 + 1; > auto const m = mp < 10 ? mp + 3 : mp - 9; > return hsh::date{ hsh::year{y + (m <= 2)}, hsh::month(m), hsh::day(d) }; > } > > inline days date::to_days() const noexcept > { > auto const y = _year.count() - (_month <= February); > auto const m = _month.count(); > auto const d = _day.count(); > auto const era = (y >= 0 ? y : y - 399) / 400; > auto const yoe = static_cast<unsigned>(y - era * 400); > auto const doy = (153 * (m > 2 ? m - 3 : m + 9) + 2) / 5 + d - 1; > auto const doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; > return days{ era * 146097 + static_cast<int>(doe) - 719468 }; > } > > constexpr bool operator==(const date& x, const date& y) noexcept { > return x.year() == y.year() && x.month() == y.month() && x.day() == y.day(); > } > constexpr bool operator!=(const date& x, const date& y) noexcept { > return !(x == y); > } > constexpr bool operator< (const date& x, const date& y) noexcept { > > return x.year() < y.year() ? true > : (x.year() > y.year() ? false > : (x.month() < y.month() ? true > : (x.month() > y.month() ? false > : (x.day() < y.day())))); > } > constexpr bool operator> (const date& x, const date& y) noexcept { return y < x; } > constexpr bool operator<=(const date& x, const date& y) noexcept { return !(y < x); } > constexpr bool operator>=(const date& x, const date& y) noexcept { return !(x < y); } > > inline date operator+(const date& d, const months& dm) noexcept > { > auto dmi = static_cast<int>(d.month().count()) - 1 + dm.count(); > auto dy = (dmi >= 0 ? dmi : dmi-11) / 12; > dmi = dmi - dy * 12 + 1; > date ret{ d.year() + years(dy), month((unsigned)(dmi)), d.day() }; > if( !ret.ok() ) { > ret = date(ret.year(), ret.month(), last_day_of_month(ret.year(), ret.month())); > } > return ret; > } > inline date operator+(const months& dm, const date& d) noexcept{ return d + dm; } > inline date operator-(const date& d, const months& dm) noexcept { return d + -dm; } > > inline date operator+(const date& d, const years& dy) noexcept { return date{ d.year() + dy, d.month(), d.day()}; } > inline date operator+(const years& dy, const date& d) noexcept{ return d + dy; } > inline date operator-(const date& d, const years& dy) noexcept{ return date{ d.year() - dy, d.month(), d.day()}; } > > inline date& date::operator+=(const months& m) noexcept { *this = *this + m; return *this; } > inline date& date::operator-=(const months& m) noexcept { *this = *this - m; return *this; } > > inline date& date::operator+=(const years& y) noexcept { *this = *this + y; return *this; } > inline date& date::operator-=(const years& y) noexcept { *this = *this - y; return *this; } > > namespace time > { > inline sys_days top_of_month(const sys_days& time) > { > date calendar{ time }; > return date{ calendar.year(), calendar.month(), day{1} }.to_sys_days(); > } > } >} > > >namespace std >{ > template<> > struct hash<hsh::day> > { > size_t operator()(const hsh::day& day) const noexcept { return std::hash<unsigned int>()(day.count()); } > }; > > template<> > struct hash<hsh::year> > { > size_t operator()(const hsh::year& year) const noexcept { return std::hash<int>()(year.count()); } > }; > > template<> > struct hash<hsh::month> > { > size_t operator()(const hsh::month& month) const noexcept { return std::hash<unsigned int>()(month.count()); } > }; > > template<> > struct hash<hsh::year_month> > { > size_t operator()(const hsh::year_month& yyyy_mm) const noexcept { return hsh::hash_combine(yyyy_mm.year(), yyyy_mm.month()); } > }; > > template<> > struct hash<hsh::date> > { > size_t operator()(const hsh::date& date) const noexcept { return std::hash<hsh::sys_days::rep>()(date.to_sys_days().time_since_epoch().count()); } > }; >} ># 6 "QueryUtilities.h" 2 > > > ># 1 "QueryTypes.h" 1 > > > > > >struct MongoMetrics >{ > MongoMetrics(IHSHMetricManager::IHSHDeltaAccumulatorMetric *successful_reqs, IHSHMetricManager::IHSHDeltaAccumulatorMetric *failed_reqs) noexcept > : successful_reqs(successful_reqs), failed_reqs(failed_reqs) {} > > IHSHMetricManager::IHSHDeltaAccumulatorMetric *successful_reqs; > IHSHMetricManager::IHSHDeltaAccumulatorMetric *failed_reqs; >}; > >struct CassMetrics >{ > CassMetrics(IHSHMetricManager::IHSHDeltaAccumulatorMetric *successful_reqs, IHSHMetricManager::IHSHDeltaAccumulatorMetric *failed_reqs) noexcept > : successful_reqs(successful_reqs), failed_reqs(failed_reqs) {} > > IHSHMetricManager::IHSHDeltaAccumulatorMetric *successful_reqs; > IHSHMetricManager::IHSHDeltaAccumulatorMetric *failed_reqs; >}; > > >class ChronusQueryStream : public query::Stream >{ >public: > explicit ChronusQueryStream(uint32_t cpid) noexcept : _purged(true), query::Stream() { _cpid = cpid; } > ChronusQueryStream(uint32_t upgrade_cpid, UIDState uid_state, const query::StreamCreationData &stream_data) noexcept > : query::Stream(stream_data), _upgrade_cpid(upgrade_cpid), _uid_state(uid_state) {} > ChronusQueryStream(uint32_t upgrade_cpid, UIDState uid_state, query::StreamCreationData &&stream_data) noexcept > : query::Stream(std::move(stream_data)), _upgrade_cpid(upgrade_cpid), _uid_state(uid_state) {} > > inline uint32_t upgrade_cpid() const noexcept { return _upgrade_cpid; } > inline UIDState uid_state() const noexcept { return _uid_state; } > inline bool purged() const noexcept { return _purged; } > inline bool is_availible() const noexcept > { > switch (_uid_state) > { > case UID_STATE_DELETED: > case UID_STATE_PURGE_ENQUEUED: > case UID_STATE_RESTORE_ENQUEUED: > case UID_STATE_RESTORE_BLOCKED: > return false; > default: > return true; > } > } > > >protected: > uint32_t _upgrade_cpid = 0u; > UIDState _uid_state = UID_STATE_NORMAL; > bool _purged = false; >}; > >class ChronusContinuousStream final : public ChronusQueryStream, public query::IContinuousStream >{ >public: > ChronusContinuousStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, const query::StreamCreationData &stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, stream_data) , _integrity_period(integrity_period) {} > ChronusContinuousStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, query::StreamCreationData &&stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, std::move(stream_data)), _integrity_period(integrity_period) {} > > ~ChronusContinuousStream() = default; > > virtual const IContinuousStream *continuous() const override { return this; } > virtual hsh::milliseconds integrity_period() const noexcept override { return _integrity_period; } > >private: > hsh::milliseconds _integrity_period; >}; > >class ChronusPeriodicStream final : public ChronusQueryStream, public query::IPeriodicStream >{ >public: > ChronusPeriodicStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds period, const query::StreamCreationData &stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, stream_data), _period(period) {} > ChronusPeriodicStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds period, query::StreamCreationData &&stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, std::move(stream_data)), _period(period){} > > ~ChronusPeriodicStream() = default; > > virtual const IPeriodicStream *periodic() const override { return this; } > virtual hsh::milliseconds period() const noexcept override { return _period; } > >private: > hsh::milliseconds _period; >}; > >class ChronusMetricStream final : public ChronusQueryStream, public query::IMetricStream >{ >public: > ChronusMetricStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, const std::string& host, > const std::string& process, const std::string& metric, const query::StreamCreationData &stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, stream_data), _host(host), _process(process), _metric(metric), _integrity_period(integrity_period) {} > > ChronusMetricStream(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, std::string&& host, > std::string&& process, std::string&& metric, query::StreamCreationData &&stream_data) noexcept > : ChronusQueryStream(upgrade_cpid, uid_state, std::move(stream_data)), > _host(std::move(host)), _process(std::move(process)), _metric(std::move(metric)), _integrity_period(integrity_period) {} > > ~ChronusMetricStream() = default; > > virtual const IMetricStream *metric() const override { return this; } > virtual const std::string& host() const noexcept override { return _host; } > virtual const std::string& process() const noexcept override { return _process; } > virtual const std::string& metric_name() const noexcept override { return _metric; } > virtual hsh::milliseconds integrity_period() const noexcept override { return _integrity_period; } > >private: > std::string _host; > std::string _process; > std::string _metric; > hsh::milliseconds _integrity_period; >}; > >class ChronusStreamFactory >{ >public: > static std::shared_ptr<const ChronusQueryStream> create(const IMongoDocument& doc) noexcept; > >private: > > struct ChronusStreamCreationData > { > query::StreamCreationData stream_data; > uint32_t upgrade_cpid{ 0u }; > hsh::milliseconds integrity_period{ 0 }; > hsh::milliseconds period{ 0 }; > std::string host; > std::string process; > std::string metric; > UIDState uid_state = UID_STATE_NORMAL; > OSII_BOOL purged = 0; > }; > > static hsh::optional<ChronusStreamCreationData> load(const IMongoDocument& doc); >}; > > >class ChronusStreamGroup : public query::StreamGroup >{ >public: > explicit ChronusStreamGroup(uint32_t cpid) noexcept : _purged(true), query::StreamGroup() { _cpid = cpid; } > ChronusStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, const query::StreamGroupCreationData &stream_data) noexcept > : query::StreamGroup(stream_data), _upgrade_cpid(upgrade_cpid), _uid_state(uid_state) {} > ChronusStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, query::StreamGroupCreationData &&stream_data) noexcept > : query::StreamGroup(std::move(stream_data)), _upgrade_cpid(upgrade_cpid), _uid_state(uid_state) {} > > inline uint32_t upgrade_cpid() const noexcept { return _upgrade_cpid; } > inline UIDState uid_state() const noexcept { return _uid_state; } > inline bool purged() const noexcept { return _purged; } > inline bool is_availible() const noexcept > { > switch (_uid_state) > { > case UID_STATE_DELETED: > case UID_STATE_PURGE_ENQUEUED: > case UID_STATE_RESTORE_ENQUEUED: > case UID_STATE_RESTORE_BLOCKED: > return false; > default: > return true; > } > } > >protected: > uint32_t _upgrade_cpid = 0u; > UIDState _uid_state = UID_STATE_NORMAL; > bool _purged = false; >}; > >class ChronusContinuousStreamGroup final : public query::IContinuousStreamGroup, public ChronusStreamGroup >{ >public: > ChronusContinuousStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, const query::StreamGroupCreationData &group_data) noexcept > : ChronusStreamGroup(upgrade_cpid, uid_state, group_data), _integrity_period(integrity_period) {} > > ChronusContinuousStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds integrity_period, query::StreamGroupCreationData &&group_data) noexcept > : ChronusStreamGroup(upgrade_cpid, uid_state, std::move(group_data)), _integrity_period(integrity_period) {} > > virtual const IContinuousStreamGroup *continuous() const noexcept override { return this; } > virtual hsh::milliseconds integrity_period() const noexcept override { return _integrity_period; } > >private: > hsh::milliseconds _integrity_period; >}; > >class ChronusPeriodicStreamGroup final : public query::IPeriodicStreamGroup, public ChronusStreamGroup >{ >public: > ChronusPeriodicStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds period, const query::StreamGroupCreationData &group_data) noexcept > : ChronusStreamGroup(upgrade_cpid, uid_state, group_data), _period(period) {} > > ChronusPeriodicStreamGroup(uint32_t upgrade_cpid, UIDState uid_state, hsh::milliseconds period, query::StreamGroupCreationData &&group_data) noexcept > : ChronusStreamGroup(upgrade_cpid, uid_state, std::move(group_data)), _period(period) {} > > > virtual const IPeriodicStreamGroup *periodic() const noexcept override { return this; } > virtual hsh::milliseconds period() const noexcept override { return _period; } > >private: > hsh::milliseconds _period; >}; > >class ChronusGroupFactory >{ >public: > static std::shared_ptr<const ChronusStreamGroup> create(const IMongoDocument& doc); > >private: > > struct ChronusGroupCreationData > { > query::StreamGroupCreationData group_data; > uint32_t upgrade_cpid{ 0u }; > hsh::milliseconds integrity_period{ 0 }; > hsh::milliseconds period{ 0 }; > UIDState uid_state = UID_STATE_NORMAL; > OSII_BOOL purged = 0; > }; > static std::shared_ptr<const query::GroupedStream> create_grouped_stream(const std::string& member_name, uint32_t parent_cpid, StreamType stream_type, const IMongoDocument& doc); > static hsh::optional<ChronusGroupCreationData> load(const IMongoDocument& doc); >}; > >class ChronusEnumFactory >{ >public: > static std::shared_ptr<const query::EnumData> create(const IMongoDocument& doc) noexcept; >}; > >class ChronusLogFactory >{ >public: > static std::shared_ptr<const query::LogStream> create(const IMongoDocument& doc) noexcept; >}; ># 10 "QueryUtilities.h" 2 > > >namespace chronus >{ > class day_iterator > { > public: > using value_type = hsh::time_point; > using difference_type = std::ptrdiff_t; > using pointer = hsh::time_point*; > using reference = hsh::time_point; > using iterator_category = std::input_iterator_tag; > > explicit day_iterator(hsh::time_point time_point) noexcept : time_point(time_point) {} > > hsh::time_point operator*() const noexcept { return time_point; } > > day_iterator& operator++() noexcept > { > time_point += 1_days; > return *this; > } > > day_iterator operator++(int) noexcept > { > day_iterator ret{ time_point }; > time_point += 1_days; > return ret; > } > > friend bool operator==(const day_iterator& x, const day_iterator& y) noexcept { return x.time_point == y.time_point; } > friend bool operator!=(const day_iterator& x, const day_iterator& y) noexcept { return x.time_point != y.time_point; } > > private: > hsh::time_point time_point; > }; > > class month_range_iterator; > > class month_range > { > public: > explicit month_range(hsh::year_month yyyy_mm, hsh::time_span time_span) noexcept > : yyyy_mm(yyyy_mm), > _span(time_span), > _begin(calculate_start_time(yyyy_mm, time_span)), > _end(calculate_end_time(yyyy_mm, time_span)){} > > hsh::year_month year_month() const noexcept { return yyyy_mm; } > > day_iterator begin() const noexcept { return day_iterator(_begin); } > day_iterator end() const noexcept { return day_iterator(_end); } > > friend bool operator==(const month_range& x, const month_range& y) noexcept { return x.yyyy_mm == y.yyyy_mm; } > friend bool operator!=(const month_range& x, const month_range& y) noexcept { return x.yyyy_mm != y.yyyy_mm; } > > private: > static hsh::time_point calculate_start_time(hsh::year_month yyyy_mm, hsh::time_span time_span) > { > hsh::time_point start_of_month{ hsh::date{ yyyy_mm.year(), yyyy_mm.month() }.to_sys_days() }; > hsh::time_point top_of_starting_day{ hsh::time::top_of_day(time_span.start()) }; > return std::max(start_of_month, top_of_starting_day); > } > > static hsh::time_point calculate_end_time(hsh::year_month yyyy_mm, hsh::time_span time_span) > { > hsh::time_point end_of_month{ hsh::date{ yyyy_mm.year(), yyyy_mm.month(), yyyy_mm.last_day_of_month() }.to_sys_days() + 1_days }; > hsh::time_point day_after_end_day{ hsh::time::top_of_day(time_span.end() + 1_days) }; > return std::min(end_of_month, day_after_end_day); > } > > friend month_range_iterator; > hsh::year_month yyyy_mm; > hsh::time_span _span; > hsh::time_point _begin; > hsh::time_point _end; > }; > > class month_range_iterator > { > public: > using value_type = const month_range; > using difference_type = std::ptrdiff_t; > using pointer = const month_range*; > using reference = const month_range&; > using iterator_category = std::input_iterator_tag; > > explicit month_range_iterator(const month_range& mnth_range) : _mnth_range(mnth_range) {} > > reference operator*() const noexcept { return _mnth_range; } > pointer operator->() const noexcept { return std::addressof(_mnth_range); } > > month_range_iterator& operator++() noexcept > { > increment(); > return *this; > } > > month_range_iterator operator++(int) noexcept > { > month_range_iterator ret{ _mnth_range }; > increment(); > return ret; > } > > friend bool operator==(const month_range_iterator& x, const month_range_iterator& y) noexcept { return x._mnth_range == y._mnth_range; } > friend bool operator!=(const month_range_iterator& x, const month_range_iterator& y) noexcept { return x._mnth_range != y._mnth_range; } > > private: > inline void increment() > { > > _mnth_range.yyyy_mm += hsh::months{ 1 }; > > _mnth_range._begin = month_range::calculate_start_time(_mnth_range.yyyy_mm, _mnth_range._span); > _mnth_range._end = month_range::calculate_end_time(_mnth_range.yyyy_mm, _mnth_range._span); > } > month_range _mnth_range; > }; > > > class year_month_range > { > public: > explicit year_month_range(hsh::time_span time_span) noexcept > : time_span(time_span), > _begin(hsh::date(time_span.start()).to_year_month(), time_span), > _end(hsh::date(time_span.end()).to_year_month() + hsh::months(1), time_span){} > > hsh::time_span time_range() const noexcept { return time_span; } > > month_range_iterator begin() const noexcept { return month_range_iterator(_begin); } > month_range_iterator end() const noexcept { return month_range_iterator(_end); } > > private: > month_range _begin; > month_range _end; > hsh::time_span time_span; > }; > > class ISchemaManager > { > public: > struct Keyspace > { > Keyspace(const std::string& name, bool is_hsh3_keyspace) > : name(name), is_hsh3_keyspace(is_hsh3_keyspace) {} > > std::string name; > bool is_hsh3_keyspace; > }; > > class AorMaskTransitionTime > { > public: > explicit AorMaskTransitionTime(hsh::time_span aor_mask_range) noexcept : aor_mask_range(aor_mask_range) {} > > inline bool is_switch_needed(hsh::time_point write_time) const noexcept { return aor_mask_range.start() < write_time && write_time < aor_mask_range.end(); } > private: > hsh::time_span aor_mask_range; > }; > > > virtual const Keyspace* find_keyspace(hsh::year_month yyyy_mm) const noexcept = 0; > > virtual AorMaskTransitionTime aor_transition_time() const noexcept = 0; > }; > > > template<typename T> > query::Result<T> unwrap_futures(std::vector<hsh::future<query::Result<T>>>&& futures) > { > > std::vector<std::vector<T>> vecs; > vecs.reserve(futures.size()); > for (auto &future : futures) > { > auto result = future.get(); > if (!result) { > return result.error(); > } > vecs.push_back(std::move(*result)); > } > > > std::vector<T> ret; > ret.reserve(std::accumulate(vecs.begin(), vecs.end(), 0ull, [](size_t size, const std::vector<T>& vec) { return size + vec.size(); })); > > > for (auto &vec : vecs) { > ret.insert(ret.end(), std::make_move_iterator(vec.begin()), std::make_move_iterator(vec.end())); > } > return ret; > } ># 213 "QueryUtilities.h" > template<typename T> > class PagedDailyQuery : public query::PagedResult<T> > { > public: > PagedDailyQuery(ISchemaManager* schema_mgr, hsh::time_span query_range) > : schema_mgr(schema_mgr), yyyy_mm_range(query_range), yyyy_mm_itr(std::begin(yyyy_mm_range)), > day_itr(std::begin(*yyyy_mm_itr)), ks(schema_mgr->find_keyspace(yyyy_mm_itr->year_month())) > { > if (!ks) { > advance_month(); > } > > > > } > > virtual hsh::optional<hsh::future<query::Result<T>>> next() override > { > if ( !next_future ) { > return hsh::nullopt; > } > return hsh::exchange(next_future, internal_next()); > } > > protected: > bool has_more_pages() const noexcept { return yyyy_mm_range.end() != yyyy_mm_itr; } > > void advance_page() noexcept > { > if (yyyy_mm_itr->end() == ++day_itr) > { > advance_month(); > } > } > > > void advance_month() noexcept > { > while (yyyy_mm_range.end() != ++yyyy_mm_itr) > { > > if (nullptr != (ks = schema_mgr->find_keyspace(yyyy_mm_itr->year_month()))) > { > > day_itr = yyyy_mm_itr->begin(); > return; > } > } > } > > hsh::optional<hsh::future<query::Result<T>>> internal_next() > { > if ( !has_more_pages() ) { > return hsh::nullopt; > } > > auto future = run_day_query(*ks, *day_itr, yyyy_mm_range.time_range()); > if (!future) { > yyyy_mm_itr = yyyy_mm_range.end(); > return hsh::make_ready_future<query::Result<T>>(future.error()); > } > advance_page(); > return std::move(*future); > } > > virtual hsh::result<hsh::future<query::Result<T>>, query::error> run_day_query(const ISchemaManager::Keyspace& ks, hsh::time_point day, hsh::time_span query_range) = 0; > > ISchemaManager* schema_mgr; > chronus::year_month_range yyyy_mm_range; > chronus::month_range_iterator yyyy_mm_itr; > chronus::day_iterator day_itr; > const ISchemaManager::Keyspace* ks; > hsh::optional<hsh::future<query::Result<T>>> next_future; > }; > > > struct query_tools > { > ICassandraConnection* cass_conn; > ISchemaManager* schema_mgr; > CassMetrics metrics; > }; > > > class cass_result_range > { > public: > class iterator > { > public: > using value_type = ICassRow*; > using difference_type = std::ptrdiff_t; > using pointer = value_type*; > using reference = value_type&; > using iterator_category = std::input_iterator_tag; > > value_type operator*() const noexcept { return row; } > pointer operator->() noexcept { return std::addressof(row); } > > iterator& operator++() noexcept > { > result->destroy_row(row); > row = result->get_next_row(); > return *this; > } > > void operator++(int) noexcept { operator++(); } > > friend bool operator==(const iterator& lhs, const iterator& rhs) noexcept { return lhs.row == rhs.row && lhs.result == rhs.result; } > friend bool operator!=(const iterator& lhs, const iterator& rhs) noexcept { return !(lhs == rhs); } > > private: > friend cass_result_range; > iterator(IQueryResults* result, ICassRow* row) noexcept : result(result), row(row) {} > > IQueryResults* result; > ICassRow* row; > }; > > explicit cass_result_range(IQueryResults* result) noexcept : result(result) {} > > > iterator begin() noexcept { return iterator(result, result->get_next_row()); } > iterator end() const noexcept { return iterator(result, nullptr); } > > private: > IQueryResults* result; > }; > > > class mongo_result_range > { > public: > class iterator > { > public: > using value_type = IMongoDocument*; > using difference_type = std::ptrdiff_t; > using pointer = value_type*; > using reference = value_type&; > using iterator_category = std::input_iterator_tag; > > value_type operator*() const noexcept { return doc; } > pointer operator->() noexcept { return std::addressof(doc); } > > iterator& operator++() noexcept > { > IMongoDocument::destroy_document(doc); > doc = range->next(); > return *this; > } > > void operator++(int) noexcept { operator++(); } > > friend bool operator==(const iterator& lhs, const iterator& rhs) noexcept { return lhs.doc == rhs.doc && lhs.range == rhs.range; } > friend bool operator!=(const iterator& lhs, const iterator& rhs) noexcept { return !(lhs == rhs); } > > private: > friend mongo_result_range; > iterator(mongo_result_range* range, IMongoDocument* doc) noexcept > : range(range), doc(doc) {} > > mongo_result_range* range; > IMongoDocument* doc; > }; > > mongo_result_range(IMongoQueryResult* result, OSII_RETCODE& ret) noexcept > : result(result), ret(ret) {} > > > iterator begin() noexcept { return iterator(this, next()); } > iterator end() noexcept { return iterator(this, nullptr); } > > private: > IMongoDocument* next() noexcept { return result->next_result(ret); } > > IMongoQueryResult* result; > OSII_RETCODE& ret; > }; > > > >} ># 7 "LogDataProvider.h" 2 > ># 1 "/opt/osi/12.2/monarch_x86_64/monarch/src/hsh_sdk/include/timer.h" 1 > > > > > > >namespace hsh >{ > namespace details > { > > template <class Clock> > class stopwatch_template > { > public: > using clock = Clock; > using resolution = typename clock::duration; > using time_point = typename clock::time_point; > > template<class ToDuration = resolution> > inline ToDuration elapsed() const noexcept { return std::chrono::duration_cast<ToDuration>(clock::now() - _start); } > > inline void restart() noexcept { _start = clock::now(); } > > private: > time_point _start{ clock::now() }; > }; > > > template <class Clock> > class startable_stopwatch_template > { > public: > using clock = Clock; > using resolution = typename clock::duration; > using time_point = typename clock::time_point; > > startable_stopwatch_template() = default; > > static startable_stopwatch_template start_new() noexcept > { > startable_stopwatch_template ret; > ret.start(); > return ret; > } > > inline bool started() const noexcept { return _start.time_since_epoch() != resolution::zero(); } > inline bool stopped() const noexcept { return _end.time_since_epoch() != resolution::zero(); } > inline bool is_running() const noexcept { return started() && !stopped(); } > > inline time_point start_time() const noexcept { return _start; } > inline time_point end_time() const noexcept { return stopped() ? _end : clock::now(); } > > template<class ToDuration = resolution> > inline ToDuration elapsed() const noexcept { return std::chrono::duration_cast<ToDuration>(end_time() - start_time()); } > > inline void start() noexcept > { > if (!started()) { > _start = clock::now(); > } > } > > inline void stop() noexcept > { > if (is_running()) { > _end = clock::now(); > } > } > > inline void reset() noexcept > { > _start = time_point{}; > _end = time_point{}; > } > > inline void restart() noexcept > { > _start = clock::now(); > _end = time_point{}; > } > > > private: > time_point _start; > time_point _end; > }; > > template <class Clock> > class countdown_timer_template > { > public: > using clock = Clock; > using resolution = typename clock::duration; > using time_point = typename clock::time_point; > > countdown_timer_template() = default; > > template<class Rep, class Period> > explicit countdown_timer_template(const std::chrono::duration<Rep, Period> &duration) noexcept : _end(clock::now() + duration) {} > > explicit countdown_timer_template(time_point end_time) noexcept : _end(end_time) {} > > inline bool is_running() const noexcept { return _end.time_since_epoch() != resolution::zero(); } > explicit operator bool() const noexcept { return is_running(); } > > inline bool expired() const noexcept { return is_running() && clock::now() >= _end; } > > template<class Rep, class Period> > bool check_and_reset(const std::chrono::duration<Rep, Period> &duration) noexcept > { > auto current_time = clock::now(); > if (!is_running()) { > restart(current_time + duration); > return false; > } > if (current_time >= _end) { > restart(current_time + duration); > return true; > } > return false; > } > > bool check_and_reset(time_point end_time) noexcept > { > auto current_time = clock::now(); > if (!is_running()) { > restart(end_time); > return false; > } > if (current_time >= _end) { > restart(end_time); > return true; > } > return false; > } > > template<class ToDuration = resolution> > ToDuration remaining() const noexcept > { > return is_running() ? > std::chrono::duration_cast<ToDuration>(_end - clock::now()) : ToDuration::zero(); > } > > template<class Rep, class Period> > void restart(const std::chrono::duration<Rep, Period> &duration) noexcept { _end = clock::now() + duration; } > > void restart(time_point end_time) noexcept { _end = end_time; } > > private: > time_point _end; > }; > > template<class Clock> > class periodic_timer_template > { > public: > using clock = Clock; > using resolution = typename clock::duration; > using time_point = typename clock::time_point; > > explicit periodic_timer_template(resolution period, resolution offset = resolution::zero(), bool expire_on_first_call = true) noexcept : > _period(period), _offset(offset), _next_period(expire_on_first_call ? time_point{} : calculate_next_period(clock::now(), period, offset)) {} > > inline time_point next_period() const noexcept { return first_call() ? clock::now() : _next_period; } > inline resolution period() const noexcept { return _period; } > inline resolution offset() const noexcept { return _offset; } > > inline bool elapsed() noexcept > { > auto time = clock::now(); > if (first_call() || time >= _next_period) { > update_next_period(time); > return true; > } > return false; > } > > uint32_t elapsed_periods() noexcept > { > auto time = clock::now(); > if (first_call()) { > update_next_period(time); > return 1; > } > > auto diff = time - _next_period; > if (diff >= 0_ms) > { > update_next_period(time); > return static_cast<uint32_t>((diff / _period) + 1); > } > return 0; > } > > template<class F, class... Args> > bool if_elapsed(F&& f, Args&&... args) noexcept > { > static_assert(hsh::is_invocable<F&&, Args&&...>::value, "Passed in Functor and Args must be invokable"); > > if ( elapsed() ) { > hsh::invoke(hsh::forward<F>(f), hsh::forward<Args>(args)...); > return true; > } > return false; > } > > void reset(resolution period, resolution offset = resolution::zero(), bool expire_on_first_call = true) noexcept > { > _period = period; > _offset = offset; > _next_period = expire_on_first_call ? time_point{} > : calculate_next_period( clock::now(), _period, _offset ); > } > > inline void sleep_until() const noexcept { std::this_thread::sleep_until(next_period()); } > > > inline void sleep_and_update() noexcept > { > std::this_thread::sleep_until( next_period() ); > update_next_period( clock::now() ); > } > > static inline time_point calculate_next_period(time_point start, resolution period, resolution offset) noexcept > { > return time_point{ resolution{((start.time_since_epoch().count() - offset.count()) / period.count() + 1) * period.count() + offset.count() } }; > } > > private: > inline bool first_call() const noexcept { return _next_period.time_since_epoch() == resolution::zero(); } > inline void update_next_period(time_point current_time) noexcept { _next_period = calculate_next_period(current_time, _period, _offset); } > > time_point _next_period; > resolution _period; > resolution _offset; > }; > } > > using system_stopwatch = details::stopwatch_template<std::chrono::system_clock>; > using stopwatch = details::stopwatch_template<std::chrono::steady_clock>; > > using system_startable_stopwatch = details::startable_stopwatch_template<std::chrono::system_clock>; > using startable_stopwatch = details::startable_stopwatch_template<std::chrono::steady_clock>; > > using system_countdown_timer = details::countdown_timer_template<std::chrono::system_clock>; > using countdown_timer = details::countdown_timer_template<std::chrono::steady_clock>; > > using periodic_timer = details::periodic_timer_template<std::chrono::system_clock>; > using steady_periodic_timer = details::periodic_timer_template<std::chrono::steady_clock>; >} ># 9 "LogDataProvider.h" 2 > > > >class IDailyLogQuery : public std::enable_shared_from_this<IDailyLogQuery> >{ >public: > IDailyLogQuery(hsh::basic_thread_pool::post_executor ex, const chronus::query_tools& query_params, const std::shared_ptr<query::ILogDataProvider::QueryOptions>& query_options) > : ex(ex), query_params(query_params), query_options(query_options){} > > ~IDailyLogQuery() { > if (statement) { query_params.cass_conn->destroy_statement(statement); } > } > > hsh::result<hsh::future<query::Result<query::LogValue>>, query::error> execute(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range); > >protected: > > void process_future(ICassandraQueryFuture* future); > > > virtual ICassandraQueryStatement* create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) = 0; > > > virtual query::Result<query::LogValue> process_result(IQueryResults* result) = 0; > > void mark_query_failed() noexcept > { > if (successful_requests) { > query_params.metrics.successful_reqs->increment(successful_requests); > } > query_params.metrics.failed_reqs->increment(1); > } > > void mark_query_success() noexcept { query_params.metrics.successful_reqs->increment(successful_requests); } > > > std::shared_ptr<query::ILogDataProvider::QueryOptions> query_options; > chronus::query_tools query_params; > hsh::basic_thread_pool::post_executor ex; > > > size_t successful_requests = 0; > hsh::promise<std::vector<hsh::future<query::Result<query::LogValue>>>> promise; > std::vector<hsh::future<query::Result<query::LogValue>>> futures; > ICassandraQueryStatement *statement = nullptr; >}; > > >class DailyLogQuery : public IDailyLogQuery >{ >public: > using IDailyLogQuery::IDailyLogQuery; >private: > virtual query::Result<query::LogValue> process_result(IQueryResults* result) override; > virtual ICassandraQueryStatement* create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) override; > > struct log_column_value > { > hsh::string_view key; > blob_stream_reader::borrowed_generic_value value; > > bool operator<(const log_column_value& rhs) const noexcept { return key < rhs.key; } > }; > > > struct column_visitor > { > column_visitor(std::vector<std::pair<std::string, hsh::primitive_value>>& values, const log_column_value& col) noexcept > : values(values), col(col) {} > > template<typename T> > void operator()(T val) { > values.emplace_back(std::piecewise_construct, std::forward_as_tuple(col.key.data(), col.key.size()), std::forward_as_tuple(val)); > } > > void operator()(hsh::string_view sv){ > values.emplace_back(std::piecewise_construct, std::forward_as_tuple(col.key.data(), col.key.size()), std::forward_as_tuple(sv.data(), sv.size())); > } > > std::vector<std::pair<std::string, hsh::primitive_value>>& values; > const log_column_value& col; > }; > > hsh::flat_map<std::string, hsh::primitive_value> convert_values(const std::vector<log_column_value>& values) const; > > static constexpr uint32_t CEID_INDEX = 0u; > static constexpr uint32_t SOURCE_TIME_INDEX = 1u; > static constexpr uint32_t COLLECTION_TIME_INDEX = 2u; > static constexpr uint32_t BLOB_INDEX = 3u; > static constexpr uint32_t AOR_INDEX = 4u; >}; > > >class LegacyColumnReader >{ >public: > > enum class log_column_type > { > string_col = 0, > varint_col = 1, > float_col = 2, > int64_col = 3, > time_col = 4, > aor_mask_col = 5 > }; > > > struct legacy_log_column_info > { > hsh::string_view name; > log_column_type type; > uint32_t index; > > bool operator<(const legacy_log_column_info& rhs) const noexcept { return name < rhs.name; } > > void add_column(ICassRow& row, bool switch_aors, std::vector<std::pair<std::string, hsh::primitive_value>>& column_values) const; > }; > > static hsh::flat_map<std::string, hsh::primitive_value> read_column_values(ICassRow& row, const hsh::flat_set<legacy_log_column_info>& columns, > const hsh::optional<hsh::flat_set<std::string>>& requested_columns, bool switch_aors = false); >}; > > >class HSH3DailyAlarmQuery : public IDailyLogQuery, public LegacyColumnReader >{ >public: > using IDailyLogQuery::IDailyLogQuery; >private: > virtual query::Result<query::LogValue> process_result(IQueryResults* result) override; > virtual ICassandraQueryStatement* create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) override; > > static constexpr size_t U_TIME_INDEX = 0u; > static constexpr legacy_log_column_info KEY = { "osi_key"_sv, log_column_type::string_col, 1u }; > static constexpr legacy_log_column_info ORIGIN = { "origin"_sv, log_column_type::string_col, 2u }; > static constexpr size_t CEID_INDEX = 3u; > static constexpr legacy_log_column_info EVENT_TIME = { "event_time"_sv, log_column_type::time_col, 4u }; > static constexpr legacy_log_column_info MESSAGE = { "message"_sv, log_column_type::string_col, 5u }; > static constexpr legacy_log_column_info SEVERITY = { "severity"_sv, log_column_type::varint_col, 6u }; > static constexpr legacy_log_column_info ALARM_ID = { "alarm_id"_sv, log_column_type::varint_col, 7u }; > static constexpr legacy_log_column_info SITE_ID = { "SiteID"_sv, log_column_type::varint_col, 8u }; > static constexpr legacy_log_column_info ALARM_TYPE = { "alarm_type"_sv, log_column_type::varint_col, 9u }; > static constexpr legacy_log_column_info AOR = { "area"_sv, log_column_type::varint_col, 10u }; > static constexpr legacy_log_column_info ATTACHMENT = { "attachment"_sv, log_column_type::varint_col, 11u }; > static constexpr legacy_log_column_info POINT_NAME = { "point_name"_sv, log_column_type::string_col, 12u }; > static constexpr legacy_log_column_info STATION = { "station"_sv, log_column_type::varint_col, 13u }; > static constexpr legacy_log_column_info FLAG = { "flag"_sv, log_column_type::varint_col, 14u }; > static constexpr legacy_log_column_info CLASS = { "class"_sv, log_column_type::varint_col, 15u }; > static constexpr legacy_log_column_info AOR_MASK1 = { "aor_mask1"_sv, log_column_type::aor_mask_col, 16u }; > static constexpr legacy_log_column_info AOR_MASK2 = { "aor_mask2"_sv, log_column_type::aor_mask_col, 17u }; > static constexpr legacy_log_column_info AOR_MASK3 = { "aor_mask3"_sv, log_column_type::aor_mask_col, 18u }; > static constexpr legacy_log_column_info AOR_MASK4 = { "aor_mask4"_sv, log_column_type::aor_mask_col, 19u }; > static constexpr legacy_log_column_info AOR_GROUP = { "aor_group"_sv, log_column_type::string_col, 20u }; > static constexpr legacy_log_column_info PEQUIP = { "p_equipment_type"_sv, log_column_type::varint_col, 21u }; > static constexpr legacy_log_column_info VALUE = { "value"_sv, log_column_type::string_col, 22u }; > static constexpr legacy_log_column_info NVALUE = { "nvalue"_sv, log_column_type::float_col, 23u }; > static constexpr size_t SECURITY_GROUPS_INDEX = 24u; > static constexpr legacy_log_column_info ACTION_USERNAME = { "action_username"_sv, log_column_type::string_col, 25u }; > static constexpr legacy_log_column_info EQUIPMENT_TYPE = { "equipment_type"_sv, log_column_type::string_col, 26u }; > static constexpr legacy_log_column_info EQUIPMENT_SHORTNAME = { "equipment_shortname"_sv, log_column_type::string_col, 27u }; > static constexpr legacy_log_column_info EQUIPMENT_DESC = { "equipment_description"_sv, log_column_type::string_col, 28u }; > static constexpr legacy_log_column_info CHATTERING = { "chattering"_sv, log_column_type::int64_col, 29u }; > static constexpr size_t WRITE_TIME_INDEX = 30u; > > > > static const hsh::flat_set<legacy_log_column_info> legacy_columns; >}; > > >class HSH3DailyEventQuery : public IDailyLogQuery, public LegacyColumnReader >{ >public: > using IDailyLogQuery::IDailyLogQuery; >private: > virtual query::Result<query::LogValue> process_result(IQueryResults* result) override; > virtual ICassandraQueryStatement* create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) override; > > static constexpr size_t U_TIME_INDEX = 0u; > static constexpr legacy_log_column_info KEY = { "osi_key"_sv, log_column_type::string_col, 1u }; > static constexpr legacy_log_column_info ORIGIN = { "origin"_sv, log_column_type::string_col, 2u }; > static constexpr size_t CEID_INDEX = 3u; > static constexpr legacy_log_column_info EVENT_TIME = { "event_time"_sv, log_column_type::time_col, 4u }; > static constexpr legacy_log_column_info MESSAGE = { "message"_sv, log_column_type::string_col, 5u }; > static constexpr legacy_log_column_info SEVERITY = { "severity"_sv, log_column_type::string_col, 6u }; > static constexpr legacy_log_column_info AOR = { "area"_sv, log_column_type::varint_col, 7u }; > static constexpr legacy_log_column_info ATTACHMENT = { "attachment"_sv, log_column_type::varint_col, 8u }; > static constexpr legacy_log_column_info POINT_NAME = { "point_name"_sv, log_column_type::string_col, 9u }; > static constexpr legacy_log_column_info STATION = { "station"_sv, log_column_type::varint_col, 10u }; > static constexpr legacy_log_column_info CLASS = { "class"_sv, log_column_type::varint_col, 11u }; > static constexpr legacy_log_column_info SITEID = { "SiteID"_sv, log_column_type::varint_col, 12u }; > static constexpr legacy_log_column_info AOR_MASK1 = { "aor_mask1"_sv, log_column_type::aor_mask_col, 13u }; > static constexpr legacy_log_column_info AOR_MASK2 = { "aor_mask2"_sv, log_column_type::aor_mask_col, 14u }; > static constexpr legacy_log_column_info AOR_MASK3 = { "aor_mask3"_sv, log_column_type::aor_mask_col, 15u }; > static constexpr legacy_log_column_info AOR_MASK4 = { "aor_mask4"_sv, log_column_type::aor_mask_col, 16u }; > static constexpr legacy_log_column_info AOR_GROUP = { "aor_group"_sv, log_column_type::string_col, 17u }; > static constexpr legacy_log_column_info P_EQUIP = { "p_equipment_type"_sv, log_column_type::varint_col, 18u }; > static constexpr legacy_log_column_info VALUE = { "value"_sv, log_column_type::string_col, 19u }; > static constexpr legacy_log_column_info NVALUE = { "nvalue"_sv, log_column_type::float_col, 20u }; > static constexpr size_t SECURITY_GROUPS_INDEX = 21u; > static constexpr legacy_log_column_info ACTION_USERNAME = { "action_username"_sv, log_column_type::string_col, 22u }; > static constexpr legacy_log_column_info EQUIPMENT_TYPE = { "equipment_type"_sv, log_column_type::string_col, 23u }; > static constexpr legacy_log_column_info EQUIPMENT_SHORTNAME = { "equipment_shortname"_sv, log_column_type::string_col, 24u }; > static constexpr legacy_log_column_info EQUIPMENT_DESC = { "equipment_description"_sv, log_column_type::string_col, 25u }; > static constexpr legacy_log_column_info CHATTERING = { "chattering"_sv, log_column_type::string_col, 26u }; > static constexpr size_t WRITE_TIME_INDEX = 27u; > > static const hsh::flat_set<legacy_log_column_info> legacy_columns; >}; > > >class HSH3DailySOEQuery : public IDailyLogQuery, public LegacyColumnReader >{ >public: > using IDailyLogQuery::IDailyLogQuery; >private: > virtual query::Result<query::LogValue> process_result(IQueryResults* result) override; > virtual ICassandraQueryStatement* create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) override; > > static constexpr legacy_log_column_info RX_TIME = { "rx_time"_sv, log_column_type::time_col, 0u }; > static constexpr size_t CEID_INDEX = 1u; > static constexpr legacy_log_column_info KEY = { "osi_key"_sv, log_column_type::string_col, 2u }; > static constexpr legacy_log_column_info STATION_NAME = { "station_name"_sv, log_column_type::string_col, 3u }; > static constexpr legacy_log_column_info POINT_NAME = { "point_name"_sv, log_column_type::string_col, 4u }; > static constexpr legacy_log_column_info SITEID = { "SiteID"_sv, log_column_type::varint_col, 5u }; > static constexpr legacy_log_column_info TIME_QUALITY = { "timequality"_sv, log_column_type::varint_col, 6u }; > static constexpr legacy_log_column_info SCAN_QUALITY = { "scanquality"_sv, log_column_type::varint_col, 7u }; > static constexpr legacy_log_column_info STATE_TEXT = { "state_text"_sv, log_column_type::string_col, 8u }; > > static const hsh::flat_set<legacy_log_column_info> legacy_columns; >}; > > > >class LogPagingQuery final : public chronus::PagedDailyQuery<query::LogValue> >{ >public: > LogPagingQuery(hsh::basic_thread_pool* tpool, const std::string& log_id, hsh::time_span query_range, const chronus::query_tools& query_params, query::ILogDataProvider::QueryOptions&& query_options) > : PagedDailyQuery(query_params.schema_mgr, query_range), tpool(tpool), log_id(log_id), query_params(query_params), > log_type(determine_log_type(log_id)), query_options(std::make_shared<query::ILogDataProvider::QueryOptions>(std::move(query_options))) > { > this->next_future = internal_next(); > } > >private: > enum class LogType > { > ALARMS = 0, > EVENTS = 1, > SOES = 2, > CUSTOM = 3 > }; > > virtual hsh::result<hsh::future<query::Result<query::LogValue>>, query::error> run_day_query(const chronus::ISchemaManager::Keyspace& ks, hsh::time_point day, hsh::time_span query_range) override; > > hsh::result<hsh::future<query::Result<query::LogValue>>, query::error> daily_log_query(const std::string& ks, hsh::time_point day, hsh::time_span query_range); > hsh::result<hsh::future<query::Result<query::LogValue>>, query::error> daily_hsh3_log_query(const std::string& ks, hsh::time_point day, hsh::time_span query_range); > > std::shared_ptr<IDailyLogQuery> create_hsh3_daily_log_query(LogType log_type); > > static query::Result<query::LogValue> merge_results(query::Result<query::LogValue>&& r1, query::Result<query::LogValue>&& r2); > static LogType determine_log_type(const std::string& log_id) noexcept; > > std::string log_id; > LogType log_type; > hsh::basic_thread_pool* tpool; > chronus::query_tools query_params; > std::shared_ptr<query::ILogDataProvider::QueryOptions> query_options; >}; > >class LogDataProvider : public query::ILogDataProvider >{ >public: > LogDataProvider(hsh::basic_thread_pool* tpool, const chronus::query_tools& query_params) noexcept > : tpool(tpool), query_params(query_params) {} > > virtual bool is_supported() const noexcept { return true; } > > virtual hsh::future<query::Result<query::LogValue>> query(const std::shared_ptr<const query::LogStream>& log, hsh::time_span query_range, > QueryOptions&& query_options = {}) override; > > virtual query::PagedResultPtr<query::LogValue> query_paged(const std::shared_ptr<const query::LogStream>& log, hsh::time_span query_range, > QueryOptions&& query_options = {}) override; > >private: > hsh::basic_thread_pool* tpool; > chronus::query_tools query_params; >}; ># 2 "LogDataProvider.cpp" 2 > > > > > >using namespace query; > > >LogPagingQuery::LogType LogPagingQuery::determine_log_type(const std::string& log_id) noexcept >{ > if (ChronusLogSchema::HSH_4_INTERNAL_ALARMS_LOG_NAME == log_id) { > return LogType::ALARMS; > } > else if (ChronusLogSchema::HSH_4_INTERNAL_EVENTS_LOG_NAME == log_id) { > return LogType::EVENTS; > } > else if (ChronusLogSchema::HSH_4_INTERNAL_SOES_LOG_NAME == log_id) { > return LogType::SOES; > } > return LogType::CUSTOM; >} > >std::shared_ptr<IDailyLogQuery> LogPagingQuery::create_hsh3_daily_log_query(LogType log_type) >{ > switch (log_type) > { > case LogType::ALARMS: > return std::make_shared<HSH3DailyAlarmQuery>(tpool->get_post_executor(), query_params, query_options); > case LogType::EVENTS: > return std::make_shared<HSH3DailyEventQuery>(tpool->get_post_executor(), query_params, query_options); > case LogType::SOES: > return std::make_shared<HSH3DailySOEQuery>(tpool->get_post_executor(), query_params, query_options); > default: > return nullptr; > } >} > >hsh::result<hsh::future<Result<LogValue>>, error> LogPagingQuery::run_day_query(const chronus::ISchemaManager::Keyspace& ks, hsh::time_point day, hsh::time_span query_range) >{ > > auto log_result = daily_log_query(ks.name, day, query_range); > if (!log_result) { > return log_result.error(); > } > > > if ( !ks.is_hsh3_keyspace || LogType::CUSTOM == log_type ) { > return *std::move(log_result); > } > > > auto hsh3_result = daily_hsh3_log_query(ks.name, day, query_range); > if (!hsh3_result) { > return hsh3_result.error(); > } > > > return hsh::when_all(std::move(*log_result), std::move(*hsh3_result)) > .on_value(hsh::inline_executor{}, [](std::tuple<hsh::future<Result<LogValue>>, hsh::future<Result<LogValue>>>&& futures) > { > return merge_results(std::get<0>(futures).get(), std::get<1>(futures).get()); > }); >} > >Result<LogValue> LogPagingQuery::merge_results(Result<LogValue>&& r1, Result<LogValue>&& r2) >{ > > if (!r1) { > return r1.error(); > } else if (!r2) { > return r2.error(); > } > > > if (r1->empty()) { > return *r2; > } else if (r2->empty()) { > return *r1; > } > > > std::vector<LogValue> results; > results.reserve(r1->size() + r2->size()); > std::merge(std::make_move_iterator(r1->begin()), std::make_move_iterator(r1->end()), > std::make_move_iterator(r2->begin()), std::make_move_iterator(r2->end()), std::back_inserter(results), > [](const LogValue& lhs, const LogValue& rhs) { return lhs.source_time() < rhs.source_time(); }); > return results; >} > > >hsh::result<hsh::future<Result<LogValue>>, error> LogPagingQuery::daily_log_query(const std::string& ks, hsh::time_point day, hsh::time_span query_range){ > return std::make_shared<DailyLogQuery>(tpool->get_post_executor(), query_params, query_options)->execute(log_id, ks, day, query_range); >} > >hsh::result<hsh::future<query::Result<query::LogValue>>, error> LogPagingQuery::daily_hsh3_log_query(const std::string& ks, hsh::time_point day, hsh::time_span query_range){ > return create_hsh3_daily_log_query(log_type)->execute(log_id, ks, day, query_range); >} > >hsh::result<hsh::future<Result<LogValue>>, error> IDailyLogQuery::execute(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) >{ > > statement = create_statement(table_id, keyspace, daily_bucket, query_range); > if ( !statement ) { > query_params.metrics.failed_reqs->increment(1); > return error::database_error; > } > > > query_params.cass_conn->perform_async_query(statement)->set_callback(hsh::bind_front(&IDailyLogQuery::process_future, this->shared_from_this())); > return promise.get_future() > .on_value(hsh::inline_executor{}, [](std::vector<hsh::future<Result<LogValue>>>&& futures) > { > > return hsh::when_all(std::begin(futures), std::end(futures)); > }) > .on_value(hsh::inline_executor{}, chronus::unwrap_futures<LogValue>); >} > > >void IDailyLogQuery::process_future(ICassandraQueryFuture* future) >{ > > auto result = future->get_query_results(); > if ( !result || (( OSII_RETCODE )1) != result->get_retcode() ) > { > if ( result ) { > query_params.cass_conn->destroy_query_results(result); > } > > futures.push_back(hsh::make_ready_future<Result<LogValue>>(error::database_error)); > promise.set_value(std::move(futures)); > mark_query_failed(); > future->release(); > return; > } > successful_requests++; > > > bool more_pages = result->has_more_pages(); > if ( more_pages ) { > result->update_statement_state(statement); > } > > > futures.push_back( hsh::async(ex, hsh::bind_front(&IDailyLogQuery::process_result, this->shared_from_this(), result)) ); > > if (more_pages) { > > query_params.cass_conn->perform_async_query(statement)->set_callback(hsh::bind_front(&IDailyLogQuery::process_future, this->shared_from_this())); > } else { > promise.set_value(std::move(futures)); > mark_query_success(); > } > future->release(); >} > >ICassandraQueryStatement* DailyLogQuery::create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) >{ > OSII_CHAR query[1024]; > osii_snprintf(query, sizeof(query), "SELECT ceid, source_time_us, collection_time_us, cells, security_bits FROM \"%s\".logs where table_id=? and source_time_us >= ? and source_time_us <= ? and bucket = ?", keyspace.c_str()); > > ICassandraQueryStatement* ret = nullptr; > if ((( OSII_RETCODE )1) != query_params.cass_conn->create_statement(query, ret) || !ret) { > HSHLogger::LOG("Failed to create daily log query statment", "LogDataProvider.cpp", 165 ); > return nullptr; > } > > if ((( OSII_RETCODE )1) != ret->bind_string(0, table_id) || > (( OSII_RETCODE )1) != ret->bind_varint(1, std::chrono::time_point_cast<hsh::microseconds>(std::max(daily_bucket, query_range.start())).time_since_epoch().count()) || > (( OSII_RETCODE )1) != ret->bind_varint(2, std::min(daily_bucket + 1_days, query_range.end()).time_since_epoch().count()) || > (( OSII_RETCODE )1) != ret->bind_int64(3, std::chrono::duration_cast<hsh::milliseconds>(daily_bucket.time_since_epoch()).count())) > { > HSHLogger::LOG("Failed to bind daily query statement", "LogDataProvider.cpp", 174 ); > query_params.cass_conn->destroy_statement(ret); > return nullptr; > } > > ret->set_query_timeout( 45_sec ); > ret->set_query_paging_size( 50000 ); > return ret; >} > >Result<LogValue> DailyLogQuery::process_result(IQueryResults* result) >{ > std::vector<LogValue> values; > values.reserve( result->get_num_results() ); > > for (auto row : chronus::cass_result_range(result)) > { > auto aors = row->decode_bytes(AOR_INDEX); > values.emplace_back(row->decode_cell_string(CEID_INDEX), > hsh::time_point{ hsh::microseconds{ row->decode_cell_varint(SOURCE_TIME_INDEX) } }, > hsh::time_point{ hsh::microseconds{ row->decode_cell_varint(COLLECTION_TIME_INDEX) } }, > hsh::span<const uint8_t, 32u>(aors.data(), aors.data() + 32) > ); > > blob_stream_reader byte_reader(row->decode_bytes(BLOB_INDEX)); > try > { > > std::vector<log_column_value> temp_column_values(byte_reader.read_byte()); > for (auto& column_value : temp_column_values) { > column_value.key = byte_reader.read_string(); > column_value.value = byte_reader.read_borrowed_generic_value(); > } > > > std::sort( std::begin(temp_column_values), std::end(temp_column_values) ); > > > values.back().mutable_values() = convert_values(temp_column_values); > > > if ( query_options->filter && !query_options->filter(values.back()) ){ > values.pop_back(); > } > } > catch (const std::out_of_range& ex) { > HSHLogger::LOG("Log Data Corruption detected: %s at event time: %lld", "LogDataProvider.cpp", 220, ex.what(), values.back().source_time().time_since_epoch().count() ); > values.pop_back(); > } > catch (const std::logic_error& ex) { > HSHLogger::LOG("Log Data Corruption detected: %s at event time: %lld", "LogDataProvider.cpp", 224, ex.what(), values.back().source_time().time_since_epoch().count() ); > values.pop_back(); > } > } > query_params.cass_conn->destroy_query_results(result); > return values; >} > >hsh::flat_map<std::string, hsh::primitive_value> DailyLogQuery::convert_values(const std::vector<log_column_value>& values) const >{ > std::vector<std::pair<std::string, hsh::primitive_value>> ret; > if ( !query_options->columns ) > { > ret.reserve(values.size()); > for (auto& col_value : values) > { > hsh::visit(column_visitor{ ret, col_value }, col_value.value); > } > return hsh::flat_map<std::string, hsh::primitive_value>{ hsh::ordered_unique_range, std::move(ret) }; > } > ret.reserve( query_options->columns->size() ); > > > auto add_column = [&ret](const log_column_value& col) mutable { > hsh::visit(column_visitor{ ret, col }, col.value); > }; > > > std::set_intersection( > values.begin(), values.end(), > std::begin(*query_options->columns), std::end(*query_options->columns), > hsh::make_function_output_iterator(std::ref(add_column)), > hsh::overload( > [](const log_column_value& lhs, const std::string& rhs) { return lhs.key < rhs; }, > [](const std::string& lhs, const log_column_value& rhs) { return lhs < rhs.key; } > ) > ); > return hsh::flat_map<std::string, hsh::primitive_value>{ hsh::ordered_unique_range, std::move(ret) }; >} > > >const hsh::flat_set<HSH3DailyAlarmQuery::legacy_log_column_info> HSH3DailyAlarmQuery::legacy_columns = { KEY, ORIGIN, EVENT_TIME, MESSAGE, SEVERITY, ALARM_ID, ALARM_TYPE, AOR, ATTACHMENT, POINT_NAME, STATION, > FLAG, CLASS, SITE_ID, AOR_MASK1, AOR_MASK2, AOR_MASK3, AOR_MASK4, AOR_GROUP, EQUIPMENT_TYPE, PEQUIP, VALUE, NVALUE, ACTION_USERNAME, EQUIPMENT_SHORTNAME, EQUIPMENT_DESC, CHATTERING }; > >const hsh::flat_set<HSH3DailyEventQuery::legacy_log_column_info> HSH3DailyEventQuery::legacy_columns = { SITEID, AOR_GROUP, AOR_MASK1, AOR_MASK2, AOR_MASK3, AOR_MASK4, AOR, ATTACHMENT, CLASS, > EQUIPMENT_TYPE, EVENT_TIME, MESSAGE, NVALUE, ORIGIN, KEY, P_EQUIP, POINT_NAME, SEVERITY, STATION, VALUE, ACTION_USERNAME, EQUIPMENT_SHORTNAME, EQUIPMENT_DESC, CHATTERING }; > >const hsh::flat_set<HSH3DailySOEQuery::legacy_log_column_info> HSH3DailySOEQuery::legacy_columns = { SITEID, KEY, POINT_NAME, RX_TIME, SCAN_QUALITY, STATE_TEXT, STATION_NAME, TIME_QUALITY }; > >void LegacyColumnReader::legacy_log_column_info::add_column(ICassRow& row, bool switch_aors, std::vector<std::pair<std::string, hsh::primitive_value>>& column_values) const >{ > switch (type) > { > case log_column_type::string_col: > { > auto str = row.decode_string(index); > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), std::forward_as_tuple(str.data(), str.size())); > break; > } > case log_column_type::varint_col: > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), std::forward_as_tuple(row.decode_cell_varint(index))); > break; > case log_column_type::float_col: > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), std::forward_as_tuple(row.decode_cell_float(index))); > break; > case log_column_type::int64_col: > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), std::forward_as_tuple(row.decode_cell_int64(index))); > break; > case log_column_type::time_col: > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), std::forward_as_tuple(row.decode_cell_int64(index) * 1000ll)); > break; > case log_column_type::aor_mask_col: > { > auto mask = row.decode_cell_varint(index); > column_values.emplace_back(std::piecewise_construct, std::forward_as_tuple(name.data(), name.size()), > std::forward_as_tuple(switch_aors ? static_cast<int64_t>(ChronusUtil::switch_aors(static_cast<int32_t>(mask))) : mask)); > break; > } > } >} > >hsh::flat_map<std::string, hsh::primitive_value> LegacyColumnReader::read_column_values(ICassRow& row, const hsh::flat_set<legacy_log_column_info>& legacy_columns, const hsh::optional<hsh::flat_set<std::string>>& requested_columns, bool switch_aors) >{ > std::vector<std::pair<std::string, hsh::primitive_value>> ret; > if (!requested_columns) > { > > ret.reserve(legacy_columns.size()); > for (auto& col : legacy_columns) { > col.add_column(row, switch_aors, ret); > } > return hsh::flat_map<std::string, hsh::primitive_value>(hsh::ordered_unique_range, std::move(ret)); > } > > ret.reserve(requested_columns->size()); > > auto process_column = [&row, &ret, switch_aors](const legacy_log_column_info& log_info) mutable { log_info.add_column(row, switch_aors, ret); }; > > std::set_intersection(legacy_columns.begin(), legacy_columns.end(), > requested_columns->begin(), requested_columns->end(), > hsh::make_function_output_iterator(std::ref(process_column)), > hsh::overload( > [](const legacy_log_column_info& lhs, const std::string& rhs) { return lhs.name < rhs; }, > [](const std::string& lhs, const legacy_log_column_info& rhs) { return lhs < rhs.name; }) > ); > return hsh::flat_map<std::string, hsh::primitive_value>(hsh::ordered_unique_range, std::move(ret)); >} > >ICassandraQueryStatement* HSH3DailyAlarmQuery::create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) >{ > OSII_CHAR query[1024]; > osii_snprintf_fast(query, sizeof(query), > "SELECT u_time, osi_key, origin, ceid, event_time, message, severity, alarm_id, site_id, alarm_type, area, attachment, point_name, station, flag, class, aor_mask1, aor_mask2, aor_mask3, aor_mask4, aor_group, p_equipment_type, str_val, value, security_groups, action_username, equipment_type, equipment_shortname, equipment_description, chattering, toTimestamp(ceid) as write_time " > "FROM \"%s\".alarms_events3 WHERE bucket= ? AND split_factor IN (0,1,2,3,4,5,6,7,8,9) and u_time >= ? and u_time <= ?", keyspace.c_str()); > > ICassandraQueryStatement *ret = __null; > if ((( OSII_RETCODE )1) != query_params.cass_conn->create_statement(query, ret) || !ret) { > HSHLogger::LOG("Failed to create daily hsh3 alarm query statment", "LogDataProvider.cpp", 341 ); > return nullptr; > } > > if ((( OSII_RETCODE )1) != ret->bind_int64(0, std::chrono::duration_cast<hsh::milliseconds>(daily_bucket.time_since_epoch()).count()) || > (( OSII_RETCODE )1) != ret->bind_int64(1, std::chrono::time_point_cast<hsh::milliseconds>(std::max(daily_bucket, query_range.start())).time_since_epoch().count()) || > (( OSII_RETCODE )1) != ret->bind_int64(2, std::chrono::time_point_cast<hsh::milliseconds>(std::min(daily_bucket + 1_days, query_range.end())).time_since_epoch().count())) > { > HSHLogger::LOG("Failed to bind hsh3 daily alarm query statement", "LogDataProvider.cpp", 349 ); > query_params.cass_conn->destroy_statement(ret); > return nullptr; > } > ret->set_query_timeout(45_sec); > ret->set_query_paging_size(50000); > return ret; >} > >Result<LogValue> HSH3DailyAlarmQuery::process_result(IQueryResults* result) >{ > auto aor_transition_data = query_params.schema_mgr->aor_transition_time(); > std::vector<LogValue> values; > values.reserve( result->get_num_results() ); > > for (auto row : chronus::cass_result_range(result)) > { > auto security_bits = row->decode_bytes(SECURITY_GROUPS_INDEX); > hsh::time_point source_time{ hsh::milliseconds{ row->decode_cell_int64(U_TIME_INDEX) } }; > values.emplace_back( ChronusUtil::legacy_UUID_from_binary(row->decode_string(CEID_INDEX)), > source_time, > source_time, > hsh::span<const uint8_t, 32u>(security_bits.data(), security_bits.data() + 32) > ); > > > hsh::time_point write_time{ hsh::milliseconds{ row->decode_cell_int64(WRITE_TIME_INDEX) } }; > values.back().mutable_values() = LegacyColumnReader::read_column_values(*row, legacy_columns, query_options->columns, aor_transition_data.is_switch_needed(write_time)); > > > if (query_options->filter && !query_options->filter(values.back())) { > values.pop_back(); > } > } > query_params.cass_conn->destroy_query_results(result); > > return values; >} > >ICassandraQueryStatement* HSH3DailyEventQuery::create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) >{ > OSII_CHAR query[1024]; > osii_snprintf_fast(query, sizeof(query), > "SELECT u_time, osi_key, origin, ceid, event_time, message, severity, area, attachment, point_name, station, class, site_id, aor_mask1, aor_mask2, aor_mask3, aor_mask4,aor_group,p_equipment_type, str_val, value, security_groups, action_username, equipment_type, equipment_shortname, equipment_description, chattering, toTimestamp(ceid) as write_time " > "FROM \"%s\".event_table2 WHERE bucket= ? AND split_factor IN (0,1,2,3,4,5,6,7,8,9) and u_time >= ? and u_time <= ?", keyspace.c_str()); > > ICassandraQueryStatement *ret = __null; > if ((( OSII_RETCODE )1) != query_params.cass_conn->create_statement(query, ret) || !ret ) { > HSHLogger::LOG("Failed to create daily query event statment", "LogDataProvider.cpp", 397 ); > return nullptr; > } > > if ((( OSII_RETCODE )1) != ret->bind_int64(0, std::chrono::duration_cast<hsh::milliseconds>(daily_bucket.time_since_epoch()).count()) || > (( OSII_RETCODE )1) != ret->bind_int64(1, std::chrono::time_point_cast<hsh::milliseconds>(std::max(daily_bucket, query_range.start())).time_since_epoch().count()) || > (( OSII_RETCODE )1) != ret->bind_int64(2, std::chrono::time_point_cast<hsh::milliseconds>(std::min(daily_bucket + 1_days, query_range.end())).time_since_epoch().count())) > { > HSHLogger::LOG("Failed to bind daily query statement", "LogDataProvider.cpp", 405 ); > query_params.cass_conn->destroy_statement(ret); > return nullptr; > } > return ret; >} > >Result<LogValue> HSH3DailyEventQuery::process_result(IQueryResults* result) >{ > auto aor_transition_data = query_params.schema_mgr->aor_transition_time(); > std::vector<LogValue> values; > values.reserve(result->get_num_results()); > > for (auto row : chronus::cass_result_range(result)) > { > auto security_bits = row->decode_bytes(SECURITY_GROUPS_INDEX); > hsh::time_point source_time{ hsh::milliseconds{ row->decode_cell_int64(U_TIME_INDEX) } }; > values.emplace_back(ChronusUtil::legacy_UUID_from_binary(row->decode_string(CEID_INDEX)), > source_time, > source_time, > hsh::span<const uint8_t, 32u>(security_bits.data(), security_bits.data() + 32) > ); > > > hsh::time_point write_time{ hsh::milliseconds{ row->decode_cell_int64(WRITE_TIME_INDEX) } }; > values.back().mutable_values() = LegacyColumnReader::read_column_values(*row, legacy_columns, query_options->columns, aor_transition_data.is_switch_needed(write_time)); > > > if (query_options->filter && !query_options->filter(values.back())) { > values.pop_back(); > } > } > query_params.cass_conn->destroy_query_results(result); > > return values; >} > >ICassandraQueryStatement* HSH3DailySOEQuery::create_statement(const std::string& table_id, const std::string& keyspace, hsh::time_point daily_bucket, hsh::time_span query_range) >{ > OSII_CHAR query[1024]; > osii_snprintf_fast(query, sizeof(query), > "SELECT u_time, ceid, osi_key, station_name, point_name, site_id, timequality, scanquality, state_text" > "FROM \"%s\".\"soe3\" WHERE bucket= ? AND split_factor IN (0,1,2,3,4,5,6,7,8,9) and u_time >= ? and u_time <= ?;", keyspace.c_str()); > > ICassandraQueryStatement *ret = __null; > if ((( OSII_RETCODE )1) != query_params.cass_conn->create_statement(query, ret) || !ret) { > HSHLogger::LOG("Failed to create daily query event statment", "LogDataProvider.cpp", 451 ); > return nullptr; > } > > if ((( OSII_RETCODE )1) != ret->bind_int64(0, std::chrono::duration_cast<hsh::milliseconds>(daily_bucket.time_since_epoch()).count()) || > (( OSII_RETCODE )1) != ret->bind_int64(1, std::chrono::time_point_cast<hsh::milliseconds>(std::max(daily_bucket, query_range.start())).time_since_epoch().count()) || > (( OSII_RETCODE )1) != ret->bind_int64(2, std::chrono::time_point_cast<hsh::milliseconds>(std::min(daily_bucket + 1_days, query_range.end())).time_since_epoch().count())) > { > HSHLogger::LOG("Failed to bind daily query statement", "LogDataProvider.cpp", 459 ); > query_params.cass_conn->destroy_statement(ret); > return nullptr; > } > ret->set_query_timeout(45_sec); > ret->set_query_paging_size(50000); > return ret; >} > >Result<LogValue> HSH3DailySOEQuery::process_result(IQueryResults* result) >{ > std::vector<LogValue> values; > values.reserve(result->get_num_results()); > > for (auto row : chronus::cass_result_range(result)) > { > > std::array<uint8_t, IAORManager::SECURITY_GROUP_BYTES> security_bits; > std::fill( std::begin(security_bits), std::end(security_bits), std::numeric_limits<uint8_t>::max() ); > > hsh::time_point source_time{ hsh::milliseconds{ row->decode_cell_int64(RX_TIME.index) } }; > values.emplace_back( > ChronusUtil::legacy_UUID_from_binary(row->decode_string(CEID_INDEX)), > source_time, > source_time, > security_bits); > > > values.back().mutable_values() = LegacyColumnReader::read_column_values( *row, legacy_columns, query_options->columns ); > > > if ( query_options->filter && !query_options->filter(values.back()) ) { > values.pop_back(); > } > } > query_params.cass_conn->destroy_query_results(result); > return values; >} > >hsh::future<Result<LogValue>> LogDataProvider::query(const std::shared_ptr<const LogStream>& log, hsh::time_span query_range, QueryOptions&& query_options) >{ > if (!log) { > return hsh::make_ready_future<Result<LogValue>>(error::invalid_argument); > } > > LogPagingQuery paging_query{ tpool, log->source_id(), query_range, query_params, std::move(query_options) }; > > > std::vector<hsh::future<Result<LogValue>>> futures; > while ( auto future = paging_query.next() ){ > futures.push_back(std::move(*future)); > } > > > return hsh::when_all(std::begin(futures), std::end(futures)) > .on_value(hsh::inline_executor{}, chronus::unwrap_futures<LogValue>); >} > >PagedResultPtr<LogValue> LogDataProvider::query_paged(const std::shared_ptr<const query::LogStream>& log, hsh::time_span query_range, QueryOptions&& query_options) >{ > if ( !log ) { > return hsh::make_unique<PagedResultError<LogValue>>(error::invalid_argument); > } > return hsh::make_unique<LogPagingQuery>( tpool, log->source_id(), query_range, query_params, std::move(query_options) ); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1918957
: 1749502 |
1749517
|
1749573